bbob_settings.h

Go to the documentation of this file.
00001 #ifndef BBOB_SETTINGS_H
00002 #define BBOB_SETTINGS_H
00003 
00004 #include <QApplication>
00005 #include <QSettings>
00006 #include <QStringList>
00007 
00008 
00009 /// Wrapper for QSettings
00010 class BBoB_Settings
00011 {
00012 
00013 public:
00014     BBoB_Settings(QString program);
00015     ~BBoB_Settings();
00016 
00017     QString Program;
00018 
00019     QString groupName;
00020 
00021     QSettings* settings;
00022 
00023     ///QSettings::value() for the key name
00024     QVariant getValue(QString name, QVariant default_string);
00025 
00026     /// QSettings::value() for the group and key name
00027     QVariant getValue(QString group, QString name, QVariant default_value);
00028 
00029     /// QSettings::childGroups() for the group
00030     QStringList getGroups(QString group);
00031 
00032     /// QSettings::allKeys() for the group
00033     QStringList getValues(QString group);
00034 
00035     void setValue( QString key, QVariant value );
00036     void setValue( QString group, QString key, QVariant value );
00037     QStringList getList(QString group);
00038     QVariant getListValue(QString group, QString name, QVariant default_value);
00039     void setList(QString name);
00040     void writeList(QString group, QString key, QVariant value);
00041 
00042     void removeValues(QString group, QString key);
00043 
00044     void Sync();
00045 };
00046 
00047 #endif
00048 

Generated on Sun Oct 28 22:51:26 2007 for BBoB by  doxygen 1.5.3