summaryrefslogtreecommitdiffstats
path: root/pokescripting/Config.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/Config.h')
-rw-r--r--pokescripting/Config.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/pokescripting/Config.h b/pokescripting/Config.h
index 7d66807b..16be5ade 100644
--- a/pokescripting/Config.h
+++ b/pokescripting/Config.h
@@ -22,6 +22,7 @@
#include "Global.h"
// Qt includes
+#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QString>
@@ -44,15 +45,23 @@ class POKESCRIPTING_EXPORT Config : public QObject
Q_SCRIPTABLE QVariant value(const QString& name, const bool recursive = true) const;
Q_SCRIPTABLE bool hasValue(const QString& name, const bool recursive = false) const;
+ signals:
+ void valueAdded(const QString& name, const QVariant& value);
+ void valueChanged(const QString& name, const QVariant& oldValue, const QVariant& newValue);
+ void valueRemoved(const QString& name);
public slots:
- void addValue(const QString& name, const QVariant& value);
- void setValue(const QString& name, const QVariant& value);
+ void addValue(const QString& name, const QVariant& value, const bool temporary = false);
+ void setValue(const QString& name, const QVariant& value, const bool temporary = false);
void removeValue(const QString& name);
+ void clearTemporary();
+
virtual void writeBack();
private:
QMap<QString, QVariant> m_values;
+ QList<QString> m_temporaries;
};
}
+Q_DECLARE_METATYPE(Pokescripting::Config*)
#endif