/***************************************************************************
- * Copyright (C) 2005-07 by The Quassel Team *
+ * Copyright (C) 2005-08 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
+ * (at your option) version 3. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
public:
virtual ~Settings();
- static void setGuiValue(QString, QVariant) {};
- static QVariant guiValue(QString, QVariant = QVariant()) { return QVariant(); }
+ //static void setGuiValue(QString, QVariant) {};
+ //static QVariant guiValue(QString, QVariant = QVariant()) { return QVariant(); }
+
+ enum Mode { Default, Custom };
+
protected:
- Settings(QString group = "General");
+ Settings(QString group, QString applicationName);
void setGroup(QString group);
virtual QStringList allLocalKeys();
- virtual QStringList localChildKeys();
- virtual QStringList localChildGroups();
- //virtual QStringList allSessionKeys() = 0;
- virtual QStringList sessionKeys() = 0;
+ virtual QStringList localChildKeys(const QString &rootkey = QString());
+ virtual QStringList localChildGroups(const QString &rootkey = QString());
virtual void setLocalValue(const QString &key, const QVariant &data);
virtual QVariant localValue(const QString &key, const QVariant &def = QVariant());
- virtual void setSessionValue(const QString &key, const QVariant &data) = 0;
- virtual QVariant sessionValue(const QString &key, const QVariant &def = QVariant()) = 0;
-
virtual void removeLocalKey(const QString &key);
QString group;