2022-08-25 18:37:24 +08:00
|
|
|
#ifndef PROGPANEL_H
|
|
|
|
#define PROGPANEL_H
|
2022-01-04 18:11:48 +08:00
|
|
|
|
2023-04-18 14:14:46 +08:00
|
|
|
#include "base/loqtreewidget.h"
|
|
|
|
#include "program/progitem.h"
|
|
|
|
#include "basedlg.h"
|
2022-01-04 18:11:48 +08:00
|
|
|
#include <QPushButton>
|
2022-09-30 18:08:39 +08:00
|
|
|
#include <QSettings>
|
2023-04-18 14:14:46 +08:00
|
|
|
#include <QTableWidget>
|
2022-01-04 18:11:48 +08:00
|
|
|
|
2022-08-25 18:37:24 +08:00
|
|
|
class ProgPanel : public QWidget {
|
2022-01-04 18:11:48 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-09-30 18:08:39 +08:00
|
|
|
explicit ProgPanel(QSettings &settings, QWidget *parent = nullptr);
|
2022-01-04 18:11:48 +08:00
|
|
|
|
2022-08-25 18:37:24 +08:00
|
|
|
QTreeWidgetItem *m_headerItem = nullptr;
|
2022-09-30 18:08:39 +08:00
|
|
|
LoQTreeWidget *mProgTree = nullptr;
|
2022-01-04 18:11:48 +08:00
|
|
|
protected:
|
2022-08-25 18:37:24 +08:00
|
|
|
void changeEvent(QEvent *) override;
|
|
|
|
void transUi();
|
2022-01-04 18:11:48 +08:00
|
|
|
bool checkIfNameRepeated(const QString &name, QTreeWidgetItem *skip = nullptr);
|
|
|
|
|
2022-08-25 18:37:24 +08:00
|
|
|
public slots:
|
2022-01-04 18:11:48 +08:00
|
|
|
void onEditClicked(bool f);
|
|
|
|
void onDeleteClicked(bool f);
|
2023-04-18 14:14:46 +08:00
|
|
|
void onCreateNewProgramOnOpenEditProgramWidget(QString name, QSize res, QString remarks, QList<int> &, int);
|
2022-01-04 18:11:48 +08:00
|
|
|
void FilterProgram(const QString &strtemp);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void OnClickColumn(int iColumn);
|
|
|
|
|
|
|
|
private:
|
2022-10-27 15:07:45 +08:00
|
|
|
QString mProgsDir;
|
2022-09-30 18:08:39 +08:00
|
|
|
QList<ProgItem *> m_pwPorgramItemList;
|
2022-08-25 18:37:24 +08:00
|
|
|
QPushButton *bnNew = nullptr;
|
|
|
|
QPushButton *bnEdit = nullptr;
|
|
|
|
QPushButton *bnDelete = nullptr;
|
|
|
|
QPushButton *bnImport, *bnExport;
|
|
|
|
QPushButton *bnSend, *btnPlay;
|
2022-01-04 18:11:48 +08:00
|
|
|
};
|
|
|
|
|
2023-04-18 14:14:46 +08:00
|
|
|
class ProgPortDlg : public BaseDlg {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ProgPortDlg(QWidget *parent, QString title);
|
|
|
|
|
|
|
|
QTableWidget *table{0};
|
|
|
|
QPushButton *bnOK, *bnClose;
|
|
|
|
};
|
|
|
|
|
2022-08-25 18:37:24 +08:00
|
|
|
#endif // PROGPANEL_H
|