From 5dd48e89f5a7facf8355641d0caf8deaec2a03ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 10 Jul 2015 00:06:05 +0200 Subject: GH-1034 do jar modding separate from update --- application/LaunchInteraction.h | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 application/LaunchInteraction.h (limited to 'application/LaunchInteraction.h') 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 +#include +#include + +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 m_launcher; +}; -- cgit v1.2.3