diff options
author | Andrew <forkk@forkk.net> | 2013-05-08 12:56:43 -0500 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-05-08 12:56:43 -0500 |
commit | 5f781b3053c5ba8a25d354903acf2c31dc9a56c5 (patch) | |
tree | 94361d20568e55d63db7b18f3c7dded7d1e88e06 /gui/mainwindow.h | |
parent | 2e62f6e8d8aded1036f96835ebebd4d656c0fcc2 (diff) | |
download | PrismLauncher-5f781b3053c5ba8a25d354903acf2c31dc9a56c5.tar.gz PrismLauncher-5f781b3053c5ba8a25d354903acf2c31dc9a56c5.tar.bz2 PrismLauncher-5f781b3053c5ba8a25d354903acf2c31dc9a56c5.zip |
Implement basic game updater.
Resolves MMC-4: https://jira.forkk.net/browse/MMC-4
Diffstat (limited to 'gui/mainwindow.h')
-rw-r--r-- | gui/mainwindow.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/gui/mainwindow.h b/gui/mainwindow.h index bc35038e..192cdbc4 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -38,16 +38,21 @@ class MainWindow : public QMainWindow { Q_OBJECT + /*! + * The currently selected instance. + */ + Q_PROPERTY(Instance* selectedInstance READ selectedInstance STORED false) + public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); void closeEvent(QCloseEvent *event); - // Browser Dialog - void openWebPage(QUrl url); - -private: + // Browser Dialog + void openWebPage(QUrl url); + + Instance *selectedInstance(); private slots: @@ -82,11 +87,14 @@ private slots: void on_actionChangeInstMCVersion_triggered(); - void doLogin( QString inst, const QString& errorMsg = "" ); + void doLogin(const QString& errorMsg = ""); - void onLoginComplete( QString inst, LoginResponse response ); - void onLoginFailed( QString inst, const QString& errorMsg ); + void onLoginComplete(LoginResponse response); + + + void onGameUpdateComplete(LoginResponse response); + void onGameUpdateError(QString error); void taskStart(Task *task); void taskEnd(Task *task); @@ -95,6 +103,10 @@ public slots: void instanceActivated ( QModelIndex ); void startTask(Task *task); + + void launchInstance(LoginResponse response); + void launchInstance(QString instID, LoginResponse response); + void launchInstance(Instance *inst, LoginResponse response); private: Ui::MainWindow *ui; @@ -106,6 +118,11 @@ private: MinecraftProcess *proc; ConsoleWindow *console; + // A pointer to the instance we are actively doing stuff with. + // This is set when the user launches an instance and is used to refer to that + // instance throughout the launching process. + Instance *m_activeInst; + Task *m_versionLoadTask; }; |