diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
commit | bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9 (patch) | |
tree | e6497e304b7b9368367565fbc7c06efab1124b1c /api/logic/minecraft/Component.h | |
parent | 03280cc62e75f8073f8d3d9e9e3952acf21fa77d (diff) | |
download | MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.gz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.lz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.xz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.zip |
NOISSUE tabs -> spaces
Diffstat (limited to 'api/logic/minecraft/Component.h')
-rw-r--r-- | api/logic/minecraft/Component.h | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/api/logic/minecraft/Component.h b/api/logic/minecraft/Component.h index 778fbb18..6a0f86c8 100644 --- a/api/logic/minecraft/Component.h +++ b/api/logic/minecraft/Component.h @@ -13,8 +13,8 @@ class ComponentList; class LaunchProfile; namespace Meta { - class Version; - class VersionList; + class Version; + class VersionList; } class VersionFile; @@ -22,90 +22,90 @@ class MULTIMC_LOGIC_EXPORT Component : public QObject, public ProblemProvider { Q_OBJECT public: - Component(ComponentList * parent, const QString &uid); + Component(ComponentList * parent, const QString &uid); - // DEPRECATED: remove these constructors? - Component(ComponentList * parent, std::shared_ptr<Meta::Version> version); - Component(ComponentList * parent, const QString & uid, std::shared_ptr<VersionFile> file); + // DEPRECATED: remove these constructors? + Component(ComponentList * parent, std::shared_ptr<Meta::Version> version); + Component(ComponentList * parent, const QString & uid, std::shared_ptr<VersionFile> file); - virtual ~Component(){}; - void applyTo(LaunchProfile *profile); + virtual ~Component(){}; + void applyTo(LaunchProfile *profile); - bool isEnabled(); - bool setEnabled (bool state); - bool canBeDisabled(); + bool isEnabled(); + bool setEnabled (bool state); + bool canBeDisabled(); - bool isMoveable(); - bool isCustomizable(); - bool isRevertible(); - bool isRemovable(); - bool isCustom(); - bool isVersionChangeable(); + bool isMoveable(); + bool isCustomizable(); + bool isRevertible(); + bool isRemovable(); + bool isCustom(); + bool isVersionChangeable(); - // DEPRECATED: explicit numeric order values, used for loading old non-component config. TODO: refactor and move to migration code - void setOrder(int order); - int getOrder(); + // DEPRECATED: explicit numeric order values, used for loading old non-component config. TODO: refactor and move to migration code + void setOrder(int order); + int getOrder(); - QString getID(); - QString getName(); - QString getVersion(); - std::shared_ptr<Meta::Version> getMeta(); - QDateTime getReleaseDateTime(); + QString getID(); + QString getName(); + QString getVersion(); + std::shared_ptr<Meta::Version> getMeta(); + QDateTime getReleaseDateTime(); - QString getFilename(); + QString getFilename(); - std::shared_ptr<class VersionFile> getVersionFile() const; - std::shared_ptr<class Meta::VersionList> getVersionList() const; + std::shared_ptr<class VersionFile> getVersionFile() const; + std::shared_ptr<class Meta::VersionList> getVersionList() const; - void setImportant (bool state); + void setImportant (bool state); - const QList<PatchProblem> getProblems() const override; - ProblemSeverity getProblemSeverity() const override; + const QList<PatchProblem> getProblems() const override; + ProblemSeverity getProblemSeverity() const override; - void setVersion(const QString & version); - bool customize(); - bool revert(); + void setVersion(const QString & version); + bool customize(); + bool revert(); - void updateCachedData(); + void updateCachedData(); signals: - void dataChanged(); + void dataChanged(); public: /* data */ - ComponentList * m_parent; - - // BEGIN: persistent component list properties - /// ID of the component - QString m_uid; - /// version of the component - when there's a custom json override, this is also the version the component reverts to - QString m_version; - /// if true, this has been added automatically to satisfy dependencies and may be automatically removed - bool m_dependencyOnly = false; - /// if true, the component is either the main component of the instance, or otherwise important and cannot be removed. - bool m_important = false; - /// if true, the component is disabled - bool m_disabled = false; - - /// cached name for display purposes, taken from the version file (meta or local override) - QString m_cachedName; - /// cached version for display AND other purposes, taken from the version file (meta or local override) - QString m_cachedVersion; - /// cached set of requirements, taken from the version file (meta or local override) - Meta::RequireSet m_cachedRequires; - Meta::RequireSet m_cachedConflicts; - /// if true, the component is volatile and may be automatically removed when no longer needed - bool m_cachedVolatile = false; - // END: persistent component list properties - - // DEPRECATED: explicit numeric order values, used for loading old non-component config. TODO: refactor and move to migration code - bool m_orderOverride = false; - int m_order = 0; - - // load state - std::shared_ptr<Meta::Version> m_metaVersion; - std::shared_ptr<VersionFile> m_file; - bool m_loaded = false; + ComponentList * m_parent; + + // BEGIN: persistent component list properties + /// ID of the component + QString m_uid; + /// version of the component - when there's a custom json override, this is also the version the component reverts to + QString m_version; + /// if true, this has been added automatically to satisfy dependencies and may be automatically removed + bool m_dependencyOnly = false; + /// if true, the component is either the main component of the instance, or otherwise important and cannot be removed. + bool m_important = false; + /// if true, the component is disabled + bool m_disabled = false; + + /// cached name for display purposes, taken from the version file (meta or local override) + QString m_cachedName; + /// cached version for display AND other purposes, taken from the version file (meta or local override) + QString m_cachedVersion; + /// cached set of requirements, taken from the version file (meta or local override) + Meta::RequireSet m_cachedRequires; + Meta::RequireSet m_cachedConflicts; + /// if true, the component is volatile and may be automatically removed when no longer needed + bool m_cachedVolatile = false; + // END: persistent component list properties + + // DEPRECATED: explicit numeric order values, used for loading old non-component config. TODO: refactor and move to migration code + bool m_orderOverride = false; + int m_order = 0; + + // load state + std::shared_ptr<Meta::Version> m_metaVersion; + std::shared_ptr<VersionFile> m_file; + bool m_loaded = false; }; typedef shared_qobject_ptr<Component> ComponentPtr; |