diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-07-10 00:06:05 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-07-10 00:06:05 +0200 |
commit | 5dd48e89f5a7facf8355641d0caf8deaec2a03ec (patch) | |
tree | b23f1d3bdb09afe8f642e07df30f5a68f2b42a5e /application/LaunchInteraction.h | |
parent | 5133b0f34f1e6fc046787e7369b403a381a2f60c (diff) | |
download | MultiMC-5dd48e89f5a7facf8355641d0caf8deaec2a03ec.tar MultiMC-5dd48e89f5a7facf8355641d0caf8deaec2a03ec.tar.gz MultiMC-5dd48e89f5a7facf8355641d0caf8deaec2a03ec.tar.lz MultiMC-5dd48e89f5a7facf8355641d0caf8deaec2a03ec.tar.xz MultiMC-5dd48e89f5a7facf8355641d0caf8deaec2a03ec.zip |
GH-1034 do jar modding separate from update
Diffstat (limited to 'application/LaunchInteraction.h')
-rw-r--r-- | application/LaunchInteraction.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/application/LaunchInteraction.h b/application/LaunchInteraction.h new file mode 100644 index 00000000..f62d5124 --- /dev/null +++ b/application/LaunchInteraction.h @@ -0,0 +1,49 @@ +#pragma once +#include <QObject> +#include <BaseInstance.h> +#include <tools/BaseProfiler.h> + +class ConsoleWindow; +class LaunchController: public QObject +{ + Q_OBJECT +public: + LaunchController(QObject * parent = nullptr); + virtual ~LaunchController(){}; + + void setInstance(InstancePtr instance) + { + m_instance = instance; + } + void setOnline(bool online) + { + m_online = online; + } + void setProfiler(BaseProfilerFactory *profiler) + { + m_profiler = profiler; + } + void setParentWidget(QWidget * widget) + { + m_parentWidget = widget; + } + + void launch(); + +private: + void login(); + void launchInstance(); + +private slots: + void readyForLaunch(); + void instanceEnded(); + +private: + BaseProfilerFactory *m_profiler = nullptr; + bool m_online = true; + InstancePtr m_instance; + QWidget * m_parentWidget = nullptr; + ConsoleWindow *m_console = nullptr; + AuthSessionPtr m_session; + std::shared_ptr <BaseLauncher> m_launcher; +}; |