qt/LedOK/progpanel.h

45 lines
934 B
C
Raw Normal View History

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"
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>
2023-04-25 16:30:58 +08:00
#include <QDialog>
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:
2023-08-01 11:42:41 +08:00
explicit ProgPanel(QWidget *parent = nullptr);
2022-01-04 18:11:48 +08:00
2023-08-01 11:42:41 +08:00
LoQTreeWidget *mProgTree{0};
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);
2024-05-23 17:13:51 +08:00
void addProFiles();
2022-01-04 18:11:48 +08:00
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);
private:
2022-10-27 15:07:45 +08:00
QString mProgsDir;
2023-09-19 11:49:20 +08:00
QPushButton *bnNew;
QPushButton *bnEdit;
QPushButton *bnDelete;
2022-08-25 18:37:24 +08:00
QPushButton *bnImport, *bnExport;
QPushButton *bnSend, *btnPlay;
2022-01-04 18:11:48 +08:00
};
2023-04-25 16:30:58 +08:00
class ProgPortDlg : public QDialog {
2023-05-15 16:06:10 +08:00
Q_OBJECT
2023-04-18 14:14:46 +08:00
public:
ProgPortDlg(QWidget *parent, QString title);
QTableWidget *table{0};
2023-04-25 16:30:58 +08:00
QPushButton *bnOK;
2023-04-18 14:14:46 +08:00
};
2022-08-25 18:37:24 +08:00
#endif // PROGPANEL_H