qt/LedOK/device/progressesdlg.h

33 lines
730 B
C
Raw Permalink Normal View History

2024-05-23 17:13:51 +08:00
#ifndef PROGRESSESDLG_H
#define PROGRESSESDLG_H
#include "gutil/qgui.h"
#include <QDialog>
#include <QProgressBar>
class ProgressesItem;
class ProgressesDlg : public QDialog {
Q_OBJECT
public:
explicit ProgressesDlg(QWidget *parent = nullptr);
QString filePath, fileId;
TreeWidget *table;
};
class ProgressesItem : public TreeWidgetItem, public QObject {
public:
using TreeWidgetItem::TreeWidgetItem;
void setRes(const QString &tip, QColor color = Qt::green) {
auto res = "res"**treeWidget();
setText(res, tip);
setToolTip(res, tip);
setForeground(res, color);
}
void sendProgress(const QString &id);
QProgressBar *fdProgress;
};
#endif // PROGRESSESDLG_H