|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iWxBase.h"
|
|
|
|
|
|
|
|
|
|
//class iModelDesc;
|
|
|
|
|
class ZxPlot;
|
|
|
|
|
class iWxModelSketch;
|
|
|
|
|
class iModelOption;
|
|
|
|
|
class iModelInfoBase;
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class iWxModelOption;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class M_GUI_JOB_EXPORT iWxModelOption : public iWxBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit iWxModelOption(QWidget *parent = 0);
|
|
|
|
|
~iWxModelOption();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
// void initUI_TopSpecial(QVBoxLayout*& pLayout); //该函数暂时不启用,后续可能需要重启
|
|
|
|
|
void initUI_ModelListWxs();
|
|
|
|
|
void initFromLasts();
|
|
|
|
|
void initUI_ModelGridLines(QVector<iModelInfoBase*>& vec, \
|
|
|
|
|
QVBoxLayout* pLayout, \
|
|
|
|
|
QString sType = "");
|
|
|
|
|
|
|
|
|
|
// 切换模型时刷新
|
|
|
|
|
virtual void refreshBrothers(bool bfresh = true);
|
|
|
|
|
|
|
|
|
|
// 组织结果数据,注:vec不进行clear,由调用方自行clear
|
|
|
|
|
virtual bool organizeResults(QVector<iResultInfo>& vec, QString sType);
|
|
|
|
|
|
|
|
|
|
// 返回当前选中的
|
|
|
|
|
iModelOption* getOption();
|
|
|
|
|
|
|
|
|
|
// 示意图绘图(多幅,弹出对话框)
|
|
|
|
|
virtual void showSketchCharts();
|
|
|
|
|
|
|
|
|
|
// FitModel之后改变一些状态
|
|
|
|
|
void dealwithFitOption(iModelOption* p);
|
|
|
|
|
void changeListItem(QListWidget* pListWx, \
|
|
|
|
|
QString sItem, QString sKey, \
|
|
|
|
|
bool bSelectOnly = true);
|
|
|
|
|
|
|
|
|
|
//得到聚合物中启动低渗的按钮状态
|
|
|
|
|
bool getCbxStatePF();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 填充List
|
|
|
|
|
void fillListWx(QListWidget* pListWx,
|
|
|
|
|
QString sType,
|
|
|
|
|
bool bConsiderSpecial = false,
|
|
|
|
|
bool bIsSpecial = false);
|
|
|
|
|
|
|
|
|
|
// 在切换时,先处理一下是否有 子 下拉选项
|
|
|
|
|
bool dealwithSubCbx(QListWidget* pListWx, bool bUnableSP = false);
|
|
|
|
|
// 从当前选项的子选项中进行调整
|
|
|
|
|
void adjustBySubCbx(QString sKey, QString& sCode, QString& sTag);
|
|
|
|
|
|
|
|
|
|
// 界面数据到Option载体
|
|
|
|
|
virtual void freshUi2Option();
|
|
|
|
|
void _freshUiListWx2Option(QListWidget* pListWx, QString sKey);
|
|
|
|
|
void _freshUiCheckBox2Option(QCheckBox* pCbx, QString sKey);
|
|
|
|
|
|
|
|
|
|
// 最近选用
|
|
|
|
|
void freshUiByOpenRecents();
|
|
|
|
|
void fillRecentModels();
|
|
|
|
|
void refreshRecentModels(QString sModel);
|
|
|
|
|
void freshRecentItem2ListWxs(QString s);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
|
|
|
|
|
|
// 模型选择
|
|
|
|
|
virtual void slotModelOptionChanged(QString);
|
|
|
|
|
virtual void on_cbxSubWel_currentIndexChanged(const QString &arg1);
|
|
|
|
|
virtual void on_cbxSubRes_currentIndexChanged(const QString &arg1);
|
|
|
|
|
|
|
|
|
|
// 各自的状态设定,复选框选项
|
|
|
|
|
void slotCbxStateChangedLP();
|
|
|
|
|
void slotCbxStateChangedPF();
|
|
|
|
|
void slotCbxStateChangedSR();
|
|
|
|
|
|
|
|
|
|
// 筛选部分
|
|
|
|
|
void on_btnFilter_clicked();
|
|
|
|
|
void on_tbxFilter_textChanged(const QString &arg1);
|
|
|
|
|
|
|
|
|
|
// 最近选用
|
|
|
|
|
void on_listWxRecents_doubleClicked(const QModelIndex &index);
|
|
|
|
|
void on_cbxOpenRecents_clicked();
|
|
|
|
|
void on_sbRecentCounts_valueChanged(int arg1);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
// 模型切换信号
|
|
|
|
|
void sigParasChangedEx(iModelOption* );
|
|
|
|
|
|
|
|
|
|
// 增加这个信号主要增加小信号的选择模式(目前小信号只比普通模式多一条线,增加信号,保证绘制时候出现)
|
|
|
|
|
void sigCbxStateChanged(bool bSmall);
|
|
|
|
|
|
|
|
|
|
// 聚合物PF
|
|
|
|
|
void sigCbxStatePfChanged(bool bCheck);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
Ui::iWxModelOption *ui;
|
|
|
|
|
|
|
|
|
|
// 选择内容的载体
|
|
|
|
|
iModelOption* m_pOption;
|
|
|
|
|
|
|
|
|
|
// ListWidget Ctrls / CheckBox
|
|
|
|
|
QMap<QString, QWidget*> m_mapSubWxs;
|
|
|
|
|
|
|
|
|
|
// 示意图
|
|
|
|
|
iWxModelSketch* m_pWxSketch;
|
|
|
|
|
// iWxModelSketch* m_pWxTheory; //二者用的同一个窗体,暂未启用,后续考虑
|
|
|
|
|
|
|
|
|
|
// 临时变量,不涉及序列化
|
|
|
|
|
QString m_sItemSub;
|
|
|
|
|
bool m_bRecentDbClick;
|
|
|
|
|
|
|
|
|
|
};
|