#pragma once #include #include #include #include #include #include class Updater : public QStackedWidget { Q_OBJECT public: explicit Updater(const QString &updater_path, const QString &manifest_path, QWidget *parent = 0); private slots: void installUpdate(); void readProgress(); void updateFinished(int exitCode, QProcess::ExitStatus exitStatus); private: bool eventFilter(QObject *obj, QEvent *event) override; QProcess proc; QString updater, manifest; QLabel *text; QProgressBar *bar; QPushButton *reboot; QWidget *prompt, *wifi, *progress; };