65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
#ifndef MEASURESETTINGDLG_H
|
|
#define MEASURESETTINGDLG_H
|
|
|
|
#include <QDialog>
|
|
#include <QButtonGroup>
|
|
/*******************************************************
|
|
间隔信息
|
|
********************************************************/
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class measureSettingDlg; }
|
|
QT_END_NAMESPACE
|
|
|
|
class BayInfoDlg;
|
|
struct MeasurementInfo;
|
|
struct HttpRecommandInfo;
|
|
struct propertyStateInfo;
|
|
struct CtExtraInfo;
|
|
struct PtExtraInfo;
|
|
|
|
class MeasureSettingDlg : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MeasureSettingDlg(QWidget *parent = nullptr);
|
|
~MeasureSettingDlg();
|
|
|
|
void initial();
|
|
void setBay(BayInfoDlg* p) {_pBay = p;}
|
|
void showDlg(int type,propertyStateInfo,bool isDouble = false);
|
|
void showDlg(MeasurementInfo,propertyStateInfo,bool isDouble = false); //修改
|
|
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* _pBay;
|
|
|
|
QButtonGroup* _pEventStrategy; //事件策略组
|
|
QButtonGroup* _pEventYXGroup; //遥信事件组
|
|
bool _curMode; //0新增1修改
|
|
|
|
QMap<int,CtExtraInfo> _tempCtMap;
|
|
QMap<int,PtExtraInfo> _tempPtMap;
|
|
int _curComponentType;
|
|
bool _isDouble = false;
|
|
};
|
|
|
|
#endif
|