code_app/app/upgrade/mainwindow.h

37 lines
696 B
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "base/HGThread.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(const std::string &appName, const std::string &pkgPath, QWidget *parent = nullptr);
~MainWindow();
bool isInstallSuccess();
signals:
void closeWnd();
private:
static bool Upgrade(const std::string& pkgPath);
static void HGAPI ThreadFunc(HGThread thread, HGPointer param);
private:
Ui::MainWindow *ui;
std::string m_appName;
std::string m_pkgPath;
HGThread m_thread;
bool m_success;
};
#endif // MAINWINDOW_H