#ifndef PROGPANEL_H #define PROGPANEL_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "cfg.h" #include #include #include #include "wProgramManager/wprogramitem.h" class ProgPanel : public QWidget { Q_OBJECT public: explicit ProgPanel(QWidget *parent = nullptr); ~ProgPanel(); QTreeWidgetItem *m_headerItem = nullptr; protected: void changeEvent(QEvent *) override; void transUi(); bool checkIfNameRepeated(const QString &name, QTreeWidgetItem *skip = nullptr); public slots: void onNewClicked(bool f); void onEditClicked(bool f); void onDeleteClicked(bool f); void onImportClicked(bool f); void onExportClicked(bool f); void onRestoreProgram(const QJsonDocument &pro); void onCreateNewProgram(QString name, QSize res, QString remarks); void onCreateNewProgramOnOpenEditProgramWidget(QString name, QSize res, QString remarks); void onImportProgram(QString strImportDir,QString strTip1); void onExportProgram(QString strImportDir,QString strTip1); void FilterProgram(const QString &strtemp); private slots: void OnClickColumn(int iColumn); private: QString progDir; QList m_pwPorgramItemList; void readSettings(); void writeSettings(); LoQTreeWidget *wProgramList = nullptr; QPushButton *bnNew = nullptr; QPushButton *bnEdit = nullptr; QPushButton *bnDelete = nullptr; QPushButton *bnImport, *bnExport; QPushButton *bnSend, *btnPlay; }; #endif // PROGPANEL_H