From 6a462d0778e27379c3b22b3a1a0339093819d3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 3 Dec 2017 15:48:25 +0100 Subject: GH-1082 allow disabling components Currently only ones that are removable and aren't dep-only --- api/logic/minecraft/Component.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'api/logic/minecraft/Component.h') diff --git a/api/logic/minecraft/Component.h b/api/logic/minecraft/Component.h index 4917149b..778fbb18 100644 --- a/api/logic/minecraft/Component.h +++ b/api/logic/minecraft/Component.h @@ -31,6 +31,10 @@ public: virtual ~Component(){}; void applyTo(LaunchProfile *profile); + bool isEnabled(); + bool setEnabled (bool state); + bool canBeDisabled(); + bool isMoveable(); bool isCustomizable(); bool isRevertible(); @@ -55,6 +59,7 @@ public: void setImportant (bool state); + const QList getProblems() const override; ProblemSeverity getProblemSeverity() const override; @@ -79,6 +84,8 @@ public: /* data */ 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; -- cgit v1.2.3