KConfigSkeletonGenericItem
#include <KCoreConfigSkeleton>
Public Member Functions | |
KConfigSkeletonGenericItem (const QString &_group, const QString &_key, T &reference, T defaultValue) | |
void | readDefault (KConfig *config) override |
void | setDefault () override |
virtual void | setDefaultValue (const T &v) |
void | setValue (const T &v) |
void | swapDefault () override |
T & | value () |
const T & | value () const |
void | writeConfig (KConfig *config) override |
Public Member Functions inherited from KConfigSkeletonItem | |
KConfigSkeletonItem (const QString &_group, const QString &_key) | |
virtual | ~KConfigSkeletonItem () |
KConfigGroup | configGroup (KConfig *config) const |
QVariant | getDefault () const |
QString | group () const |
bool | isDefault () const |
virtual bool | isEqual (const QVariant &p) const =0 |
bool | isImmutable () const |
bool | isSaveNeeded () const |
QString | key () const |
QString | label () const |
virtual QVariant | maxValue () const |
virtual QVariant | minValue () const |
QString | name () const |
virtual QVariant | property () const =0 |
virtual void | readConfig (KConfig *)=0 |
void | setGroup (const KConfigGroup &cg) |
void | setGroup (const QString &_group) |
void | setKey (const QString &_key) |
void | setLabel (const QString &l) |
void | setName (const QString &_name) |
virtual void | setProperty (const QVariant &p)=0 |
void | setToolTip (const QString &t) |
void | setWhatsThis (const QString &w) |
void | setWriteFlags (KConfigBase::WriteConfigFlags flags) |
QString | toolTip () const |
QString | whatsThis () const |
KConfigBase::WriteConfigFlags | writeFlags () const |
Protected Attributes | |
T | mDefault |
T | mLoadedValue |
T & | mReference |
Protected Attributes inherited from KConfigSkeletonItem | |
KConfigSkeletonItemPrivate *const | d_ptr |
QString | mGroup |
QString | mKey |
QString | mName |
Additional Inherited Members | |
Public Types inherited from KConfigSkeletonItem | |
typedef QHash< QString, KConfigSkeletonItem * > | Dict |
typedef QHash< QString, KConfigSkeletonItem * >::Iterator | DictIterator |
typedef QList< KConfigSkeletonItem * > | List |
Protected Member Functions inherited from KConfigSkeletonItem | |
KCONFIGCORE_NO_EXPORT | KConfigSkeletonItem (KConfigSkeletonItemPrivate &dd, const QString &_group, const QString &_key) |
void | readImmutability (const KConfigGroup &group) |
void | setGetDefaultImpl (const std::function< QVariant()> &impl) |
void | setIsDefaultImpl (const std::function< bool()> &impl) |
void | setIsSaveNeededImpl (const std::function< bool()> &impl) |
Detailed Description
class KConfigSkeletonGenericItem< T >
Base class for storing a preferences setting of type T
.
Definition at line 325 of file kcoreconfigskeleton.h.
Constructor & Destructor Documentation
◆ KConfigSkeletonGenericItem()
|
inline |
Constructor.
- Parameters
-
_group Config file group. _key Config file key. reference The initial value to hold in the item defaultValue The default value for the item
Definition at line 333 of file kcoreconfigskeleton.h.
Member Function Documentation
◆ readDefault()
|
inlineoverridevirtual |
Read global default value.
Implements KConfigSkeletonItem.
Definition at line 405 of file kcoreconfigskeleton.h.
◆ setDefault()
|
inlineoverridevirtual |
Set the value for this item to the default value.
Implements KConfigSkeletonItem.
Definition at line 385 of file kcoreconfigskeleton.h.
◆ setDefaultValue()
|
inlinevirtual |
Set default value for this item.
Definition at line 377 of file kcoreconfigskeleton.h.
◆ setValue()
|
inline |
Set value of this KConfigSkeletonItem.
Definition at line 353 of file kcoreconfigskeleton.h.
◆ swapDefault()
|
inlineoverridevirtual |
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Implements KConfigSkeletonItem.
Definition at line 414 of file kcoreconfigskeleton.h.
◆ value() [1/2]
|
inline |
Return value of this KConfigSkeletonItem.
Definition at line 361 of file kcoreconfigskeleton.h.
◆ value() [2/2]
|
inline |
Return const value of this KConfigSkeletonItem.
Definition at line 369 of file kcoreconfigskeleton.h.
◆ writeConfig()
|
inlineoverridevirtual |
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Make sure to pass writeFlags() to every call of KConfigGroup::writeEntry() and KConfigGroup::revertToDefault().
Implements KConfigSkeletonItem.
Definition at line 391 of file kcoreconfigskeleton.h.
Member Data Documentation
◆ mDefault
|
protected |
The default value for this item.
Definition at line 423 of file kcoreconfigskeleton.h.
◆ mLoadedValue
|
protected |
Definition at line 424 of file kcoreconfigskeleton.h.
◆ mReference
|
protected |
Stores the value for this item.
Definition at line 422 of file kcoreconfigskeleton.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.