code_app/app/upgrade/mainwindow.h

38 lines
725 B
C
Raw Permalink Normal View History

2022-06-29 09:46:00 +00:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "base/HGThread.h"
2022-06-29 09:46:00 +00:00
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
2023-04-13 09:31:39 +00:00
MainWindow(const std::string &pkgPath, QWidget *parent = nullptr);
2022-06-29 09:46:00 +00:00
~MainWindow();
2022-07-22 03:12:00 +00:00
bool isInstallSuccess();
2023-01-11 10:56:48 +00:00
QString getUpgradeFailInfo();
2022-07-22 03:12:00 +00:00
signals:
void closeWnd();
private:
2023-01-11 10:56:48 +00:00
static bool Upgrade(const std::string& pkgPath, QString &failInfo);
2022-10-12 03:51:41 +00:00
static void HGAPI ThreadFunc(HGThread thread, HGPointer param);
2022-06-29 09:46:00 +00:00
private:
Ui::MainWindow *ui;
std::string m_pkgPath;
HGThread m_thread;
2022-07-22 03:12:00 +00:00
bool m_success;
2023-01-11 10:56:48 +00:00
QString m_upgradeFailInfo;
2022-06-29 09:46:00 +00:00
};
#endif // MAINWINDOW_H