diff options
author | Andrew <forkk@forkk.net> | 2013-02-25 13:24:46 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-02-25 13:24:46 -0600 |
commit | 498225debdb22d83e591635dbd172cca12476279 (patch) | |
tree | e26d8f8de3bed7d22cfc25ee010c999b9481ec87 /libinstance/include/instance.h | |
parent | a7111b132873e0f1e00221b2ad734454d69889e3 (diff) | |
download | MultiMC-498225debdb22d83e591635dbd172cca12476279.tar MultiMC-498225debdb22d83e591635dbd172cca12476279.tar.gz MultiMC-498225debdb22d83e591635dbd172cca12476279.tar.lz MultiMC-498225debdb22d83e591635dbd172cca12476279.tar.xz MultiMC-498225debdb22d83e591635dbd172cca12476279.zip |
Rewrote the settings system. It may still need some work.
Diffstat (limited to 'libinstance/include/instance.h')
-rw-r--r-- | libinstance/include/instance.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/libinstance/include/instance.h b/libinstance/include/instance.h index 7b3c001d..b99d9953 100644 --- a/libinstance/include/instance.h +++ b/libinstance/include/instance.h @@ -19,17 +19,10 @@ #include <QObject> #include <QDateTime> -#include "appsettings.h" #include "inifile.h" #include "libinstance_config.h" -#define DEFINE_OVERRIDDEN_SETTING_ADVANCED(funcName, cfgEntryName, typeName) \ - typeName get ## funcName() const { return getField(cfgEntryName, settings->get ## funcName()).value<typeName>(); } - -#define DEFINE_OVERRIDDEN_SETTING(funcName, typeName) \ - DEFINE_OVERRIDDEN_SETTING_ADVANCED(funcName, STR_VAL(funcName), typeName) - class InstanceList; /*! @@ -40,7 +33,7 @@ class InstanceList; * To create a new instance type, create a new class inheriting from this class * and implement the pure virtual functions. */ -class LIBMMCINST_EXPORT Instance : public SettingsBase +class LIBMMCINST_EXPORT Instance : public QObject { Q_OBJECT public: @@ -261,27 +254,6 @@ public: //! Gets the path to the instance's modlist file. QString modListFile() const; - ////// Settings ////// - - //// Java Settings //// - DEFINE_OVERRIDDEN_SETTING_ADVANCED(JavaPath, JPATHKEY, QString) - DEFINE_OVERRIDDEN_SETTING(JvmArgs, QString) - - //// Custom Commands //// - DEFINE_OVERRIDDEN_SETTING(PreLaunchCommand, QString) - DEFINE_OVERRIDDEN_SETTING(PostExitCommand, QString) - - //// Memory //// - DEFINE_OVERRIDDEN_SETTING(MinMemAlloc, int) - DEFINE_OVERRIDDEN_SETTING(MaxMemAlloc, int) - - //// Auto login //// - DEFINE_OVERRIDDEN_SETTING(AutoLogin, bool) - - // This little guy here is to keep Qt Creator from being a dumbass and - // auto-indenting the lines below the macros. Seriously, it's really annoying. - ; - //////// OTHER FUNCTIONS //////// @@ -327,12 +299,6 @@ protected: */ virtual void setField(const QString &name, QVariant val); - // Overrides for SettingBase stuff. - virtual QVariant getValue(const QString &name, QVariant defVal = QVariant()) const - { return settings->getValue(name, defVal); } - virtual void setValue(const QString &name, QVariant val) - { setField(name, val); } - INIFile config; private: |