49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
|
|
#ifndef EDITPANEL_H
|
||
|
|
#define EDITPANEL_H
|
||
|
|
//编辑文本项生成组态图
|
||
|
|
#include <QWidget>
|
||
|
|
#include "global.h"
|
||
|
|
|
||
|
|
class EditView;
|
||
|
|
class EditScene;
|
||
|
|
class QVBoxLayout;
|
||
|
|
//class QGraphicsGridLayout;
|
||
|
|
class QGraphicsLinearLayout;
|
||
|
|
class QPushButton;
|
||
|
|
class EditMainRect;
|
||
|
|
class EditRowData;
|
||
|
|
class EditBaseStruct;
|
||
|
|
|
||
|
|
class EditPanel : public QWidget
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
EditPanel(QWidget *parent = nullptr);
|
||
|
|
~EditPanel();
|
||
|
|
|
||
|
|
void initByWizardInfo(DiagramEditorWizardInfo);
|
||
|
|
protected:
|
||
|
|
void resizeEvent(QResizeEvent* e);
|
||
|
|
public slots:
|
||
|
|
void onAddCLicked();
|
||
|
|
void onWidthChanged(int width);
|
||
|
|
private:
|
||
|
|
void initial();
|
||
|
|
int calHeight();
|
||
|
|
private:
|
||
|
|
EditView* m_pEditView;
|
||
|
|
EditScene* m_pEditScene;
|
||
|
|
QVBoxLayout* _layout;
|
||
|
|
EditMainRect* _mainWidget;
|
||
|
|
//QGraphicsGridLayout* _widgetLayout;
|
||
|
|
QGraphicsLinearLayout* _widgetLayout;
|
||
|
|
QGraphicsProxyWidget* m_addBtnPro;
|
||
|
|
int _maxWidth;
|
||
|
|
int _maxHeight;
|
||
|
|
int _curRow;
|
||
|
|
QList<EditRowData*> _lstData;
|
||
|
|
QMap<int,QMap<int,EditBaseStruct*>> _mapStruct;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|