66 lines
2.2 KiB
C++
66 lines
2.2 KiB
C++
#ifndef MEASURESETTINGDLG_H
|
||
#define MEASURESETTINGDLG_H
|
||
|
||
#include <QDialog>
|
||
#include <QButtonGroup>
|
||
#include "global.h"
|
||
/*******************************************************
|
||
间隔信息
|
||
********************************************************/
|
||
QT_BEGIN_NAMESPACE
|
||
namespace Ui { class measureSettingDlg; }
|
||
QT_END_NAMESPACE
|
||
|
||
class BayInfoDlg;
|
||
class BayMeasureDlg;
|
||
|
||
class MeasureSettingDlg : public QDialog
|
||
{
|
||
Q_OBJECT
|
||
public:
|
||
MeasureSettingDlg(QWidget *parent = nullptr);
|
||
~MeasureSettingDlg();
|
||
|
||
void initial();
|
||
void setParentType(int n) {_nParentType = n;}
|
||
void setBayComponent(BayInfoDlg* p) {_pBayComponent = p;}
|
||
void setBayMeasure(BayMeasureDlg* p) {_pBayMeasure = p;}
|
||
void showDlg(int type,propertyStateInfo,bool isDouble = false);
|
||
void showDlg(MeasurementInfo,propertyStateInfo,bool isDouble = false,MeasurementInfo symmetryInfo = MeasurementInfo()); //修改
|
||
public slots:
|
||
void onOkClicked();
|
||
void onCancelClicked();
|
||
void onTagChanged(const QString&);
|
||
void onNameChanged(const QString&);
|
||
|
||
void onRuleIndexChanged(int); //通信方式改变时
|
||
void onTypeIndexChanged(int); //量测类型改变时
|
||
|
||
void onAddParaClicked();
|
||
void onDelParaClicked();
|
||
void onEventStrategyChange(int); //事件策略改变
|
||
|
||
void onHttpDataUpdated(HttpRecommandInfo); //更新推荐对象列表(若有)
|
||
private:
|
||
void clearData();
|
||
//void setDbCheckVisible(bool); //设置double勾选可见性
|
||
void setDbTagVisible(bool); //设置double tag可见性
|
||
QJsonObject safeToJsonObject(const QVariant& var); //var转json
|
||
private:
|
||
Ui::measureSettingDlg *ui;
|
||
BayInfoDlg* _pBayComponent; //component中的bay(元件父)
|
||
BayMeasureDlg* _pBayMeasure; //间隔父
|
||
|
||
QButtonGroup* _pEventStrategy; //事件策略组
|
||
QButtonGroup* _pEventYXGroup; //遥信事件组
|
||
bool _curMode; //0新增1修改
|
||
|
||
QMap<int,CtExtraInfo> _tempCtMap;
|
||
QMap<int,PtExtraInfo> _tempPtMap;
|
||
int _curComponentType;
|
||
bool _isDouble = false;
|
||
int _nParentType = 0; //所属父类型 0元件 1间隔
|
||
};
|
||
|
||
#endif
|