code_app/app/upgrade/mainwindow.h

37 lines
690 B
C
Raw 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:
2022-07-14 04:01:39 +00:00
MainWindow(const std::string &appName, 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();
signals:
void closeWnd();
private:
static bool Upgrade(const std::string& pkgPath);
static void ThreadFunc(HGThread thread, HGPointer param);
2022-06-29 09:46:00 +00:00
private:
Ui::MainWindow *ui;
2022-07-14 04:01:39 +00:00
std::string m_appName;
std::string m_pkgPath;
HGThread m_thread;
2022-07-22 03:12:00 +00:00
bool m_success;
2022-06-29 09:46:00 +00:00
};
#endif // MAINWINDOW_H