00001 //============================================== 00002 // copyright : (C) 2003-2005 by Will Stokes 00003 //============================================== 00004 // This program is free software; you can redistribute it 00005 // and/or modify it under the terms of the GNU General 00006 // Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 //============================================== 00010 00011 #ifndef CONFIGURATION_SETTINGGROUP_H 00012 #define CONFIGURATION_SETTINGGROUP_H 00013 00014 //-------------------- 00015 //forward declarations 00016 class QString; 00017 class QTextStream; 00018 class Setting; 00019 //-------------------- 00020 00021 //===================================== 00024 //===================================== 00025 class SettingGroup 00026 { 00027 //------------------------------------------------------ 00028 public: 00030 SettingGroup(QString name); 00031 00033 ~SettingGroup(); 00034 00036 QString getName(); 00037 00039 QString getValue(QString key); 00040 00042 void setValue(QString key, QString value); 00043 00045 SettingGroup* getNext(); 00046 00048 void setNext(SettingGroup* next); 00049 00050 //loads this group from file 00051 void loadSettings(QDomNode& node); 00052 00054 void saveSettings(QTextStream& stream); 00055 00057 void resetSetting(QString key); 00058 //------------------------------------------------------ 00059 private: 00061 QString name; 00062 00064 Setting* firstSetting; 00065 00067 Setting* lastSetting; 00068 00070 SettingGroup* next; 00071 }; 00072 //------------------------------------------------------ 00073 00074 #endif //CONFIGURATION_SETTINGGROUP_H