qt/LedOK/device/upgradeapkdialog.h
2023-10-23 11:44:22 +08:00

41 lines
1.0 KiB
C++

#ifndef UPGRADEAPKDIALOG_H
#define UPGRADEAPKDIALOG_H
#include "base/loqtreewidget.h"
#include <QDialog>
#include <QProgressBar>
class UpdateApkItem;
class UpgradeApkDialog : public QDialog {
Q_OBJECT
public:
explicit UpgradeApkDialog(QWidget *parent = nullptr);
void sendProgress(UpdateApkItem *item);
QString filePath, fileId;
protected:
virtual void keyPressEvent(QKeyEvent *ev);
LoQTreeWidget *table;
};
class UpdateApkItem : public TreeWidgetItem {
public:
using TreeWidgetItem::TreeWidgetItem;
void setResult(QString tip, QColor color = Qt::blue) {
auto remarks = "remarks"**treeWidget();
setText(remarks, tip);
setToolTip(remarks, tip);
setForeground(remarks, color);
}
void OnCheckSoftVersions();
void OnCheckFpgaVersions();
QLabel *fdOnline;
QProgressBar *fdProgress;
QPushButton *btnUnlock = 0;
bool isUpdating = false;
bool isLocked = true;
};
#endif // UpgradeApkDialog_H