diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-07-05 01:54:30 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-07-05 01:54:30 +0200 |
commit | 7f1320390c55e408a4b0081b2606eab3892a8148 (patch) | |
tree | e08183b17e551e6807939c5ad2932ae68e14f49b /application/MainWindow.h | |
parent | 526a511f455234152ca9b5bc8c60d3c82cbfa417 (diff) | |
download | MultiMC-7f1320390c55e408a4b0081b2606eab3892a8148.tar MultiMC-7f1320390c55e408a4b0081b2606eab3892a8148.tar.gz MultiMC-7f1320390c55e408a4b0081b2606eab3892a8148.tar.lz MultiMC-7f1320390c55e408a4b0081b2606eab3892a8148.tar.xz MultiMC-7f1320390c55e408a4b0081b2606eab3892a8148.zip |
GH-1053 move launch process UI to a separate class
Diffstat (limited to 'application/MainWindow.h')
-rw-r--r-- | application/MainWindow.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/application/MainWindow.h b/application/MainWindow.h index 292a8d28..505e5f13 100644 --- a/application/MainWindow.h +++ b/application/MainWindow.h @@ -24,6 +24,7 @@ #include "net/NetJob.h" #include "updater/GoUpdate.h" +class LaunchController; class NewsChecker; class NotificationChecker; class QToolButton; @@ -31,7 +32,6 @@ class InstanceProxyModel; class LabeledToolButton; class QLabel; class MinecraftLauncher; -class ConsoleWindow; class BaseProfilerFactory; class GenericPageProvider; @@ -116,25 +116,9 @@ slots: void on_actionScreenshots_triggered(); - /*! - * Launches the currently selected instance with the default account. - * If no default account is selected, prompts the user to pick an account. - */ - void doLaunch(bool online = true, BaseProfilerFactory *profiler = 0); - - /*! - * Launches the given instance with the given account. - * This function assumes that the given account has a valid, usable access token. - */ - void launchInstance(InstancePtr instance, AuthSessionPtr session, BaseProfilerFactory *profiler = 0); - - void readyForLaunch(std::shared_ptr<BaseLauncher>); - void taskStart(); void taskEnd(); - void instanceEnded(); - // called when an icon is changed in the icon model. void iconUpdated(QString); @@ -185,13 +169,13 @@ protected: void instanceFromVersion(QString instName, QString instGroup, QString instIcon, BaseVersionPtr version); void instanceFromZipPack(QString instName, QString instGroup, QString instIcon, QUrl url); void finalizeInstance(InstancePtr inst); + void launch(InstancePtr instance, bool online = true, BaseProfilerFactory *profiler = nullptr); private: Ui::MainWindow *ui; class GroupView *view; InstanceProxyModel *proxymodel; NetJobPtr skin_download_job; - ConsoleWindow *console; LabeledToolButton *renameButton; QToolButton *changeIconButton; QToolButton *newsLabel; @@ -199,6 +183,7 @@ private: std::shared_ptr<GenericPageProvider> m_globalSettingsProvider; std::shared_ptr<NewsChecker> m_newsChecker; std::shared_ptr<NotificationChecker> m_notificationChecker; + std::shared_ptr<LaunchController> m_launchController; InstancePtr m_selectedInstance; QString m_currentInstIcon; |