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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iWxBase.h"
|
|
|
|
|
#include "mGuiJob_global.h"
|
|
|
|
|
|
|
|
|
|
class M_GUI_JOB_EXPORT iWxWizard : public iWxBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
enum WizardShowMode
|
|
|
|
|
{
|
|
|
|
|
WSM_Basic = 0, //基础
|
|
|
|
|
WSM_Fluid, //流体性质
|
|
|
|
|
WSM_PF, //Pressure&Rate
|
|
|
|
|
WSM_GasConst, //Gas const
|
|
|
|
|
|
|
|
|
|
WSM_All, //All
|
|
|
|
|
|
|
|
|
|
WSM_Unknown
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iWxWizard(QWidget *parent = 0);
|
|
|
|
|
~iWxWizard();
|
|
|
|
|
|
|
|
|
|
void clearWx();
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
|
|
|
|
|
// 显示模式
|
|
|
|
|
void setWsm(WizardShowMode o);
|
|
|
|
|
WizardShowMode getWsm();
|
|
|
|
|
|
|
|
|
|
// 子窗体
|
|
|
|
|
void appendSubWx(iWxBase* p);
|
|
|
|
|
|
|
|
|
|
void resetSubWx(iWxBase* p = NULL);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
void sigWizardOptionOk();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
void initBase();
|
|
|
|
|
void updateBtnStates();
|
|
|
|
|
|
|
|
|
|
// 标题
|
|
|
|
|
void changeTitle();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
void on_btnBack_clicked();
|
|
|
|
|
void on_btnNext_clicked();
|
|
|
|
|
void on_btnHelp_clicked();
|
|
|
|
|
void on_btnCancel_clicked();
|
|
|
|
|
|
|
|
|
|
// 把Wizard中所有项进行保存或者恢复
|
|
|
|
|
void slotLoad();
|
|
|
|
|
void slotSave();
|
|
|
|
|
|
|
|
|
|
// 当流体性质改变时,本窗体响应
|
|
|
|
|
virtual void slotParasObtained(QMap<QString, QVariant>& map);
|
|
|
|
|
|
|
|
|
|
// 当Job标识改变时,本窗体响应
|
|
|
|
|
//void slotJobTagChanged(QString s);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
WizardShowMode m_oWsm;
|
|
|
|
|
|
|
|
|
|
// 子窗体,本类不负责创建维护
|
|
|
|
|
// 分别为 Basic、Fluid、(Gas Const)、PF
|
|
|
|
|
QVector<iWxBase*> m_vecSubWxs;
|
|
|
|
|
|
|
|
|
|
// 子窗体容器
|
|
|
|
|
QStackedWidget* m_pStackedWidget;
|
|
|
|
|
|
|
|
|
|
// Btn
|
|
|
|
|
QPushButton* m_pBtnBack;
|
|
|
|
|
QPushButton* m_pBtnNext;
|
|
|
|
|
|
|
|
|
|
// 是否显示气体组分(在流体为 gas 时)显示
|
|
|
|
|
bool m_bShowGasConst;
|
|
|
|
|
int m_nIndexHide;
|
|
|
|
|
};
|