qt/LedOK/program/sendprogramdialog.h

45 lines
1.0 KiB
C
Raw Normal View History

2023-04-18 14:14:46 +08:00
#ifndef SENDPROGRAMDIALOG_H
#define SENDPROGRAMDIALOG_H
2023-09-19 11:49:20 +08:00
#include "base/loqtreewidget.h"
2023-08-07 09:04:53 +08:00
#include <QDialog>
2023-09-19 11:49:20 +08:00
#include <QProgressBar>
2023-04-18 14:14:46 +08:00
class SendProgramDialog : public QDialog {
Q_OBJECT
public:
2023-09-19 11:49:20 +08:00
explicit SendProgramDialog(QString, QWidget *parent);
2023-04-18 14:14:46 +08:00
signals:
void stopAllThd();
2023-08-07 09:04:53 +08:00
protected:
void closeEvent(QCloseEvent *event) override;
2023-04-18 14:14:46 +08:00
void sendNext();
2023-09-19 11:49:20 +08:00
LoQTreeWidget *table;
2023-04-18 14:14:46 +08:00
int mWaitCnt{0};
QLabel *label;
QString mProgName;
QString m_strUrl;
2023-08-07 09:04:53 +08:00
};
2024-02-21 18:08:50 +08:00
class SendProgramItem : public TreeWidgetItem, public QObject {
2023-08-07 09:04:53 +08:00
public:
2023-09-19 11:49:20 +08:00
using TreeWidgetItem::TreeWidgetItem;
void setResult(QString tip, QColor color) {
auto remarks = "remarks"**treeWidget();
setText(remarks, tip);
setToolTip(remarks, tip);
setForeground(remarks, color);
2023-08-07 09:04:53 +08:00
}
2023-09-19 11:49:20 +08:00
bool isSending = false;
bool isLocked = true;
QLabel *fdOnline;
QProgressBar *fdProgress;
QPushButton *btnUnlock = 0;
2023-04-18 14:14:46 +08:00
};
2023-09-19 11:49:20 +08:00
2023-04-18 14:14:46 +08:00
#endif // SENDPROGRAMDIALOG_H