fix exit crash
This commit is contained in:
parent
023348c7ef
commit
947c1a6858
|
|
@ -1,9 +1,21 @@
|
|||
#include "types.h"
|
||||
|
||||
const QMap<AbstractItemType,GraphicsItemType> linkType = {
|
||||
{AIT_motor,GIT_itemRect},{AIT_bus,GIT_bus},
|
||||
const QMap<AbstractItemType, GraphicsItemType>& getLinkType() {
|
||||
static const QMap<AbstractItemType, GraphicsItemType> linkType = {
|
||||
{AIT_motor, GIT_itemRect},
|
||||
{AIT_bus, GIT_bus},
|
||||
};
|
||||
return linkType;
|
||||
}
|
||||
|
||||
// 类型转换
|
||||
const QMap<int, GraphicsItemType>& getTypeToProGraphic() {
|
||||
static const QMap<int, GraphicsItemType> typeToProGraphic = {
|
||||
{0, GIT_node}, {1, GIT_bus}, {3, GIT_itemRect}, {4, GIT_ctGroup},
|
||||
{5, GIT_ptGroup}, {6, GIT_ES}, {7, GIT_FES}, {8, GIT_link},
|
||||
{9, GIT_DS}, {10, GIT_DTEDS}, {11, GIT_PI}, {12, GIT_LA},
|
||||
{13, GIT_cableTer}, {14, GIT_cableEnd}, {15, GIT_2wTransformer},
|
||||
{16, GIT_3wTransformer}, {18, GIT_CustomType}
|
||||
};
|
||||
//类型转换
|
||||
const QMap<int,GraphicsItemType> typeToProGraphic = {
|
||||
{0,GIT_node},{1,GIT_bus},{3,GIT_itemRect},{4,GIT_ctGroup},{5,GIT_ptGroup},{6,GIT_ES},{7,GIT_FES},{8,GIT_link},{9,GIT_DS},{10,GIT_DTEDS},{11,GIT_PI},{12,GIT_LA},{13,GIT_cableTer},{14,GIT_cableEnd},{15,GIT_2wTransformer},{16,GIT_3wTransformer},{18,GIT_CustomType}
|
||||
};
|
||||
return typeToProGraphic;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,9 @@ enum class ComponentType {
|
|||
CableEnd = 14 // 电缆端
|
||||
};
|
||||
|
||||
extern const QMap<AbstractItemType,GraphicsItemType> linkType;
|
||||
//extern const QMap<AbstractItemType,GraphicsItemType> linkType;
|
||||
extern const QMap<AbstractItemType, GraphicsItemType>& getLinkType();
|
||||
//类型转换
|
||||
extern const QMap<int,GraphicsItemType> typeToProGraphic;
|
||||
//extern const QMap<int,GraphicsItemType> typeToProGraphic;
|
||||
extern const QMap<int, GraphicsItemType>& getTypeToProGraphic();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class BayManagerContentDlg;
|
|||
class FixedPortsModel;
|
||||
class BayProperty;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class BayManagerDlg : public QDialog
|
||||
{
|
||||
|
|
@ -33,11 +34,14 @@ public slots:
|
|||
void onListItemClicked(QListWidgetItem *item);
|
||||
private:
|
||||
void generatePage(QList<BayProperty*>); //生成间隔页 <间隔列表>
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::bayManagerDlg *ui;
|
||||
FixedPortsModel* _modelController;
|
||||
QMap<int,BayManagerContentDlg*> _contentData; //<stack index,bay page>
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class QPropertyHandle;
|
|||
struct DataSourceType;
|
||||
class QListWidgetItem;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DataSourceDlg : public QDialog
|
||||
{
|
||||
|
|
@ -55,6 +56,8 @@ private:
|
|||
void expandToNodeByCode(const QString& code,QStandardItemModel* model); //根据属性code展开树到指定节点
|
||||
void selectListItemByCode(const QString& code); //在listWidget中选中指定code的项
|
||||
QStandardItem* findCategoryNodeByPropertyCode(QStandardItem* item, const QString& code);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::dataSourceDlg *ui;
|
||||
QStandardItemModel* _treeModel;
|
||||
|
|
@ -64,6 +67,7 @@ private:
|
|||
QListWidgetItem* _curProperty; //当前属性
|
||||
QString m_targetPropertyCode; //打开的目标code
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ QT_END_NAMESPACE
|
|||
|
||||
struct ChannelConfig;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramConnectSetting : public QDialog
|
||||
{
|
||||
|
|
@ -32,9 +33,12 @@ public slots:
|
|||
private:
|
||||
void initial();
|
||||
void updateByConfig(ChannelConfig,int nType = 0); //0http 1websocket
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramConnectSetting *ui;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ QT_END_NAMESPACE
|
|||
|
||||
class DiagramEditorModel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class ConfirmEditorDlg : public QDialog
|
||||
{
|
||||
|
|
@ -27,10 +28,13 @@ signals:
|
|||
public slots:
|
||||
void onOkClicked();
|
||||
void onCancelClicked();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::confirmEditorDlg *ui;
|
||||
QPointer<DiagramEditorModel> _pModel;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class DiagramEditorBayDetailSettingDlg;
|
|||
class QStandardItemModel;
|
||||
class QComboBox;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorBayDetailAddDlg : public QDialog
|
||||
{
|
||||
|
|
@ -55,6 +56,8 @@ public slots:
|
|||
void onComponentSelected(const QModelIndex &index);
|
||||
void onRouteDeleteClicked();
|
||||
void onRouteRbtnClicked(const QPoint &pos); //线路右键菜单
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramEditorBayDetailAddDlg *ui;
|
||||
QStandardItemModel* _selectedModel;
|
||||
|
|
@ -62,6 +65,7 @@ private:
|
|||
int _curMode; //0新建1修改
|
||||
QStandardItemModel* _bindItemModel; //绑定的对象模型
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class DiagramEditorBayPreviewDlg;
|
|||
class DiagramEditorModel;
|
||||
class QStandardItemModel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorBayDetailSettingDlg : public QDialog
|
||||
{
|
||||
|
|
@ -50,6 +51,8 @@ public slots:
|
|||
void onRouteDeleteClicked();
|
||||
void onRouteRbtnClicked(const QPoint &pos); //线路右键菜单
|
||||
void onRouteEditClicked();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramEditorBayDetailSettingDlg *ui;
|
||||
DiagramEditorBayDetailAddDlg* _pAddDlg;
|
||||
|
|
@ -61,6 +64,7 @@ private:
|
|||
DiagramEditorBayInfo _curBayInfo; //当前使用的间隔信息
|
||||
DiagramEditorModel* _pModel;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class DiagramEditorWizard;
|
|||
class DiagramEditorBayBlock;
|
||||
class QListWidgetItem;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorBaySettingDlg : public QDialog
|
||||
{
|
||||
|
|
@ -32,6 +33,8 @@ public slots:
|
|||
void onCancelClicked();
|
||||
void onConnectLevelChanged(const QString&); //连接层级改变信号
|
||||
void onListItemClicked(QListWidgetItem *item);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramEditorBaySettingDlg *ui;
|
||||
DiagramEditorWizard* _pWizard;
|
||||
|
|
@ -39,6 +42,7 @@ private:
|
|||
DiagramEditorBayBlock* _curOperateBlock; //当前修改对象
|
||||
int _curLevel; //当前层级
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ public:
|
|||
void initial();
|
||||
void showDlg();
|
||||
void setParent(EditPanel* p) {_pParent = p;}
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
private:
|
||||
EditView* _pView;
|
||||
EditPreviewScene* _pScene;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ QT_END_NAMESPACE
|
|||
class DiagramEditorTransDetailSettingDlg;
|
||||
class QComboBox;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorTransDetailAddDlg : public QDialog
|
||||
{
|
||||
|
|
@ -54,6 +55,8 @@ public slots:
|
|||
void onComponentRbtnClicked(const QPoint &pos);
|
||||
void onRouteDeleteClicked();
|
||||
void onRouteRbtnClicked(const QPoint &pos); //线路右键菜单
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramEditorTransDetailAddDlg *ui;
|
||||
QStandardItemModel* _selectedModel;
|
||||
|
|
@ -62,6 +65,7 @@ private:
|
|||
int _curType; //当前回路类型 0高压中性点1中2低
|
||||
QStandardItemModel* _bindItemModel; //绑定的对象模型
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class DiagramEditorTransPreviewDlg;
|
|||
class DiagramEditorModel;
|
||||
class QTableView;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorTransDetailSettingDlg : public QDialog
|
||||
{
|
||||
|
|
@ -48,6 +49,8 @@ public slots:
|
|||
void onRouteDeleteClicked();
|
||||
void onRouteRbtnClicked(const QPoint &pos); //线路右键菜单
|
||||
void onRouteEditClicked();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramEditorTransDetailSettingDlg *ui;
|
||||
DiagramEditorTransDetailAddDlg* _pAddDlg;
|
||||
|
|
@ -61,6 +64,7 @@ private:
|
|||
DiagramEditorModel* _pModel;
|
||||
QTableView* _curOperateRouteView; //当前操作的中性点拓扑view
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ QT_END_NAMESPACE
|
|||
class DiagramEditorWizard;
|
||||
class DiagramEditorTransformerBlock;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorTransSettingDlg : public QDialog
|
||||
{
|
||||
|
|
@ -32,6 +33,8 @@ public slots:
|
|||
void onConnectLevelChanged(const QString&); //连接层级改变信号
|
||||
void onBayTypeChanged(int n);
|
||||
void onTableItemSelected();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::diagramEditorTransSettingDlg *ui;
|
||||
DiagramEditorWizard* _pWizard;
|
||||
|
|
@ -39,6 +42,7 @@ private:
|
|||
DiagramEditorTransformerBlock* _curOperateBlock; //当前修改对象
|
||||
QList<QString> _prepareDisconnectBlock; //准备断开的连接间隔
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class QListWidgetItem;
|
|||
class DiagramEditorBaySettingDlg;
|
||||
class DiagramEditorTransSettingDlg;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class DiagramEditorWizard : public QDialog
|
||||
{
|
||||
|
|
@ -46,6 +47,8 @@ public slots:
|
|||
void onTransIndexRbtnClicked(const QPoint &pos); //变压器列表右键菜单
|
||||
|
||||
void onBayListSelected(QListWidgetItem* pItem); //baylist选择事件
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
public:
|
||||
QMap<int,DiagramEditorWizardBusInfo> getMapBusInfo() {return _mapBus;}
|
||||
QMap<int,QList<DiagramEditorStructContainer*>>& getContainerStruct(){return _mapSturctContainer;}
|
||||
|
|
@ -88,6 +91,7 @@ private:
|
|||
QMap<int,QList<DiagramEditorStructContainer*>> _mapSturctContainer; //划分后的区块
|
||||
QMap<QUuid,DiagramEditorBriefConnect> _mapConnect; //连接列表
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ private:
|
|||
void emitTopologySignals();
|
||||
signals:
|
||||
void panelDelete(const QString&,int);
|
||||
void previewSelected(EditPanel*); //预览选中事件
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *closeEvent);
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ private:
|
|||
QPoint getComponentPosition(const QString& componentName,
|
||||
Context& context);
|
||||
void updateComponent(DiagramEditorComponentInfo& compo,
|
||||
Direction dir,
|
||||
int dir,
|
||||
const QPoint& position,
|
||||
int rotate,
|
||||
Context& context);
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ public:
|
|||
return (usedFlags & static_cast<int>(dir)) != 0;
|
||||
}
|
||||
|
||||
static int markDirectionOccupied(int usedFlags, Direction dir) {
|
||||
return usedFlags | static_cast<int>(dir);
|
||||
static int markDirectionOccupied(int usedFlags, int dir) {
|
||||
return usedFlags | dir;
|
||||
}
|
||||
|
||||
static QPoint getIncrement(Direction dir, int hSpacing, int vSpacing) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ QT_END_NAMESPACE
|
|||
class GraphicsProjectModelItem;
|
||||
class FixedPortsModel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class ItemPropertyDlg : public QDialog
|
||||
{
|
||||
|
|
@ -39,6 +40,8 @@ public slots:
|
|||
void onGroupSelected(const QString&);
|
||||
|
||||
void onHttpDataUpdated(HttpRecommandInfo); //更新推荐列表
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::itemPropertyDlg *ui;
|
||||
|
||||
|
|
@ -55,6 +58,7 @@ private:
|
|||
FixedPortsModel* _curModelController;
|
||||
QString _curGroup; //当前属性组
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ QT_END_NAMESPACE
|
|||
class BayInfoDlg;
|
||||
class BayMeasureDlg;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class MeasureSettingDlg : public QDialog
|
||||
{
|
||||
|
|
@ -49,6 +50,8 @@ private:
|
|||
//void setDbCheckVisible(bool); //设置double勾选可见性
|
||||
void setDbTagVisible(bool); //设置double tag可见性
|
||||
QJsonObject safeToJsonObject(const QVariant& var); //var转json
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::measureSettingDlg *ui;
|
||||
BayInfoDlg* _pBayComponent; //component中的bay(元件父)
|
||||
|
|
@ -64,6 +67,7 @@ private:
|
|||
bool _isDouble = false;
|
||||
int _nParentType = 0; //所属父类型 0元件 1间隔
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ struct MonitorItemAttributeInfo;
|
|||
class QCompleter;
|
||||
class QStringListModel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class MonitorConfigDlg : public QDialog
|
||||
{
|
||||
|
|
@ -40,6 +41,7 @@ public slots:
|
|||
void onConnectParamChanged(const QString&); //连接参数变化事件(发送推荐查询)
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
private:
|
||||
void savePropertyData(const QModelIndex ¤t,QUuid uid); //保存属性到uid的属性
|
||||
void loadPropertyData(const QModelIndex ¤t,QUuid uid);
|
||||
|
|
@ -54,6 +56,7 @@ private:
|
|||
QCompleter* _recommandCompleter; //自动填充器
|
||||
QStringListModel* _strLstModel; //自动填充模型
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class QGridLayout;
|
|||
class MonitorAttributeGroupDlg;
|
||||
class MonitorPanel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class MonitorDetailAttributeDlg : public QDialog
|
||||
{
|
||||
|
|
@ -31,6 +32,8 @@ public:
|
|||
public slots:
|
||||
void onCloseClicked();
|
||||
void onColChanged(const QString&);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::monitorDetailAttributeDlg *ui;
|
||||
int _curColNum; //当前每行的列数
|
||||
|
|
@ -39,6 +42,7 @@ private:
|
|||
MonitorPanel* _pParent;
|
||||
QUuid _curId;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ QT_END_NAMESPACE
|
|||
|
||||
class MonitorPanel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class MonitorDisplaySettingDlg : public QDialog
|
||||
{
|
||||
|
|
@ -44,6 +45,8 @@ private:
|
|||
|
||||
// 辅助方法
|
||||
bool validateCurrentDeviceState() const;
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::monitorDisplaySettingDlg *ui;
|
||||
MonitorPanel* _parent;
|
||||
|
|
@ -54,6 +57,7 @@ private:
|
|||
QString _curModel;
|
||||
QMap<MonitorItemTypeStruct,QMap<MonitorItemStateStruct,MonitorItemDisplayInfo>> _tempSetting;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ QT_END_NAMESPACE
|
|||
|
||||
class FixedPortsModel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class ProjectDiagramNameInput : public QDialog
|
||||
{
|
||||
|
|
@ -25,10 +26,13 @@ public slots:
|
|||
void onOkClicked();
|
||||
void onCancelClicked();
|
||||
void onNameEdited(const QString&);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::projectDiagramNameInput *ui;
|
||||
FixedPortsModel* _model;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
class FixedPortsModel;
|
||||
class GraphicsProjectModelItem;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class projectIconSetting; }
|
||||
|
|
@ -27,6 +28,8 @@ public:
|
|||
public slots:
|
||||
void onOkClicked();
|
||||
void onCellClicked(int row,int col);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::projectIconSetting *ui;
|
||||
QSize _iconSize;
|
||||
|
|
@ -34,6 +37,7 @@ private:
|
|||
QString _sMetaModel;
|
||||
QString _sModel;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class GraphicsBaseModelItem;
|
|||
class BaseModelProperty;
|
||||
class FixedPortsModel;
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class ProjectModelSetting : public QDialog
|
||||
{
|
||||
|
|
@ -40,12 +41,15 @@ public slots:
|
|||
private:
|
||||
void showTestPic(QByteArray);
|
||||
void loadModel(const QString&);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::projectModelSetting *ui;
|
||||
FixedPortsModel* _controller;
|
||||
BaseModelProperty* _curItemData; //当前操作对象的属性
|
||||
QString _curPath;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class StructDataMeasurementDelegate;
|
|||
class QStatusBar;
|
||||
class QCompleter;
|
||||
class QStringListModel;
|
||||
class QSizeGrip;
|
||||
|
||||
class StructDataPreviewDlg : public QDialog
|
||||
{
|
||||
|
|
@ -105,6 +106,7 @@ private:
|
|||
QStringList _curRecommandLst; //当前推荐列表
|
||||
QCompleter* _recommandCompleter; //自动填充器
|
||||
QStringListModel* _strLstModel; //自动填充模型
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
#include "graphicsDataModel/fixedPortsModel.h"
|
||||
#include "ui_bayManagerDlg.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
BayManagerDlg::BayManagerDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::bayManagerDlg)
|
||||
,_modelController(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -25,6 +27,8 @@ void BayManagerDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("间隔管理");
|
||||
ui->verticalLayout_2->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&BayManagerDlg::onOkClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&BayManagerDlg::onCancelClicked);
|
||||
|
|
@ -101,3 +105,8 @@ void BayManagerDlg::generatePage(QList<BayProperty*> lstBay)
|
|||
if(ui->stackedWidget->count() != 0)
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void BayManagerDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "propertyType/dataSourceType.h"
|
||||
#include <QTimer>
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DataSourceDlg::DataSourceDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -15,6 +16,7 @@ DataSourceDlg::DataSourceDlg(QWidget *parent)
|
|||
,m_currentCategoryItem(nullptr)
|
||||
,_pExtraProManager(nullptr)
|
||||
,_curProperty(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setModal(true);
|
||||
|
|
@ -33,6 +35,8 @@ void DataSourceDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("数据源选择");
|
||||
ui->verticalLayout_4->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&DataSourceDlg::onOkClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&DataSourceDlg::onCancelClicked);
|
||||
|
|
@ -650,3 +654,7 @@ QString DataSourceDlg::getLevelType(int index) {
|
|||
}
|
||||
}
|
||||
|
||||
void DataSourceDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -662,6 +662,19 @@ EditPanel* DiagramCavas::onSignal_addEditPanel(QString sName)
|
|||
pPanel->setCavas(this);
|
||||
DiagramEditorModel* pModel = pPanel->getModel();
|
||||
connect(pPanel,&EditPanel::panelDelete,this,&DiagramCavas::onSignal_panelDelete);
|
||||
connect(pPanel,&EditPanel::previewSelected,this,[&](EditPanel* p){
|
||||
QString sObj;
|
||||
// 反向查找
|
||||
for (auto it = m_mapEditPanel.constBegin(); it != m_mapEditPanel.constEnd(); ++it) {
|
||||
if (it.value().first == p) {
|
||||
// 找到匹配的sub
|
||||
sObj = it.key();
|
||||
setActiveSubWindow(m_mapEditPanel[sObj].second);
|
||||
emit pannelSelected(sObj,0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(pModel){
|
||||
connect(pModel,&DiagramEditorModel::updateTopologyItems,this,&DiagramCavas::onSignal_updateTopology);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@
|
|||
#include "uiCommunicationBus.h"
|
||||
#include "communicationManager.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramConnectSetting::DiagramConnectSetting(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::diagramConnectSetting)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -24,6 +26,8 @@ void DiagramConnectSetting::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("网络连接设置");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_testRecommand,&QPushButton::clicked,this,&DiagramConnectSetting::onTestHttpRecommandClicked);
|
||||
connect(ui->btn_testData,&QPushButton::clicked,this,&DiagramConnectSetting::onTestHttpDataClicked);
|
||||
|
|
@ -118,3 +122,8 @@ void DiagramConnectSetting::onCancelClicked()
|
|||
{
|
||||
hide();
|
||||
}
|
||||
|
||||
void DiagramConnectSetting::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
#include "diagramEditor/confirmEditorDlg.h"
|
||||
#include <QDateTime>
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
ConfirmEditorDlg::ConfirmEditorDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::confirmEditorDlg)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -23,6 +25,8 @@ void ConfirmEditorDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("保存拓扑");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&ConfirmEditorDlg::onOkClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&ConfirmEditorDlg::onCancelClicked);
|
||||
|
|
@ -52,3 +56,7 @@ void ConfirmEditorDlg::onCancelClicked()
|
|||
hide();
|
||||
}
|
||||
|
||||
void ConfirmEditorDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "diagramEditor/diagramEditorWizard.h"
|
||||
#include "include/instance/baseTypeManager.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorBayDetailAddDlg::DiagramEditorBayDetailAddDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -15,6 +16,7 @@ DiagramEditorBayDetailAddDlg::DiagramEditorBayDetailAddDlg(QWidget *parent)
|
|||
,_selectedModel(nullptr)
|
||||
,_pParent(nullptr)
|
||||
,_bindItemModel(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -32,6 +34,8 @@ void DiagramEditorBayDetailAddDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("新增线路");
|
||||
ui->gridLayout_2->addWidget(m_titleBar, 0, 0, 1, 2); //占两列
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_curMode = 0;
|
||||
_selectedModel = new QStandardItemModel(this);
|
||||
|
|
@ -834,3 +838,8 @@ void DiagramEditorBayDetailAddDlg::onRouteRbtnClicked(const QPoint &pos)
|
|||
// 在点击位置显示菜单
|
||||
menu.exec(ui->tableView_selected->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void DiagramEditorBayDetailAddDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include "topologyManager.h"
|
||||
#include <QTimer>
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorBayDetailSettingDlg::DiagramEditorBayDetailSettingDlg(QWidget *parent,DiagramEditorModel* pModel)
|
||||
: QDialog(parent)
|
||||
|
|
@ -23,6 +24,7 @@ DiagramEditorBayDetailSettingDlg::DiagramEditorBayDetailSettingDlg(QWidget *pare
|
|||
,_pPreviewDlg(nullptr)
|
||||
,_pModel(pModel)
|
||||
,_pWizard(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -41,6 +43,8 @@ void DiagramEditorBayDetailSettingDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("间隔详细设置");
|
||||
ui->verticalLayout_2->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_compoModel = new QStandardItemModel(this);
|
||||
_routeModel = new QStandardItemModel(this);
|
||||
|
|
@ -458,3 +462,8 @@ void DiagramEditorBayDetailSettingDlg::onRouteModified(QMap<QString, DiagramEdit
|
|||
calculateParent(mapRoute, routeOrder, route);
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramEditorBayDetailSettingDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,13 @@
|
|||
#include "diagramEditor/diagramEditorStructContainer.h"
|
||||
#include "diagramEditor/wizardBayContentDlg.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorBaySettingDlg::DiagramEditorBaySettingDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::diagramEditorBaySettingDlg)
|
||||
,_curOperateBlock(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -101,6 +103,8 @@ void DiagramEditorBaySettingDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("间隔设置");
|
||||
ui->verticalLayout_3->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_curModel = 0;
|
||||
_curLevel = 0;
|
||||
|
|
@ -238,3 +242,8 @@ void DiagramEditorBaySettingDlg::onListItemClicked(QListWidgetItem *item)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramEditorBaySettingDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "diagramEditor/editPanel.h"
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
#include <QMouseEvent>
|
||||
|
||||
DiagramEditorPreviewDlg::DiagramEditorPreviewDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -63,3 +64,12 @@ void DiagramEditorPreviewDlg::showDlg()
|
|||
move(x, y);
|
||||
}
|
||||
|
||||
void DiagramEditorPreviewDlg::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
emit _pParent->previewSelected(_pParent);
|
||||
}
|
||||
|
||||
QDialog::mousePressEvent(event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "diagramEditor/diagramEditorWizard.h"
|
||||
#include "include/instance/baseTypeManager.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorTransDetailAddDlg::DiagramEditorTransDetailAddDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -14,6 +15,7 @@ DiagramEditorTransDetailAddDlg::DiagramEditorTransDetailAddDlg(QWidget *parent)
|
|||
,_selectedModel(nullptr)
|
||||
,_pParent(nullptr)
|
||||
,_bindItemModel(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -31,6 +33,9 @@ void DiagramEditorTransDetailAddDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("新增线路");
|
||||
ui->gridLayout_2->addWidget(m_titleBar, 0, 0, 1, 2); //占两列
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_curMode = 0;
|
||||
_curType = 0;
|
||||
_selectedModel = new QStandardItemModel(this);
|
||||
|
|
@ -772,3 +777,8 @@ void DiagramEditorTransDetailAddDlg::onRouteRbtnClicked(const QPoint &pos)
|
|||
// 在点击位置显示菜单
|
||||
menu.exec(ui->tableView_selected->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void DiagramEditorTransDetailAddDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "diagramEditor/diagramEditorTransPreviewDlg.h"
|
||||
#include "include/instance/baseTypeManager.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorTransDetailSettingDlg::DiagramEditorTransDetailSettingDlg(QWidget *parent,DiagramEditorModel* pModel)
|
||||
: QDialog(parent)
|
||||
|
|
@ -20,6 +21,7 @@ DiagramEditorTransDetailSettingDlg::DiagramEditorTransDetailSettingDlg(QWidget *
|
|||
,_pPreviewDlg(nullptr)
|
||||
,_pModel(pModel)
|
||||
,_curOperateRouteView(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -38,6 +40,8 @@ void DiagramEditorTransDetailSettingDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("变压器设置");
|
||||
ui->verticalLayout_4->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_compoModel = new QStandardItemModel(this);
|
||||
for(int i = 0;i < 3;++i){
|
||||
|
|
@ -425,3 +429,8 @@ void DiagramEditorTransDetailSettingDlg::showPreview()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramEditorTransDetailSettingDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,13 @@
|
|||
#include "common/core_model/constants.h"
|
||||
#include <QTimer>
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorTransSettingDlg::DiagramEditorTransSettingDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::diagramEditorTransSettingDlg)
|
||||
,_curOperateBlock(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -119,6 +121,8 @@ void DiagramEditorTransSettingDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("变压器设置");
|
||||
ui->verticalLayout_3->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_curModel = 0;
|
||||
connect(ui->btn_add,&QPushButton::clicked,this,&DiagramEditorTransSettingDlg::onAddClicked);
|
||||
|
|
@ -416,3 +420,8 @@ void DiagramEditorTransSettingDlg::onTableItemSelected()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramEditorTransSettingDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "diagramEditor/diagramEditorTransSettingDlg.h"
|
||||
#include "common/core_model/constants.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
DiagramEditorWizard::DiagramEditorWizard(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -38,6 +39,8 @@ void DiagramEditorWizard::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("组态向导");
|
||||
ui->verticalLayout_3->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_bayContentDlg = new WizardBayContentDlg(this);
|
||||
_bayContentDlg->setParent(this);
|
||||
|
|
@ -1203,3 +1206,8 @@ bool DiagramEditorWizard::removeBlockByName(int nLevel,int nType,const QString&
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void DiagramEditorWizard::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ void EditPanel::showPreview()
|
|||
{
|
||||
if(!_pPreview){
|
||||
_pPreview = new DiagramEditorPreviewDlg(this);
|
||||
_pPreview->setWindowTitle(_projectName+"_"+_timeStamp);
|
||||
}
|
||||
_pPreview->showDlg();
|
||||
}
|
||||
|
|
@ -421,18 +422,14 @@ void EditPanel::closeEvent(QCloseEvent *closeEvent)
|
|||
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||
int ret = msgBox.exec();
|
||||
|
||||
switch (ret) {
|
||||
case QMessageBox::Ok:
|
||||
if (ret == QMessageBox::Ok)
|
||||
{
|
||||
emit panelDelete(_tagName,0);
|
||||
emit panelDelete(_tagName, 0);
|
||||
closeEvent->accept(); //允许关闭
|
||||
}
|
||||
break;
|
||||
case QMessageBox::Cancel:
|
||||
// Cancel was clicked
|
||||
break;
|
||||
default:
|
||||
// should never be reached
|
||||
break;
|
||||
else
|
||||
{
|
||||
closeEvent->ignore(); //阻止关闭
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,8 +115,20 @@ void DiagramLayoutEngine::layoutMainRoute(
|
|||
DiagramEditorComponentInfo& compo = components[i];
|
||||
|
||||
Direction dir = mainDir;
|
||||
if (i == components.size() - 1) {
|
||||
dir = DirectionManager::getOpposite(mainDir);
|
||||
int mainDirFlag = static_cast<int>(mainDir);
|
||||
int oppositeFlag = static_cast<int>(DirectionManager::getOpposite(mainDir));
|
||||
|
||||
if (i == 0) {
|
||||
// 队首:只占用出方向
|
||||
compo.nUsedDirection |= mainDirFlag;
|
||||
}
|
||||
else if (i == components.size() - 1) {
|
||||
// 队尾:只占用入方向
|
||||
compo.nUsedDirection |= oppositeFlag;
|
||||
}
|
||||
else {
|
||||
// 中间节点:入方向 + 出方向(一次性占满)
|
||||
compo.nUsedDirection |= (mainDirFlag | oppositeFlag);
|
||||
}
|
||||
|
||||
QPoint delta(0, 0);
|
||||
|
|
@ -132,7 +144,7 @@ void DiagramLayoutEngine::layoutMainRoute(
|
|||
int rotate = DirectionManager::getRotationAngle(mainDir);
|
||||
|
||||
// ✅ 主线方向 → 统一交给 updateComponent
|
||||
updateComponent(compo, dir, delta, rotate, context);
|
||||
updateComponent(compo, compo.nUsedDirection, delta, rotate, context); //**方向赋值重复,待修改
|
||||
|
||||
nSegIndex += (mainDir == Direction::Up || mainDir == Direction::Left)
|
||||
? -1
|
||||
|
|
@ -278,7 +290,7 @@ void DiagramLayoutEngine::layoutBranchSequence(
|
|||
int rotate =
|
||||
DirectionManager::getRotationAngle(dir);
|
||||
|
||||
updateComponent(next, nextConnectionDir,
|
||||
updateComponent(next, int(nextConnectionDir),
|
||||
nextPos, rotate, context);
|
||||
}
|
||||
}
|
||||
|
|
@ -391,7 +403,7 @@ QStandardItem* DiagramLayoutEngine::getNameItem(
|
|||
// 更新组件
|
||||
void DiagramLayoutEngine::updateComponent(
|
||||
DiagramEditorComponentInfo& compo,
|
||||
Direction dir,
|
||||
int dir,
|
||||
const QPoint& position,
|
||||
int rotate,
|
||||
Context& context) {
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ BaseProperty* FixedPortsModel::addNodeData(QUuid id,int type,QString name,QStrin
|
|||
item->setUuid(id);
|
||||
item->setModelName(modelName);
|
||||
item->setType(type);
|
||||
GraphicsItemType localType = typeToProGraphic[type]; //将通用类型转换为工程模图元
|
||||
GraphicsItemType localType = getTypeToProGraphic().value(type); //将通用类型转换为工程模图元
|
||||
item->setGraphicsType(localType);
|
||||
item->setTag(name);
|
||||
item->setName(name);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "ctExtraInfoDlg.h"
|
||||
#include "bayInfoDlg.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
ItemPropertyDlg::ItemPropertyDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -22,6 +23,7 @@ ItemPropertyDlg::ItemPropertyDlg(QWidget *parent)
|
|||
,btnGroup_(nullptr)
|
||||
,_curItem(nullptr)
|
||||
,_curModelController(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint |Qt::WindowStaysOnTopHint | windowFlags());
|
||||
|
|
@ -38,6 +40,8 @@ void ItemPropertyDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("参数设置");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
layout_ = new QVBoxLayout(ui->widget_button);
|
||||
btnGroup_ = new QButtonGroup(this);
|
||||
|
|
@ -284,3 +288,8 @@ void ItemPropertyDlg::showDlg(ModelDataInfo dataInfo,QUuid uuid,GraphicsProjectM
|
|||
onGroupSelected(str);
|
||||
show();
|
||||
}
|
||||
|
||||
void ItemPropertyDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "basePropertyManager.h"
|
||||
#include "ui_measureSettingDlg.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
MeasureSettingDlg::MeasureSettingDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -17,6 +18,7 @@ MeasureSettingDlg::MeasureSettingDlg(QWidget *parent)
|
|||
,_pEventStrategy(nullptr)
|
||||
,_pEventYXGroup(nullptr)
|
||||
,_curMode(0)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -34,6 +36,8 @@ void MeasureSettingDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("量测设置");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_pEventStrategy = new QButtonGroup(this);
|
||||
_pEventStrategy->addButton(ui->rb_eventOff,0);
|
||||
|
|
@ -684,3 +688,8 @@ void MeasureSettingDlg::onHttpDataUpdated(HttpRecommandInfo info)
|
|||
{
|
||||
//
|
||||
}
|
||||
|
||||
void MeasureSettingDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "monitorPanel.h"
|
||||
#include "uiCommunicationBus.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
MonitorConfigDlg::MonitorConfigDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -14,6 +15,7 @@ MonitorConfigDlg::MonitorConfigDlg(QWidget *parent)
|
|||
,_curItemModel(nullptr)
|
||||
,_recommandCompleter(nullptr)
|
||||
,_strLstModel(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -31,6 +33,8 @@ void MonitorConfigDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("参数设置");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
ui->treeView_item->setModel(_parent->getLstModel());
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&MonitorConfigDlg::onOkClicked);
|
||||
|
|
@ -214,6 +218,11 @@ bool MonitorConfigDlg::eventFilter(QObject *obj, QEvent *event)
|
|||
return QDialog::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
void MonitorConfigDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
||||
void MonitorConfigDlg::savePropertyData(const QModelIndex &previous,QUuid uid)
|
||||
{
|
||||
if(_tempConfig.contains(uid)){
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
#include "monitorPanel.h"
|
||||
#include "graphicsDataModel/fixedPortsModel.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
MonitorDetailAttributeDlg::MonitorDetailAttributeDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::monitorDetailAttributeDlg)
|
||||
,_pParent(nullptr)
|
||||
,m_gridLayout(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
_pParent = dynamic_cast<MonitorPanel*>(parent);
|
||||
ui->setupUi(this);
|
||||
|
|
@ -27,6 +29,8 @@ void MonitorDetailAttributeDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("属性详细信息");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
_curColNum = 2;
|
||||
connect(ui->btn_exit,&QPushButton::clicked,this,&MonitorDetailAttributeDlg::onCloseClicked);
|
||||
|
|
@ -90,3 +94,8 @@ void MonitorDetailAttributeDlg::clearAllGroup()
|
|||
}
|
||||
_curGroups.clear();
|
||||
}
|
||||
|
||||
void MonitorDetailAttributeDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@
|
|||
#include "projectModelManager.h"
|
||||
#include "projectIconSelectionDlg.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
MonitorDisplaySettingDlg::MonitorDisplaySettingDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::monitorDisplaySettingDlg)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -29,6 +31,8 @@ void MonitorDisplaySettingDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("图元状态设置");
|
||||
ui->verticalLayout_2->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_save,&QPushButton::clicked,this,&MonitorDisplaySettingDlg::onSaveClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&MonitorDisplaySettingDlg::onCancelClicked);
|
||||
|
|
@ -423,3 +427,7 @@ bool MonitorDisplaySettingDlg::validateCurrentDeviceState() const
|
|||
_tempSetting[_curType].contains(_curState);
|
||||
}
|
||||
|
||||
void MonitorDisplaySettingDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
#include "dataBase.h"
|
||||
#include "ui_projectDiagramNameInput.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
ProjectDiagramNameInput::ProjectDiagramNameInput(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::projectDiagramNameInput)
|
||||
,_model(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -24,6 +26,8 @@ void ProjectDiagramNameInput::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("组态名称设置");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&ProjectDiagramNameInput::onOkClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&ProjectDiagramNameInput::onCancelClicked);
|
||||
|
|
@ -55,3 +59,8 @@ void ProjectDiagramNameInput::onNameEdited(const QString& text)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectDiagramNameInput::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,13 @@
|
|||
#include <QSvgRenderer>
|
||||
#include <QPainter>
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
ProjectIconSetting::ProjectIconSetting(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::projectIconSetting)
|
||||
,_controller(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | windowFlags());
|
||||
|
|
@ -52,6 +54,8 @@ void ProjectIconSetting::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("工程模图标选择");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
QStringList headerText;
|
||||
headerText<<"类别"<<"图标";
|
||||
|
|
@ -141,3 +145,8 @@ void ProjectIconSetting::onCellClicked(int row,int col)
|
|||
selectImage(row);
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectIconSetting::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,16 +12,17 @@
|
|||
#include "graphicsDataModel/fixedPortsModel.h"
|
||||
#include "projectModelManager.h"
|
||||
#include "tools.h"
|
||||
//#include "global.h"
|
||||
#include "logger.h"
|
||||
#include "dataBase.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
ProjectModelSetting::ProjectModelSetting(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::projectModelSetting)
|
||||
,_curItemData(nullptr)
|
||||
,_controller(nullptr)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -38,6 +39,8 @@ void ProjectModelSetting::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("工程模设置");
|
||||
ui->verticalLayout_2->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&ProjectModelSetting::onOkClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&ProjectModelSetting::onCancelClicked);
|
||||
|
|
@ -443,3 +446,8 @@ void ProjectModelSetting::loadModel(const QString& text)
|
|||
setSelectedItems(_curItemData->getModelProperty().modelSetting.mapSvg.keys());
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectModelSetting::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include "structDataPropertyDelegate.h"
|
||||
#include "structDataMeasurementDelegate.h"
|
||||
#include "dataBase.h"
|
||||
//#include "global.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
StructDataPreviewDlg::StructDataPreviewDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -56,6 +56,8 @@ void StructDataPreviewDlg::initial()
|
|||
m_titleBar = new TitleBar(this,true,true);
|
||||
m_titleBar->setTitle("结构数据展示");
|
||||
ui->mainLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
QMenuBar *menuBar = new QMenuBar(this);
|
||||
QMenu *fileMenu = menuBar->addMenu("文件");
|
||||
|
|
@ -904,6 +906,8 @@ void StructDataPreviewDlg::resizeEvent(QResizeEvent *event)
|
|||
if (m_titleBar) {
|
||||
m_titleBar->updateMaximizeButton();
|
||||
}
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
||||
void StructDataPreviewDlg::toggleMaximize()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@ TopologyManager::~TopologyManager() {
|
|||
|
||||
void TopologyManager::clearAllData()
|
||||
{
|
||||
// 清理 diagrams(新增)
|
||||
qDeleteAll(m_diagrams);
|
||||
m_diagrams.clear();
|
||||
|
||||
qDeleteAll(m_baseDiagrams);
|
||||
m_baseDiagrams.clear();
|
||||
|
||||
qDeleteAll(m_monitorDiagrams);
|
||||
m_monitorDiagrams.clear();
|
||||
|
||||
// 删除所有连接
|
||||
qDeleteAll(m_connections);
|
||||
m_connections.clear();
|
||||
|
|
|
|||
|
|
@ -143,6 +143,9 @@ font: 12pt "Microsoft YaHei UI";</string>
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -525,6 +525,9 @@ QPushButton:disabled {
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -188,6 +188,12 @@ QPushButton:disabled {
|
|||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>331</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>编辑设备</string>
|
||||
</property>
|
||||
|
|
@ -354,7 +360,7 @@ QPushButton:disabled {
|
|||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
|
|
|
|||
|
|
@ -150,6 +150,9 @@ QPushButton:disabled {
|
|||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -141,7 +141,14 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cb_level"/>
|
||||
<widget class="QComboBox" name="cb_level">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>280</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
|
|
@ -284,6 +291,9 @@ QPushButton:disabled {
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
|
|
@ -305,6 +305,12 @@ QPushButton:disabled {
|
|||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>331</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>编辑设备</string>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -248,6 +248,9 @@ QTabBar::tab:selected {
|
|||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -180,7 +180,14 @@ QPushButton:disabled {
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cb_level"/>
|
||||
<widget class="QComboBox" name="cb_level">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>280</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="cb_toPos">
|
||||
|
|
@ -304,6 +311,9 @@ QPushButton:disabled {
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -378,6 +378,9 @@ QPushButton:disabled {
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@
|
|||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -1293,7 +1293,7 @@ QCheckBox::indicator:checked {
|
|||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ QT_END_NAMESPACE
|
|||
|
||||
class TitleBar;
|
||||
class DiagramView;
|
||||
class QSizeGrip;
|
||||
|
||||
class CreateEditor : public QDialog
|
||||
{
|
||||
|
|
@ -24,10 +25,13 @@ signals:
|
|||
public slots:
|
||||
void onOkClicked();
|
||||
void onCancelClicked();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::createEditor *ui;
|
||||
TitleBar* m_titleBar;
|
||||
DiagramView* m_pView;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ namespace Ui { class loadPageDlg; }
|
|||
QT_END_NAMESPACE
|
||||
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class LoadPageDlg : public QDialog
|
||||
{
|
||||
|
|
@ -27,11 +28,14 @@ public slots:
|
|||
void onCancelClicked();
|
||||
void onItemChanged(const QModelIndex& current);
|
||||
void onItemDoubleClicked(const QModelIndex &index);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::loadPageDlg *ui;
|
||||
QStandardItemModel* m_standardItemModel;
|
||||
QString _pageName;
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -87,6 +87,5 @@ private:
|
|||
BaseDockWidget* m_pPropertyEditorDock;
|
||||
QDetailsView* m_pPropertiesEditorView;
|
||||
QAction* _pActMonitor;
|
||||
bool _released = false;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ namespace Ui { class projectModelDlg; }
|
|||
QT_END_NAMESPACE
|
||||
|
||||
class TitleBar;
|
||||
class QSizeGrip;
|
||||
|
||||
class projectModelDlg : public QDialog
|
||||
{
|
||||
|
|
@ -54,6 +55,8 @@ private:
|
|||
|
||||
void setTableItemState(int row,TableItemState state); //设置状态
|
||||
int getModelEditState(); //返回工程模编辑状态(选择、编辑、新建)
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
Ui::projectModelDlg *ui;
|
||||
QString _curMeta; //当前元模型
|
||||
|
|
@ -64,6 +67,7 @@ private:
|
|||
|
||||
BiDirectionalMap<QString,int> _mapType; //类型名映射表
|
||||
TitleBar* m_titleBar;
|
||||
QSizeGrip* _pSizeGrip;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@
|
|||
#include "ui_createEditor.h"
|
||||
#include "titleBar.h"
|
||||
#include "diagramView.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
CreateEditor::CreateEditor(QWidget *parent,DiagramView* p)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::createEditor)
|
||||
, m_pView(p)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowModality(Qt::ApplicationModal);
|
||||
|
|
@ -31,6 +33,8 @@ void CreateEditor::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("新建");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_ok,&QPushButton::clicked,this,&CreateEditor::onOkClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&CreateEditor::onCancelClicked);
|
||||
|
|
@ -77,3 +81,8 @@ void CreateEditor::onCancelClicked()
|
|||
{
|
||||
hide();
|
||||
}
|
||||
|
||||
void CreateEditor::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ void ElectricElementsBox::addPanelItems(const QString& sPanel)
|
|||
|
||||
for(auto &model:_modelInfo)
|
||||
{
|
||||
GraphicsItemType localType = linkType[(AbstractItemType)model.modelType];
|
||||
GraphicsItemType localType = getLinkType().value((AbstractItemType)model.modelType);
|
||||
model.modelType = localType; //转换图元类别,从字典表转到内部类别
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ void ElectricElementsBox::updateModelList()
|
|||
{
|
||||
for(auto &model:_modelInfo)
|
||||
{
|
||||
GraphicsItemType localType = linkType[(AbstractItemType)model.modelType];
|
||||
GraphicsItemType localType = getLinkType().value((AbstractItemType)model.modelType);
|
||||
model.modelType = localType;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
#include "dataBase.h"
|
||||
#include "ui_loadPageDlg.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
LoadPageDlg::LoadPageDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::loadPageDlg)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowModality(Qt::ApplicationModal);
|
||||
|
|
@ -23,6 +25,8 @@ void LoadPageDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("加载");
|
||||
ui->verticalLayout->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btnOk,&QPushButton::clicked,this,&LoadPageDlg::onOkClicked);
|
||||
connect(ui->btnCancel,&QPushButton::clicked,this,&LoadPageDlg::onCancelClicked);
|
||||
|
|
@ -104,3 +108,8 @@ void LoadPageDlg::onItemDoubleClicked(const QModelIndex &index)
|
|||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
void LoadPageDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,12 +61,9 @@ CMainWindow::~CMainWindow()
|
|||
delete ui;
|
||||
//if(m_pElectricElementsBox)
|
||||
//delete m_pElectricElementsBox;
|
||||
if(!_released){
|
||||
if(m_pPropertiesEditorView){
|
||||
auto pView = m_pPropertiesEditorView->getQuickDetailsView();
|
||||
delete pView;
|
||||
delete m_pPropertiesEditorView;
|
||||
}
|
||||
if(m_pPropertiesEditorView){
|
||||
|
||||
m_pPropertiesEditorView->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,12 +73,6 @@ void CMainWindow::closeEvent(QCloseEvent* event)
|
|||
// Delete dock manager here to delete all floating widgets. This ensures
|
||||
// that all top level windows of the dock manager are properly closed
|
||||
QMainWindow::closeEvent(event);
|
||||
if(m_pPropertiesEditorView){
|
||||
auto pView = m_pPropertiesEditorView->getQuickDetailsView();
|
||||
delete pView;
|
||||
delete m_pPropertiesEditorView;
|
||||
_released = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CMainWindow::changeEvent(QEvent* event)
|
||||
|
|
|
|||
|
|
@ -9,11 +9,13 @@
|
|||
#include "projectTableDelegate.h"
|
||||
#include "projectModelManager.h"
|
||||
#include "titleBar.h"
|
||||
#include <QSizeGrip>
|
||||
|
||||
projectModelDlg::projectModelDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::projectModelDlg)
|
||||
,_curRow(-1)
|
||||
,_pSizeGrip(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||
|
|
@ -33,6 +35,8 @@ void projectModelDlg::initial()
|
|||
m_titleBar = new TitleBar(this);
|
||||
m_titleBar->setTitle("工程模设置");
|
||||
ui->verticalLayout_2->insertWidget(0,m_titleBar);
|
||||
_pSizeGrip = new QSizeGrip(this);
|
||||
_pSizeGrip->setFixedSize(12, 12);
|
||||
|
||||
connect(ui->btn_save,&QPushButton::clicked,this,&projectModelDlg::onSaveClicked);
|
||||
connect(ui->btn_cancel,&QPushButton::clicked,this,&projectModelDlg::onCancelClicked);
|
||||
|
|
@ -874,3 +878,8 @@ int projectModelDlg::getModelEditState()
|
|||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void projectModelDlg::resizeEvent(QResizeEvent *) {
|
||||
_pSizeGrip->move(width() - _pSizeGrip->width(),
|
||||
height() - _pSizeGrip->height());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue