qt/LedOK/progpanel.h
2024-02-21 18:08:50 +08:00

45 lines
948 B
C++

#ifndef PROGPANEL_H
#define PROGPANEL_H
#include "base/loqtreewidget.h"
#include <QPushButton>
#include <QSettings>
#include <QTableWidget>
#include <QDialog>
class ProgPanel : public QWidget {
Q_OBJECT
public:
explicit ProgPanel(QWidget *parent = nullptr);
LoQTreeWidget *mProgTree{0};
protected:
void changeEvent(QEvent *) override;
void transUi();
bool checkIfNameRepeated(const QString &name, QTreeWidgetItem *skip = nullptr);
void addProFile(const QString &);
public slots:
void onEditClicked(bool f);
void onDeleteClicked(bool f);
private:
QString mProgsDir;
QPushButton *bnNew;
QPushButton *bnEdit;
QPushButton *bnDelete;
QPushButton *bnImport, *bnExport;
QPushButton *bnSend, *btnPlay;
};
class ProgPortDlg : public QDialog {
Q_OBJECT
public:
ProgPortDlg(QWidget *parent, QString title);
QTableWidget *table{0};
QPushButton *bnOK;
};
#endif // PROGPANEL_H