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.
nmWTAI-Platform/Include/nmNum/nmSubWxs/nmWxSensitive.h

76 lines
1.8 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 QDoubleSpinBox;
class QTableWidget;
class QLabel;
class QIcon;
class NM_SUB_WXS_EXPORT nmWxSensitive : public iDlgBase
{
Q_OBJECT
public:
explicit nmWxSensitive(QWidget *parent = 0);
~nmWxSensitive();
private slots:
void onGenerateClicked();
void onCancelClicked();
void onCalculationTypeChanged(int index);
void onTreeItemClicked(QTreeWidgetItem *item, int column);
void onVariableParamChanged();
void onTableCellClicked(int row, int column);
private:
void setupUI();
void createConnections();
void populateTreeWidget();
void createDetailPages();
QWidget *createVariablePage(const QString &varName);
void updateValuesForPage(int idx);
QIcon createTriangleIcon(); // 创建三角箭头图标
void loadDataToUI(); // 从数据加载到界面
void saveDataFromUI(); // 从界面保存到数据
int findVariableIndex(const QString& varName); // 查找变量索引
// UI 控件
QComboBox *calculationTypeCombo;
QTreeWidget *variablesTree;
QStackedWidget *detailStack;
QLabel *modelCountLabel;
QPushButton *generateButton;
QPushButton *cancelButton;
// 各个变量页面的控件列表
QList<QComboBox*> m_modeCombos;
QList<QCheckBox*> m_logChecks;
QList<QSpinBox*> m_numSpins;
QList<QDoubleSpinBox*> m_modelSpins;
QList<QDoubleSpinBox*> m_minSpins;
QList<QDoubleSpinBox*> m_maxSpins;
QList<QTableWidget*> m_valueTables;
QList<QLabel*> m_unitLabels;
// 跟踪当前选中的值索引
int m_selectedValueIndex;
// 敏感分析数据
nmDataSensitive m_sensitiveData;
};
#endif // NMWXSENSITIVE_H