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

45 lines
1.0 KiB
C++

#ifndef SENDPROGRAMDIALOG_H
#define SENDPROGRAMDIALOG_H
#include "base/loqtreewidget.h"
#include <QDialog>
#include <QProgressBar>
class SendProgramDialog : public QDialog {
Q_OBJECT
public:
explicit SendProgramDialog(QString, QWidget *parent);
signals:
void stopAllThd();
protected:
void closeEvent(QCloseEvent *event) override;
void sendNext();
LoQTreeWidget *table;
int mWaitCnt{0};
QLabel *label;
QString mProgName;
QString m_strUrl;
};
class SendProgramItem : public TreeWidgetItem, public QObject {
public:
using TreeWidgetItem::TreeWidgetItem;
void setResult(QString tip, QColor color) {
auto remarks = "remarks"**treeWidget();
setText(remarks, tip);
setToolTip(remarks, tip);
setForeground(remarks, color);
}
bool isSending = false;
bool isLocked = true;
QLabel *fdOnline;
QProgressBar *fdProgress;
QPushButton *btnUnlock = 0;
};
#endif // SENDPROGRAMDIALOG_H