#pragma once #include #include "MultiMCVersion.h" #include "config.h" #include #include "logger/QsLog.h" #include "logger/QsLogDest.h" class MinecraftVersionList; class LWJGLVersionList; class HttpMetaCache; class SettingsObject; class InstanceList; class IconList; class QNetworkAccessManager; class ForgeVersionList; #if defined(MMC) #undef MMC #endif #define MMC (static_cast(QCoreApplication::instance())) class MultiMC : public QApplication { Q_OBJECT public: enum Status { Failed, Succeeded, Initialized, }; public: MultiMC(int &argc, char **argv); virtual ~MultiMC(); std::shared_ptr settings() { return m_settings; } std::shared_ptr instances() { return m_instances; } std::shared_ptr icons(); Status status() { return m_status; } MultiMCVersion version() { return m_version; } std::shared_ptr qnam() { return m_qnam; } std::shared_ptr metacache() { return m_metacache; } std::shared_ptr lwjgllist(); std::shared_ptr forgelist(); std::shared_ptr minecraftlist(); private: void initLogger(); void initGlobalSettings(); void initHttpMetaCache(); void initTranslations(); private: std::shared_ptr m_qt_translator; std::shared_ptr m_mmc_translator; std::shared_ptr m_settings; std::shared_ptr m_instances; std::shared_ptr m_icons; std::shared_ptr m_qnam; std::shared_ptr m_metacache; std::shared_ptr m_lwjgllist; std::shared_ptr m_forgelist; std::shared_ptr m_minecraftlist; QsLogging::DestinationPtr m_fileDestination; QsLogging::DestinationPtr m_debugDestination; Status m_status = MultiMC::Failed; MultiMCVersion m_version = {VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD}; };