|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iDlgBase.h"
|
|
|
|
|
#include "iGuiConfigBase_global.h"
|
|
|
|
|
|
|
|
|
|
class iParaItemCtrl;
|
|
|
|
|
//class ZxDataWell;
|
|
|
|
|
class X_GUI_CONFIGBASE_EXPORT iWxConfigBase : public iDlgBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iWxConfigBase(QWidget *parent = 0);
|
|
|
|
|
~iWxConfigBase();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 显示模式
|
|
|
|
|
void setCwt(ConfigWxType o);
|
|
|
|
|
ConfigWxType getCwt();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
//virtual void setDataWell(ZxDataWell* p);
|
|
|
|
|
|
|
|
|
|
virtual QMap<QString, iParaItemCtrl*>* getMapParaCtrls();
|
|
|
|
|
|
|
|
|
|
virtual void saveCurrentByAction(QString s);
|
|
|
|
|
|
|
|
|
|
QStringList getSaveOptions();
|
|
|
|
|
|
|
|
|
|
virtual bool isUILoaded();
|
|
|
|
|
virtual void loadUI();
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
virtual void slotBtnTriggered();
|
|
|
|
|
|
|
|
|
|
// 把
|
|
|
|
|
virtual void slotLoad();
|
|
|
|
|
virtual void slotSave();
|
|
|
|
|
virtual void slotRefresh();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI_Btns(QHBoxLayout*& pLayoutH);
|
|
|
|
|
// 执行
|
|
|
|
|
virtual bool runActionBy(QString sName);
|
|
|
|
|
|
|
|
|
|
// 建立某参数的Layout,考虑单位控件
|
|
|
|
|
virtual iParaItemCtrl* createParaCtrl(QString sPara,
|
|
|
|
|
bool bUnitEditable = true,
|
|
|
|
|
bool bShowScale = true,
|
|
|
|
|
bool bStrench = true,
|
|
|
|
|
VecInt* pVecStrenchRatios = NULL,
|
|
|
|
|
int nSpacing = 4,
|
|
|
|
|
int nMarginL = 20,
|
|
|
|
|
int nMarginR = 20);
|
|
|
|
|
|
|
|
|
|
// 从各个Wx(m_vecWxDatas)中遍历查找
|
|
|
|
|
virtual bool setParaValue(QString sPara, double f);
|
|
|
|
|
virtual bool getParaValue(QString sPara, double& f);
|
|
|
|
|
// 返回所有参数,Key为英文ID
|
|
|
|
|
virtual bool getAllParaValues(QMap<QString, double>& map,
|
|
|
|
|
bool bOnlyFitted = false,
|
|
|
|
|
bool bClearMap = true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
// 当参数改变时触发,通知后续窗体
|
|
|
|
|
void signalParasChanged(QMap<QString, QVariant>& map);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
// 当前面窗体参数改变时,本窗体响应
|
|
|
|
|
virtual void slotParasObtained(QMap<QString, QVariant>& map);
|
|
|
|
|
|
|
|
|
|
// 响应ParaCtrl数据的改变
|
|
|
|
|
void slotParaCtrlValueChanged(QString sPara, QVariant o);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 类型
|
|
|
|
|
ConfigWxType m_oCwt;
|
|
|
|
|
|
|
|
|
|
// 单个保存时的下拉选项
|
|
|
|
|
QStringList m_listSaveOptions;
|
|
|
|
|
|
|
|
|
|
// 对于单位类的控件进行管理
|
|
|
|
|
QMap<QString, iParaItemCtrl*> m_mapParaCtrls;
|
|
|
|
|
|
|
|
|
|
// 当前井
|
|
|
|
|
//ZxDataWell* m_pDataWell;
|
|
|
|
|
|
|
|
|
|
// Buttons
|
|
|
|
|
QStringList m_listBtnNames;
|
|
|
|
|
QStringList m_listBtnTexts;
|
|
|
|
|
QStringList m_listBtnIcons;
|
|
|
|
|
QStringList m_listBtnTips;
|
|
|
|
|
|
|
|
|
|
// 临时
|
|
|
|
|
bool m_bLoaded;
|
|
|
|
|
};
|