DiagramDesigner/diagramCavas/include/diagramEditor/diagramEditorTransDetailSet...

64 lines
2.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef DIAGRAMEDITORTRANSDETAILSETTINGDLG_H
#define DIAGRAMEDITORTRANSDETAILSETTINGDLG_H
#include <QDialog>
#include "global.h"
QT_BEGIN_NAMESPACE
namespace Ui { class diagramEditorTransDetailSettingDlg; }
QT_END_NAMESPACE
class DiagramEditorWizard;
class DiagramEditorTransDetailAddDlg;
class DiagramEditorTransformerBlock;
class DiagramEditorTransPreviewDlg;
class DiagramEditorModel;
class QTableView;
class DiagramEditorTransDetailSettingDlg : public QDialog
{
Q_OBJECT
public:
DiagramEditorTransDetailSettingDlg(QWidget *parent = nullptr);
~DiagramEditorTransDetailSettingDlg();
void initial();
void refreshModel(); //刷新view显示的model
void showDlg(DiagramEditorTransformerBlock*);
void setWizard(DiagramEditorWizard* p) {_pWizard = p;}
QStandardItemModel* getComponentModel() {return _compoModel;}
QMap<int,QStandardItemModel*> getRouteModels() {return _routeModels;}
//void setRouteMaps(QMap<int,QMap<QString,DiagramEditorRouteInfo>> map) {_mapsRouteInfo = map;}
//QMap<int,QMap<QString,DiagramEditorRouteInfo>>& getRouteMaps(){return _mapsRouteInfo;}
void setTransInfo(DiagramEditorTransInfo info){_transInfo = info;}
DiagramEditorTransInfo& getTransInfo(){return _transInfo;}
void setModelDelegate(DiagramEditorModel* p){_pModel = p;}
DiagramEditorModel* getModel() {return _pModel;}
DiagramEditorTransformerBlock* getCurBlock(){return _curOperateObj;}
DiagramEditorWizard* getWizard() {return _pWizard;}
public slots:
void onAddClicked();
void onOkClicked();
void onCancelClicked();
void onRouteDeleteClicked();
void onRouteRbtnClicked(const QPoint &pos); //线路右键菜单
void onRouteEditClicked();
void onPreviewNeutralClicked(); //中性点成套装置预览
void onPreviewTransClicked(); //预览变压器
private:
Ui::diagramEditorTransDetailSettingDlg *ui;
DiagramEditorTransDetailAddDlg* _pAddDlg;
DiagramEditorTransPreviewDlg* _pPreviewDlg;
DiagramEditorWizard* _pWizard;
DiagramEditorTransformerBlock* _curOperateObj; //当前加载的block对象
QStandardItemModel* _compoModel; //设备库model name中的data:1为占用方向,2为相对坐标,3为uuid,4为item标志位(1新建2修改)5旋转角度
QMap<int,QStandardItemModel*> _routeModels; //中性点拓扑,0,1,2高中低
//QMap<int,QMap<QString,DiagramEditorRouteInfo>> _mapsRouteInfo; //中性点线路信息 int:0高1中2低
DiagramEditorTransInfo _transInfo; //变压器信息
DiagramEditorModel* _pModel;
QTableView* _curOperateRouteView; //当前操作的中性点拓扑view
};
#endif