+public:
+ virtual ~ClientSettings();
+
+protected:
+ ClientSettings(QString group = "General");
+};
+
+// ========================================
+// CoreAccountSettings
+// ========================================
+
+// Deriving from CoreAccountSettings:
+// MySettings() : CoreAccountSettings("MyGroup") {};
+// Then use accountValue() / setAccountValue() to retrieve/store data associated to the currently
+// connected account. This is stored in CoreAccounts/$ACCID/MyGroup/$KEY) then.
+//
+// Note that you'll get invalid data (and setting is ignored) if you are not connected to a core!
+
+class CoreAccountSettings : public ClientSettings {
+public:
+ // stores account-specific data in CoreAccounts/$ACCID/$SUBGROUP/$KEY)
+ CoreAccountSettings(const QString &subgroup = "General");
+
+ virtual void notify(const QString &key, QObject *receiver, const char *slot);
+
+ QList<AccountId> knownAccounts();
+ AccountId lastAccount();
+ void setLastAccount(AccountId);
+ AccountId autoConnectAccount();
+ void setAutoConnectAccount(AccountId);
+
+ void storeAccountData(AccountId id, const QVariantMap &data);
+ QVariantMap retrieveAccountData(AccountId);
+ void removeAccount(AccountId);
+
+ void setJumpKeyMap(const QHash<int, BufferId> &keyMap);
+ QHash<int, BufferId> jumpKeyMap();
+
+protected:
+ void setAccountValue(const QString &key, const QVariant &data);
+ QVariant accountValue(const QString &key, const QVariant &def = QVariant());