#ifndef MAINWINDOW_H #define MAINWINDOW_H #include #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 &pkgPath, QWidget *parent = nullptr); ~MainWindow(); bool isInstallSuccess(); QString getUpgradeFailInfo(); signals: void closeWnd(); private: static bool Upgrade(const std::string& pkgPath, QString &failInfo); static void HGAPI ThreadFunc(HGThread thread, HGPointer param); private: Ui::MainWindow *ui; std::string m_pkgPath; HGThread m_thread; bool m_success; QString m_upgradeFailInfo; }; #endif // MAINWINDOW_H