35 #include "cxResourceExport.h"
37 #include "boost/shared_ptr.hpp"
58 class cxResource_EXPORT
Settings :
public QObject
64 void setValueIfNotDefault(
const QString& key,
const QVariant& value,
const QVariant& defaultValue);
66 void setValue(
const QString& key,
const QVariant& value);
67 QVariant value(
const QString& key,
const QVariant& defaultValue = QVariant())
const;
69 bool contains(
const QString& key)
const;
70 QString fileName()
const;
74 void resetFile(QString filename);
83 if (!this->contains(name))
84 this->setValue(name, value);
88 void valueChangedFor(QString key);
97 cxResource_EXPORT Settings*
settings();
Customized interface for setting values in QSettings.
boost::shared_ptr< class QSettings > QSettingsPtr
Settings * settings()
Shortcut for accessing the settings instance.
void fillDefault(QString name, T value)