#ifndef PROGEDITORWIN_H #define PROGEDITORWIN_H #include "program/pageeditor.h" #include #include #include #include #include #include #include "gutil/qjson.h" 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(); bool save(); QListWidget *listPage; PageListItem *mPageItem = 0; PageEditor *mPageEditor; QTabWidget *mTabsAttr; std::vector mPageJsons; ProgItem *mProgItem; int mNewEleX = 0; int mNewEleY = 0; }; class ProgCreateDlg : public QDialog { Q_OBJECT public: ProgCreateDlg(QString name, int width, int height, QString remarks, QString, bool isVer, QWidget *parent = nullptr); QLineEdit *fdName; QSpinBox *fdWidth; QSpinBox *fdHeight; QTextEdit *fdRemark; QCheckBox *fdIsUltraLong; QRadioButton *fdHor, *fdVer; QLineEdit *fdSplitWidths; }; #endif // PROGEDITORWIN_H