KConfigSkeletonItem Class Reference
Class for storing a preferences setting. More...
#include <kconfigskeleton.h>
Inherited by KConfigSkeletonGenericItem< T >, KConfigSkeletonGenericItem< bool >, KConfigSkeletonGenericItem< double >, KConfigSkeletonGenericItem< int >, KConfigSkeletonGenericItem< long >, KConfigSkeletonGenericItem< Q_INT64 >, KConfigSkeletonGenericItem< Q_UINT64 >, KConfigSkeletonGenericItem< QColor >, KConfigSkeletonGenericItem< QDateTime >, KConfigSkeletonGenericItem< QFont >, KConfigSkeletonGenericItem< QPoint >, KConfigSkeletonGenericItem< QRect >, KConfigSkeletonGenericItem< QSize >, KConfigSkeletonGenericItem< QString >, KConfigSkeletonGenericItem< QStringList >, KConfigSkeletonGenericItem< QValueList< int > >, KConfigSkeletonGenericItem< QVariant >, KConfigSkeletonGenericItem< unsigned int >, and KConfigSkeletonGenericItem< unsigned long >.
Public Types | |
typedef QValueList < KConfigSkeletonItem * > | List |
typedef QDict < KConfigSkeletonItem > | Dict |
typedef QDictIterator < KConfigSkeletonItem > | DictIterator |
Public Member Functions | |
KConfigSkeletonItem (const QString &group, const QString &key) | |
virtual | ~KConfigSkeletonItem () |
void | setGroup (const QString &group) |
QString | group () const |
void | setKey (const QString &key) |
QString | key () const |
void | setName (const QString &name) |
QString | name () const |
void | setLabel (const QString &l) |
QString | label () const |
void | setWhatsThis (const QString &w) |
QString | whatsThis () const |
virtual void | readConfig (KConfig *)=0 |
virtual void | writeConfig (KConfig *)=0 |
virtual void | readDefault (KConfig *)=0 |
virtual void | setProperty (const QVariant &p)=0 |
virtual QVariant | property () const =0 |
virtual QVariant | minValue () const |
virtual QVariant | maxValue () const |
virtual void | setDefault ()=0 |
virtual void | swapDefault ()=0 |
bool | isImmutable () const |
Protected Member Functions | |
void | readImmutability (KConfig *config) |
Protected Attributes | |
QString | mGroup |
QString | mKey |
QString | mName |
Detailed Description
Class for storing a preferences setting.
- See also:
- KConfigSkeleton
This class represents one preferences setting as used by KConfigSkeleton. Subclasses of KConfigSkeletonItem implement storage functions for a certain type of setting. Normally you don't have to use this class directly. Use the special addItem() functions of KConfigSkeleton instead. If you subclass this class you will have to register instances with the function KConfigSkeleton::addItem().
Definition at line 50 of file kconfigskeleton.h.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
group Config file group. key Config file key.
Definition at line 63 of file kconfigskeleton.h.
virtual KConfigSkeletonItem::~KConfigSkeletonItem | ( | ) | [inline, virtual] |
Destructor.
Definition at line 71 of file kconfigskeleton.h.
Member Function Documentation
QString KConfigSkeletonItem::group | ( | ) | const [inline] |
Return config file group.
Definition at line 86 of file kconfigskeleton.h.
bool KConfigSkeletonItem::isImmutable | ( | ) | const [inline] |
Return if the entry can be modified.
Definition at line 207 of file kconfigskeleton.h.
QString KConfigSkeletonItem::key | ( | ) | const [inline] |
Return config file key.
Definition at line 102 of file kconfigskeleton.h.
QString KConfigSkeletonItem::label | ( | ) | const [inline] |
virtual QVariant KConfigSkeletonItem::maxValue | ( | ) | const [inline, virtual] |
Return maximum value of item or invalid if not specified.
Reimplemented in KConfigSkeleton::ItemInt, KConfigSkeleton::ItemInt64, KConfigSkeleton::ItemUInt, KConfigSkeleton::ItemLong, KConfigSkeleton::ItemULong, KConfigSkeleton::ItemUInt64, and KConfigSkeleton::ItemDouble.
Definition at line 191 of file kconfigskeleton.h.
virtual QVariant KConfigSkeletonItem::minValue | ( | ) | const [inline, virtual] |
Return minimum value of item or invalid if not specified.
Reimplemented in KConfigSkeleton::ItemInt, KConfigSkeleton::ItemInt64, KConfigSkeleton::ItemUInt, KConfigSkeleton::ItemLong, KConfigSkeleton::ItemULong, KConfigSkeleton::ItemUInt64, and KConfigSkeleton::ItemDouble.
Definition at line 186 of file kconfigskeleton.h.
QString KConfigSkeletonItem::name | ( | ) | const [inline] |
Return internal name of entry.
Definition at line 118 of file kconfigskeleton.h.
virtual QVariant KConfigSkeletonItem::property | ( | ) | const [pure virtual] |
Return item as property.
Implemented in KConfigSkeleton::ItemString, KConfigSkeleton::ItemProperty, KConfigSkeleton::ItemBool, KConfigSkeleton::ItemInt, KConfigSkeleton::ItemInt64, KConfigSkeleton::ItemUInt, KConfigSkeleton::ItemLong, KConfigSkeleton::ItemULong, KConfigSkeleton::ItemUInt64, KConfigSkeleton::ItemDouble, KConfigSkeleton::ItemColor, KConfigSkeleton::ItemFont, KConfigSkeleton::ItemRect, KConfigSkeleton::ItemPoint, KConfigSkeleton::ItemSize, KConfigSkeleton::ItemDateTime, KConfigSkeleton::ItemStringList, and KConfigSkeleton::ItemIntList.
virtual void KConfigSkeletonItem::readConfig | ( | KConfig * | ) | [pure virtual] |
This function is called by KConfigSkeleton to read the value for this setting from a config file.
value.
Implemented in KConfigSkeleton::ItemString, KConfigSkeleton::ItemProperty, KConfigSkeleton::ItemBool, KConfigSkeleton::ItemInt, KConfigSkeleton::ItemInt64, KConfigSkeleton::ItemEnum, KConfigSkeleton::ItemUInt, KConfigSkeleton::ItemLong, KConfigSkeleton::ItemULong, KConfigSkeleton::ItemUInt64, KConfigSkeleton::ItemDouble, KConfigSkeleton::ItemColor, KConfigSkeleton::ItemFont, KConfigSkeleton::ItemRect, KConfigSkeleton::ItemPoint, KConfigSkeleton::ItemSize, KConfigSkeleton::ItemDateTime, KConfigSkeleton::ItemStringList, KConfigSkeleton::ItemPathList, and KConfigSkeleton::ItemIntList.
virtual void KConfigSkeletonItem::readDefault | ( | KConfig * | ) | [pure virtual] |
Read global default value.
void KConfigSkeletonItem::readImmutability | ( | KConfig * | config | ) | [protected] |
sets mIsImmutable to true if mKey in config is immutable
- Parameters:
-
config KConfig to check if mKey is immutable in
Definition at line 35 of file kconfigskeleton.cpp.
virtual void KConfigSkeletonItem::setDefault | ( | ) | [pure virtual] |
Sets the current value to the default value.
void KConfigSkeletonItem::setGroup | ( | const QString & | group | ) | [inline] |
Set config file group.
Definition at line 78 of file kconfigskeleton.h.
void KConfigSkeletonItem::setKey | ( | const QString & | key | ) | [inline] |
Set config file key.
Definition at line 94 of file kconfigskeleton.h.
void KConfigSkeletonItem::setLabel | ( | const QString & | l | ) | [inline] |
Set label providing a translated one-line description of the item.
Definition at line 126 of file kconfigskeleton.h.
void KConfigSkeletonItem::setName | ( | const QString & | name | ) | [inline] |
Set internal name of entry.
Definition at line 110 of file kconfigskeleton.h.
virtual void KConfigSkeletonItem::setProperty | ( | const QVariant & | p | ) | [pure virtual] |
Set item to p
.
Implemented in KConfigSkeleton::ItemString, KConfigSkeleton::ItemProperty, KConfigSkeleton::ItemBool, KConfigSkeleton::ItemInt, KConfigSkeleton::ItemInt64, KConfigSkeleton::ItemUInt, KConfigSkeleton::ItemLong, KConfigSkeleton::ItemULong, KConfigSkeleton::ItemUInt64, KConfigSkeleton::ItemDouble, KConfigSkeleton::ItemColor, KConfigSkeleton::ItemFont, KConfigSkeleton::ItemRect, KConfigSkeleton::ItemPoint, KConfigSkeleton::ItemSize, KConfigSkeleton::ItemDateTime, KConfigSkeleton::ItemStringList, and KConfigSkeleton::ItemIntList.
void KConfigSkeletonItem::setWhatsThis | ( | const QString & | w | ) | [inline] |
Set WhatsThis description og item.
Definition at line 142 of file kconfigskeleton.h.
virtual void KConfigSkeletonItem::swapDefault | ( | ) | [pure virtual] |
Exchanges the current value with the default value Used by KConfigSkeleton::useDefaults(bool);.
QString KConfigSkeletonItem::whatsThis | ( | ) | const [inline] |
Return WhatsThis description of item.
See setWhatsThis().
Definition at line 150 of file kconfigskeleton.h.
virtual void KConfigSkeletonItem::writeConfig | ( | KConfig * | ) | [pure virtual] |
This function is called by KConfigSkeleton to write the value of this setting to a config file.
Implemented in KConfigSkeleton::ItemString, KConfigSkeleton::ItemEnum, and KConfigSkeleton::ItemPathList.
The documentation for this class was generated from the following files: