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.
93 lines
2.3 KiB
C++
93 lines
2.3 KiB
C++
#ifndef NMWXSENSITIVE_H
|
|
#define NMWXSENSITIVE_H
|
|
|
|
#include "iDlgBase.h"
|
|
#include "nmSubWxs_global.h"
|
|
|
|
#include "nmDataSensitive.h"
|
|
|
|
class QTreeWidget;
|
|
class QTreeWidgetItem;
|
|
class QComboBox;
|
|
class QPushButton;
|
|
class QStackedWidget;
|
|
class QCheckBox;
|
|
class QSpinBox;
|
|
class QLineEdit;
|
|
class nmDataAnalyzeManager;
|
|
class QTableWidget;
|
|
class QLabel;
|
|
class QIcon;
|
|
|
|
class NM_SUB_WXS_EXPORT nmWxSensitive : public iDlgBase
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit nmWxSensitive(QWidget *parent = 0, nmDataAnalyzeManager* manager = nullptr);
|
|
~nmWxSensitive();
|
|
|
|
private slots:
|
|
void onGenerateClicked();
|
|
void onCancelClicked();
|
|
void onCalculationTypeChanged(int index);
|
|
void onTreeItemClicked(QTreeWidgetItem *item, int column);
|
|
void onVariableParamChanged();
|
|
void onSamplingEditingFinished();
|
|
void onTableCellClicked(int row, int column);
|
|
void onTreeItemChanged(QTreeWidgetItem *item, int column);
|
|
void onPreviewClicked();
|
|
void onPreviewPrevious();
|
|
void onPreviewNext();
|
|
void onPreviewJump();
|
|
|
|
private:
|
|
void setupUI();
|
|
void createConnections();
|
|
void populateTreeWidget();
|
|
void createDetailPages();
|
|
QWidget *createVariablePage(const QString &varName);
|
|
void updateValuesForPage(int idx);
|
|
QIcon createTriangleIcon(); // 创建三角箭头图标
|
|
|
|
void loadDataToUI(); // 从数据加载到界面
|
|
bool saveDataFromUI(); // 校验并从界面保存到数据
|
|
void refreshModelValues();
|
|
void updateModelCount();
|
|
void refreshPreviewPage();
|
|
int findVariableIndex(const QString& varName); // 查找变量索引
|
|
|
|
// UI 控件
|
|
QComboBox *calculationTypeCombo;
|
|
QTreeWidget *variablesTree;
|
|
QStackedWidget *detailStack;
|
|
QLabel *modelCountLabel;
|
|
QPushButton *generateButton;
|
|
QPushButton *cancelButton;
|
|
QPushButton *previewButton;
|
|
|
|
// 各个变量页面的控件列表
|
|
QList<QComboBox*> m_modeCombos;
|
|
QList<QCheckBox*> m_logChecks;
|
|
QList<QSpinBox*> m_numSpins;
|
|
QList<QLineEdit*> m_modelSpins;
|
|
QList<QLineEdit*> m_minSpins;
|
|
QList<QLineEdit*> m_maxSpins;
|
|
QList<QTableWidget*> m_valueTables;
|
|
QList<QLabel*> m_unitLabels;
|
|
|
|
// 跟踪当前选中的值索引
|
|
int m_selectedValueIndex;
|
|
bool m_loading;
|
|
nmDataAnalyzeManager* m_pDataManager;
|
|
QTableWidget* m_previewTable;
|
|
QLineEdit* m_previewPageEdit;
|
|
QLabel* m_previewPageLabel;
|
|
quint64 m_previewPage;
|
|
|
|
// 敏感分析数据
|
|
nmDataSensitive m_sensitiveData;
|
|
};
|
|
|
|
#endif // NMWXSENSITIVE_H
|