2025-07-04 18:47:49 +08:00
|
|
|
|
#ifndef MEASURESETTINGDLG_H
|
|
|
|
|
|
#define MEASURESETTINGDLG_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
2025-11-05 18:14:31 +08:00
|
|
|
|
#include <QButtonGroup>
|
2026-03-13 08:31:37 +08:00
|
|
|
|
//#include "global.h"
|
|
|
|
|
|
#include "common/backend/project_model.h"
|
|
|
|
|
|
#include "common/core_model/data_transmission.h"
|
2025-07-04 18:47:49 +08:00
|
|
|
|
/*******************************************************
|
|
|
|
|
|
间隔信息
|
|
|
|
|
|
********************************************************/
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
|
namespace Ui { class measureSettingDlg; }
|
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
|
|
class BayInfoDlg;
|
2026-01-23 17:39:46 +08:00
|
|
|
|
class BayMeasureDlg;
|
2025-07-04 18:47:49 +08:00
|
|
|
|
|
|
|
|
|
|
class MeasureSettingDlg : public QDialog
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
MeasureSettingDlg(QWidget *parent = nullptr);
|
|
|
|
|
|
~MeasureSettingDlg();
|
|
|
|
|
|
|
|
|
|
|
|
void initial();
|
2026-01-23 17:39:46 +08:00
|
|
|
|
void setParentType(int n) {_nParentType = n;}
|
|
|
|
|
|
void setBayComponent(BayInfoDlg* p) {_pBayComponent = p;}
|
|
|
|
|
|
void setBayMeasure(BayMeasureDlg* p) {_pBayMeasure = p;}
|
2026-03-13 08:31:37 +08:00
|
|
|
|
void showDlg(int type,PropertyStateInfo,bool isDouble = false);
|
|
|
|
|
|
void showDlg(MeasurementInfo,PropertyStateInfo,bool isDouble = false,MeasurementInfo symmetryInfo = MeasurementInfo()); //修改
|
2025-07-04 18:47:49 +08:00
|
|
|
|
public slots:
|
|
|
|
|
|
void onOkClicked();
|
|
|
|
|
|
void onCancelClicked();
|
|
|
|
|
|
void onTagChanged(const QString&);
|
|
|
|
|
|
void onNameChanged(const QString&);
|
2025-11-05 18:14:31 +08:00
|
|
|
|
|
|
|
|
|
|
void onRuleIndexChanged(int); //通信方式改变时
|
|
|
|
|
|
void onTypeIndexChanged(int); //量测类型改变时
|
|
|
|
|
|
|
|
|
|
|
|
void onAddParaClicked();
|
|
|
|
|
|
void onDelParaClicked();
|
|
|
|
|
|
void onEventStrategyChange(int); //事件策略改变
|
2025-12-19 18:28:13 +08:00
|
|
|
|
|
|
|
|
|
|
void onHttpDataUpdated(HttpRecommandInfo); //更新推荐对象列表(若有)
|
2025-07-04 18:47:49 +08:00
|
|
|
|
private:
|
|
|
|
|
|
void clearData();
|
2026-01-16 18:40:46 +08:00
|
|
|
|
//void setDbCheckVisible(bool); //设置double勾选可见性
|
|
|
|
|
|
void setDbTagVisible(bool); //设置double tag可见性
|
|
|
|
|
|
QJsonObject safeToJsonObject(const QVariant& var); //var转json
|
2025-07-04 18:47:49 +08:00
|
|
|
|
private:
|
|
|
|
|
|
Ui::measureSettingDlg *ui;
|
2026-01-23 17:39:46 +08:00
|
|
|
|
BayInfoDlg* _pBayComponent; //component中的bay(元件父)
|
|
|
|
|
|
BayMeasureDlg* _pBayMeasure; //间隔父
|
2025-11-05 18:14:31 +08:00
|
|
|
|
|
|
|
|
|
|
QButtonGroup* _pEventStrategy; //事件策略组
|
|
|
|
|
|
QButtonGroup* _pEventYXGroup; //遥信事件组
|
|
|
|
|
|
bool _curMode; //0新增1修改
|
2026-01-16 18:40:46 +08:00
|
|
|
|
|
|
|
|
|
|
QMap<int,CtExtraInfo> _tempCtMap;
|
|
|
|
|
|
QMap<int,PtExtraInfo> _tempPtMap;
|
|
|
|
|
|
int _curComponentType;
|
|
|
|
|
|
bool _isDouble = false;
|
2026-01-23 17:39:46 +08:00
|
|
|
|
int _nParentType = 0; //所属父类型 0元件 1间隔
|
2025-07-04 18:47:49 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|