2022-08-25 18:37:24 +08:00
|
|
|
#ifndef PROGEDITORWIN_H
|
|
|
|
#define PROGEDITORWIN_H
|
2023-04-18 14:14:46 +08:00
|
|
|
#include "program/pageeditor.h"
|
2022-08-25 18:37:24 +08:00
|
|
|
#include <QListWidget>
|
2023-04-21 11:06:47 +08:00
|
|
|
#include <QJsonObject>
|
2022-08-25 18:37:24 +08:00
|
|
|
|
2022-10-27 15:07:45 +08:00
|
|
|
class ProgPanel;
|
|
|
|
class ProgItem;
|
2023-04-28 16:02:14 +08:00
|
|
|
class ProgEditorWin : public QWidget {
|
2022-08-25 18:37:24 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2023-04-28 16:02:14 +08:00
|
|
|
explicit ProgEditorWin(ProgItem *progItem, QWidget *);
|
2022-08-25 18:37:24 +08:00
|
|
|
public slots:
|
|
|
|
void onSave();
|
|
|
|
void onAddPage();
|
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *event) override;
|
|
|
|
private:
|
|
|
|
bool isProgChanged();
|
2023-05-15 16:06:10 +08:00
|
|
|
bool save();
|
2022-08-25 18:37:24 +08:00
|
|
|
void UdpSendJson(QJsonObject json);
|
|
|
|
|
|
|
|
QListWidget *listPage;
|
|
|
|
PageListItem *mPageItem = nullptr;
|
2023-05-09 15:08:39 +08:00
|
|
|
PageEditor *mPageEditor;
|
2022-08-25 18:37:24 +08:00
|
|
|
QTabWidget *mTabsAttr;
|
|
|
|
QList<QJsonObject> mPageJsons;
|
2022-10-27 15:07:45 +08:00
|
|
|
ProgItem *mProgItem;
|
2022-08-25 18:37:24 +08:00
|
|
|
int mNewEleX = 0;
|
|
|
|
int mNewEleY = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PROGEDITORWIN_H
|