00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00028 #ifndef SETTINGS_H
00029 #define SETTINGS_H
00030
00031 #include <QString>
00032 #include <QHash>
00033 #include "CommonDictInterface.h"
00034
00035 class CommonDictInterface;
00036
00042 class Settings {
00043 public:
00044 Settings(){}
00045 Settings(const Settings* set) {
00046 _settings = QHash<QString, QString>(set->_settings);
00047 }
00048
00052 QString value(const QString key) const {
00053 if(!_settings.contains(key)) {
00054 return QString();
00055 }
00056 return _settings[key];
00057 }
00058
00060 void setValue(const QString key, const QString value) {
00061 _settings.insert(key, value);
00062 }
00063
00064 QList<QString> keys() const {
00065 return _settings.keys();
00066 }
00067
00068 private:
00069 QHash<QString, QString> _settings;
00070 };
00071
00072 #endif // SETTINGS_H