You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.4 KiB
C++
60 lines
2.4 KiB
C++
#ifndef NMWXDFN_H
|
|
#define NMWXDFN_H
|
|
|
|
#include "nmSubWxs_global.h"
|
|
#include "iDlgBase.h"
|
|
class nmDfnSession;
|
|
class nmGuiPlot;
|
|
class QTableView;
|
|
class nmDfnRecordModel;
|
|
class QComboBox;
|
|
class QLineEdit;
|
|
class QLabel;
|
|
class QPushButton;
|
|
|
|
// DFN 管理窗口:展示工作副本,确定后统一提交,取消不改变工程或地图。
|
|
class NM_SUB_WXS_EXPORT nmWxDFN : public iDlgBase
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
// 入口显式传入所属地图,不读取当前分析单例。
|
|
explicit nmWxDFN(nmGuiPlot* pPlot, QWidget* pParent = nullptr);
|
|
// 销毁独立会话;未提交工作副本随会话释放。
|
|
~nmWxDFN();
|
|
// 读取快照并显示实际数据,失败时由入口终止打开。
|
|
bool initialize();
|
|
public slots:
|
|
// 确认全部工作副本,提交失败时保留窗口和现有数据。
|
|
void accept();
|
|
private slots:
|
|
// 导入完整临时列表,子窗口取消不改变当前工作副本。
|
|
void onLoadButtonClicked();
|
|
// 在所属边界快照内生成,生成失败不替换当前列表。
|
|
void onGenerateButtonClicked();
|
|
// 删除选中行,只改变工作副本。
|
|
void onDeleteButtonClicked();
|
|
// 清空工作副本,仍可通过主窗口取消放弃。
|
|
void onClearButtonClicked();
|
|
// 导出当前工作副本,不隐式提交工程。
|
|
void onExportButtonClicked();
|
|
// 单位变化后从米制原值刷新表格和统计。
|
|
void refreshTable();
|
|
// 根据选择及数据状态启用对应操作。
|
|
void updateButtonsState();
|
|
private:
|
|
// 创建标准操作区、只读统计、裂缝明细和确认底栏。
|
|
void initUI();
|
|
nmDfnSession* m_pSession; // 窗口独占的工作会话。
|
|
QTableView* m_pTable; // 按需绘制的只读明细,不为每条裂缝创建单元格对象。
|
|
nmDfnRecordModel* m_pTableModel; // 窗口拥有的工作副本展示模型。
|
|
QComboBox* m_pLengthUnit; // 坐标及长度的框架显示单位。
|
|
QLineEdit* m_pCountEdit; // 实际裂缝数量,只读。
|
|
QLineEdit* m_pTotalEdit; // 全部裂缝整段长度之和,只读。
|
|
QLineEdit* m_pAverageEdit; // 实际平均整段长度,只读。
|
|
QPushButton* m_pDeleteButton; // 删除所选裂缝。
|
|
QPushButton* m_pClearButton; // 清空全部工作记录。
|
|
QPushButton* m_pExportButton; // 导出当前工作记录。
|
|
QLabel* m_pErrorLabel; // 仅操作失败时显示具体原因。
|
|
};
|
|
#endif // NMWXDFN_H
|