2023-04-18 14:14:46 +08:00
|
|
|
#ifndef UPGRADEAPKDIALOG_H
|
|
|
|
#define UPGRADEAPKDIALOG_H
|
|
|
|
|
2023-10-23 11:44:22 +08:00
|
|
|
#include "base/loqtreewidget.h"
|
2023-04-18 14:14:46 +08:00
|
|
|
#include <QDialog>
|
2023-10-23 11:44:22 +08:00
|
|
|
#include <QProgressBar>
|
2023-04-18 14:14:46 +08:00
|
|
|
|
2023-10-23 11:44:22 +08:00
|
|
|
class UpdateApkItem;
|
2023-04-18 14:14:46 +08:00
|
|
|
class UpgradeApkDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit UpgradeApkDialog(QWidget *parent = nullptr);
|
2023-10-23 11:44:22 +08:00
|
|
|
void sendProgress(UpdateApkItem *item);
|
|
|
|
|
2023-04-18 14:14:46 +08:00
|
|
|
QString filePath, fileId;
|
|
|
|
protected:
|
|
|
|
virtual void keyPressEvent(QKeyEvent *ev);
|
2023-10-23 11:44:22 +08:00
|
|
|
LoQTreeWidget *table;
|
|
|
|
};
|
2023-04-18 14:14:46 +08:00
|
|
|
|
2023-10-23 11:44:22 +08:00
|
|
|
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();
|
2023-04-18 14:14:46 +08:00
|
|
|
|
2023-10-23 11:44:22 +08:00
|
|
|
QLabel *fdOnline;
|
|
|
|
QProgressBar *fdProgress;
|
|
|
|
QPushButton *btnUnlock = 0;
|
|
|
|
bool isUpdating = false;
|
|
|
|
bool isLocked = true;
|
2023-04-18 14:14:46 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // UpgradeApkDialog_H
|