GridFrame/diagramCavas/include/measureSettingDlg.h

74 lines
2.5 KiB
C
Raw Normal View History

2026-03-23 11:11:55 +08:00
#ifndef MEASURESETTINGDLG_H
#define MEASURESETTINGDLG_H
#include <QDialog>
#include <QButtonGroup>
//#include "global.h"
#include "common/backend/project_model.h"
#include "common/core_model/data_transmission.h"
/*******************************************************
********************************************************/
QT_BEGIN_NAMESPACE
namespace Ui { class measureSettingDlg; }
QT_END_NAMESPACE
class BayInfoDlg;
class BayMeasureDlg;
2026-05-18 19:12:28 +08:00
class TitleBar;
2026-05-22 16:08:15 +08:00
class QSizeGrip;
2026-03-23 11:11:55 +08:00
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
2026-05-22 16:08:15 +08:00
protected:
void resizeEvent(QResizeEvent *);
2026-03-23 11:11:55 +08:00
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间隔
2026-05-18 19:12:28 +08:00
TitleBar* m_titleBar;
2026-05-22 16:08:15 +08:00
QSizeGrip* _pSizeGrip;
2026-03-23 11:11:55 +08:00
};
#endif