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.
nmWATI/Include/iGui/iGuiConfigBase/iWxConfigBase.h

111 lines
2.7 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#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);
// 从各个Wxm_vecWxDatas中遍历查找
virtual bool setParaValue(QString sPara, float f);
virtual bool getParaValue(QString sPara, float& 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;
};