qt/LedOK/program/progeditorwin.h
2023-04-28 16:02:14 +08:00

35 lines
747 B
C++

#ifndef PROGEDITORWIN_H
#define PROGEDITORWIN_H
#include "program/pageeditor.h"
#include <QListWidget>
#include <QJsonObject>
class ProgPanel;
class ProgItem;
class ProgEditorWin : public QWidget {
Q_OBJECT
public:
explicit ProgEditorWin(ProgItem *progItem, QWidget *);
public slots:
void onSave();
void onAddPage();
protected:
void closeEvent(QCloseEvent *event) override;
private:
bool isProgChanged();
void save();
void UdpSendJson(QJsonObject json);
QListWidget *listPage;
PageListItem *mPageItem = nullptr;
PageEditor *progEditorMid;
QTabWidget *mTabsAttr;
QList<QJsonObject> mPageJsons;
ProgItem *mProgItem;
int mNewEleX = 0;
int mNewEleY = 0;
};
#endif // PROGEDITORWIN_H