38 lines
947 B
C
38 lines
947 B
C
|
#ifndef PROGEDITORWIN_H
|
||
|
#define PROGEDITORWIN_H
|
||
|
#include "basewin.h"
|
||
|
#include "wProgramManager/pageeditor.h"
|
||
|
#include <QListWidget>
|
||
|
|
||
|
class ProgEditorWin : public BaseWin {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit ProgEditorWin(QString &name, int &w, int &h, QString &remarks, const QString &progDir, const QString pRoot, QWidget *parent = nullptr);
|
||
|
|
||
|
public slots:
|
||
|
void onSave();
|
||
|
void onAddPage();
|
||
|
signals:
|
||
|
void sProgramChanged();
|
||
|
void sProgramSaveAs(QString name, QSize size, QString remarks);
|
||
|
|
||
|
protected:
|
||
|
void closeEvent(QCloseEvent *event) override;
|
||
|
private:
|
||
|
bool isProgChanged();
|
||
|
void save();
|
||
|
void UdpSendJson(QJsonObject json);
|
||
|
|
||
|
QString mProgsDir;
|
||
|
QString &m_name, &m_remarks;
|
||
|
QListWidget *listPage;
|
||
|
PageListItem *mPageItem = nullptr;
|
||
|
PageEditor *progEditorMid;
|
||
|
QTabWidget *mTabsAttr;
|
||
|
QList<QJsonObject> mPageJsons;
|
||
|
int mNewEleX = 0;
|
||
|
int mNewEleY = 0;
|
||
|
};
|
||
|
|
||
|
#endif // PROGEDITORWIN_H
|