Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

configuration.h

Go to the documentation of this file.
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_CONFIGURATION_H 00012 #define CONFIGURATION_CONFIGURATION_H 00013 00014 //-------------------- 00015 //forward declarations 00016 class QString; 00017 class SettingGroup; 00018 //-------------------- 00019 00020 //===================================== 00023 //===================================== 00024 class Configuration 00025 { 00026 //------------------------------------------------------ 00027 public: 00029 static bool constructSettingsDirectory(); 00030 00032 Configuration(); 00033 00035 ~Configuration(); 00036 //---------------------------- 00038 bool loadSettings(); 00039 00041 bool saveSettings(); 00042 00044 void setString( QString group, QString key, QString value); 00045 00047 void setBool( QString group, QString key, bool val ); 00048 00050 void setInt( QString group, QString key, int val ); 00051 00053 QString getString(QString group, QString key); 00054 00056 bool getBool(QString group, QString key); 00057 00059 int getInt(QString group, QString key); 00060 00062 float getFloat(QString group, QString key); 00063 00065 double getDouble(QString group, QString key); 00066 00068 void resetSetting(QString group, QString key); 00069 00071 void removeGroup(QString group); 00072 //------------------------------------------------------ 00073 private: 00075 QString settingsFilename; 00076 00078 SettingGroup* firstGroup; 00079 00081 SettingGroup* lastGroup; 00082 00084 SettingGroup* curGroup; 00085 //------------------------------------------------------ 00086 }; 00087 #endif //CONFIGURATION_CONFIGURATION_H

Generated on Sun Mar 4 19:42:55 2007 for AlbumShaper by doxygen 1.3.7