From db877ba121ff87a4e029daf8555d85dfef45993a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 9 Feb 2015 01:51:14 +0100 Subject: NOISSUE move everything. --- MultiMC.h | 188 -------------------------------------------------------------- 1 file changed, 188 deletions(-) delete mode 100644 MultiMC.h (limited to 'MultiMC.h') diff --git a/MultiMC.h b/MultiMC.h deleted file mode 100644 index b78bbbd2..00000000 --- a/MultiMC.h +++ /dev/null @@ -1,188 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include - -class QFile; -class MinecraftVersionList; -class LWJGLVersionList; -class HttpMetaCache; -class SettingsObject; -class InstanceList; -class MojangAccountList; -class IconList; -class QNetworkAccessManager; -class ForgeVersionList; -class LiteLoaderVersionList; -class JavaVersionList; -class UpdateChecker; -class BaseProfilerFactory; -class BaseDetachedToolFactory; -class TranslationDownloader; - -#if defined(MMC) -#undef MMC -#endif -#define MMC (static_cast(QCoreApplication::instance())) - -enum UpdateFlag -{ - None = 0x0, - RestartOnFinish = 0x1, - DryRun = 0x2, - OnExit = 0x4 -}; -Q_DECLARE_FLAGS(UpdateFlags, UpdateFlag); -Q_DECLARE_OPERATORS_FOR_FLAGS(UpdateFlags); - -class MultiMC : public QApplication -{ - // friends for the purpose of limiting access to deprecated stuff - friend class MultiMCPage; - friend class MainWindow; - Q_OBJECT -public: - enum Status - { - Failed, - Succeeded, - Initialized - }; - -public: - MultiMC(int &argc, char **argv, bool test_mode = false); - virtual ~MultiMC(); - - // InstanceList, IconList, OneSixFTBInstance, LegacyUpdate, LegacyInstance, MCEditTool, JVisualVM, MinecraftInstance, JProfiler, BaseInstance - std::shared_ptr settings() - { - return m_settings; - } - - qint64 timeSinceStart() const - { - return startTime.msecsTo(QDateTime::currentDateTime()); - } - - QIcon getThemedIcon(const QString& name); - - void setIconTheme(const QString& name); - - // DownloadUpdateTask - std::shared_ptr updateChecker() - { - return m_updateChecker; - } - - std::shared_ptr minecraftlist(); - std::shared_ptr lwjgllist(); - std::shared_ptr forgelist(); - std::shared_ptr liteloaderlist(); - std::shared_ptr javalist(); - - // APPLICATION ONLY - std::shared_ptr instances() - { - return m_instances; - } - - // APPLICATION ONLY - std::shared_ptr accounts() - { - return m_accounts; - } - - // APPLICATION ONLY - Status status() - { - return m_status; - } - - // APPLICATION ONLY - QMap> profilers() - { - return m_profilers; - } - - // APPLICATION ONLY - QMap> tools() - { - return m_tools; - } - - // APPLICATION ONLY - void installUpdates(const QString updateFilesDir, UpdateFlags flags = None); - - /*! - * Opens a json file using either a system default editor, or, if note empty, the editor - * specified in the settings - */ - bool openJsonEditor(const QString &filename); - -protected: /* to be removed! */ - // FIXME: remove. used by MultiMCPage to enumerate translations. - /// this is the static data. it stores things that don't move. - const QString &staticData() - { - return staticDataPath; - } - - // FIXME: remove. used by MainWindow to create application update tasks - /// this is the root of the 'installation'. Used for automatic updates - const QString &root() - { - return rootPath; - } - -private slots: - /** - * Do all the things that should be done before we exit - */ - void onExit(); - -private: - void initLogger(); - - void initIcons(); - - void initGlobalSettings(bool test_mode); - - void initTranslations(); - -private: - friend class UpdateCheckerTest; - friend class DownloadTaskTest; - - QDateTime startTime; - - 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_updateChecker; - std::shared_ptr m_accounts; - std::shared_ptr m_lwjgllist; - std::shared_ptr m_forgelist; - std::shared_ptr m_liteloaderlist; - std::shared_ptr m_minecraftlist; - std::shared_ptr m_javalist; - std::shared_ptr m_translationChecker; - - QMap> m_profilers; - QMap> m_tools; - - QString m_updateOnExitPath; - UpdateFlags m_updateOnExitFlags = None; - - QString rootPath; - QString staticDataPath; - QString dataPath; - - Status m_status = MultiMC::Failed; -public: - std::shared_ptr logFile; -}; -- cgit v1.2.3