SavedAction Class

(Utils::SavedAction)

The SavedAction class is a helper class for actions with persistent state. More...

Header: #include <SavedAction>

Public Functions

QVariant defaultValue() const
void setDefaultValue(const QVariant &value)
void setSettingsGroup(const class QString &group)
void setSettingsKey(const class QString &key)
void setSettingsKey(const class QString &group, const class QString &key)
void setValue(const QVariant &value, bool doemit = true)
class QString settingsGroup() const
class QString settingsKey() const
QVariant value() const

Detailed Description

Member Function Documentation

QVariant SavedAction::defaultValue() const

Returns the default value to be used when the item does not exist yet in the settings.

See also setDefaultValue().

void SavedAction::setDefaultValue(const QVariant &value)

Sets the default value to be used when the item does not exist yet in the settings.

See also defaultValue().

void SavedAction::setSettingsGroup(const class QString &group)

Sets the group to be used when accessing the settings.

See also settingsGroup().

void SavedAction::setSettingsKey(const class QString &key)

Sets the key to be used when accessing the settings.

See also settingsKey().

void SavedAction::setSettingsKey(const class QString &group, const class QString &key)

Sets the key and group to be used when accessing the settings.

See also settingsKey().

void SavedAction::setValue(const QVariant &value, bool doemit = true)

Sets the current value of the object. If the value changed and doemit is true, the valueChanged() signal will be emitted.

See also value().

class QString SavedAction::settingsGroup() const

Sets the key to be used when accessing the settings.

See also settingsKey().

class QString SavedAction::settingsKey() const

Returns the key to be used when accessing the settings.

See also settingsKey().

QVariant SavedAction::value() const

Returns the current value of the object.

See also setValue().