Simple C++ wrapper for GConf. More...
Signals |
|
void | valueChanged () |
Public Member Functions |
|
GConfItem (const QString &key, QObject *parent=0) | |
virtual | ~GConfItem () |
QString | key () const |
QVariant | value () const |
QVariant | value (const QVariant &def) const |
void | set (const QVariant &val) |
void | unset () |
QList< QString > | listDirs () const |
QList< QString > | listEntries () const |
Simple C++ wrapper for GConf.
Initializes a GConfItem to access the GConf key denoted by key. Key names should follow the normal GConf conventions like "/myapp/settings/first".
key | The name of the key. | |
parent | Parent object |
GConfItem::~GConfItem | ( | ) | [virtual] |
Finalizes a GConfItem.
QString GConfItem::key | ( | ) | const |
Returns the key of this item, as given to the constructor.
Return a list of the directories below this item. The returned strings are absolute key names like "/myapp/settings".
A directory is a key that has children. The same key might also have a value, but that is confusing and best avoided.
Return a list of entries below this item. The returned strings are absolute key names like "/myapp/settings/first".
A entry is a key that has a value. The same key might also have children, but that is confusing and is best avoided.
void GConfItem::set | ( | const QVariant & | val | ) |
Set the value of this item to val. If val can not be represented in GConf or GConf refuses to accept it for other reasons, the current value is not changed and nothing happens.
When the new value is different from the old value, the changedValue() signal is emitted on this GConfItem as part of calling set(), but other GConfItem:s for the same key do only receive a notification once the main loop runs.
val | The new value. |
void GConfItem::unset | ( | ) |
Unset this item. This is equivalent to
item.set(QVariant(QVariant::Invalid));
Returns the current value of this item, as a QVariant. If there is no value for this item, return def instead.
void GConfItem::valueChanged | ( | ) | [signal] |
Emitted when the value of this item has changed.
(C) 2009 Nokia Corporation. LGPL Lesser General Public License |
MeeGo 1.2 Harmattan API
|