Changeset View
Changeset View
Standalone View
Standalone View
shell/scripting/configgroup.h
Show All 16 Lines | |||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef CONFIGGROUP_H | 20 | #ifndef CONFIGGROUP_H | ||
21 | #define CONFIGGROUP_H | 21 | #define CONFIGGROUP_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QVariant> | 24 | #include <QVariant> | ||
25 | #include <QJSValue> | ||||
25 | 26 | | |||
26 | #include <KSharedConfig> | 27 | #include <KSharedConfig> | ||
27 | 28 | | |||
28 | class KConfigGroup; | 29 | class KConfigGroup; | ||
29 | class ConfigGroupPrivate; | 30 | class ConfigGroupPrivate; | ||
30 | 31 | | |||
31 | class ConfigGroup : public QObject | 32 | class ConfigGroup : public QObject | ||
32 | { | 33 | { | ||
Show All 14 Lines | 40 | public: | |||
47 | QString file() const; | 48 | QString file() const; | ||
48 | void setFile(const QString &filename); | 49 | void setFile(const QString &filename); | ||
49 | QString group() const; | 50 | QString group() const; | ||
50 | void setGroup(const QString &groupname); | 51 | void setGroup(const QString &groupname); | ||
51 | QStringList keyList() const; | 52 | QStringList keyList() const; | ||
52 | QStringList groupList() const; | 53 | QStringList groupList() const; | ||
53 | 54 | | |||
54 | Q_INVOKABLE QVariant readEntry(const QString &key); | 55 | Q_INVOKABLE QVariant readEntry(const QString &key); | ||
55 | Q_INVOKABLE bool writeEntry(const QString &key, const QVariant &value); | 56 | Q_INVOKABLE bool writeEntry(const QString &key, const QJSValue &value); | ||
56 | Q_INVOKABLE void deleteEntry(const QString& key); | 57 | Q_INVOKABLE void deleteEntry(const QString& key); | ||
57 | 58 | | |||
58 | Q_SIGNALS: | 59 | Q_SIGNALS: | ||
59 | void fileChanged(); | 60 | void fileChanged(); | ||
60 | void groupChanged(); | 61 | void groupChanged(); | ||
61 | void keyListChanged(); | 62 | void keyListChanged(); | ||
62 | void groupListChanged(); | 63 | void groupListChanged(); | ||
63 | 64 | | |||
Show All 10 Lines |