KDECore
#include <KConfigSkeletonItem>
Public Types | |
typedef QHash< QString, KConfigSkeletonItem * > | Dict |
typedef QHash< QString, KConfigSkeletonItem * > ::Iterator | DictIterator |
typedef QList < KConfigSkeletonItem * > | List |
Public Member Functions | |
KConfigSkeletonItem (const QString &_group, const QString &_key) | |
virtual | ~KConfigSkeletonItem () |
QString | group () const |
virtual bool | isEqual (const QVariant &p) const =0 |
bool | isImmutable () 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 |
virtual void | readDefault (KConfig *)=0 |
virtual void | setDefault ()=0 |
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) |
virtual void | swapDefault ()=0 |
QString | toolTip () const |
QString | whatsThis () const |
virtual void | writeConfig (KConfig *)=0 |
Protected Member Functions | |
void | readImmutability (const KConfigGroup &group) |
Protected Attributes | |
QString | mGroup |
QString | mKey |
QString | mName |
Detailed Description
Class for storing a preferences setting.
- See also
- KCoreConfigSkeleton
This class represents one preferences setting as used by KCoreConfigSkeleton. 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 KCoreConfigSkeleton instead. If you subclass this class you will have to register instances with the function KCoreConfigSkeleton::addItem().
Definition at line 52 of file kcoreconfigskeleton.h.
Member Typedef Documentation
typedef QHash< QString, KConfigSkeletonItem* > KConfigSkeletonItem::Dict |
Definition at line 56 of file kcoreconfigskeleton.h.
typedef QHash< QString, KConfigSkeletonItem* >::Iterator KConfigSkeletonItem::DictIterator |
Definition at line 57 of file kcoreconfigskeleton.h.
typedef QList< KConfigSkeletonItem * > KConfigSkeletonItem::List |
Definition at line 55 of file kcoreconfigskeleton.h.
Constructor & Destructor Documentation
Constructor.
- Parameters
-
_group Config file group. _key Config file key.
Definition at line 30 of file kcoreconfigskeleton.cpp.
|
virtual |
Destructor.
Definition at line 38 of file kcoreconfigskeleton.cpp.
Member Function Documentation
QString KConfigSkeletonItem::group | ( | ) | const |
Return config file group.
Definition at line 48 of file kcoreconfigskeleton.cpp.
Check whether the item is equal to p.
Use this function to compare items that use custom types such as KUrl, because QVariant::operator== will not work for those.
- Parameters
-
p QVariant to compare to
- Returns
- true if the item is equal to p, false otherwise
Implemented in KCoreConfigSkeleton::ItemIntList, KCoreConfigSkeleton::ItemUrlList, KCoreConfigSkeleton::ItemStringList, KCoreConfigSkeleton::ItemDateTime, KCoreConfigSkeleton::ItemSize, KCoreConfigSkeleton::ItemPoint, KCoreConfigSkeleton::ItemRect, KCoreConfigSkeleton::ItemDouble, KCoreConfigSkeleton::ItemULongLong, KCoreConfigSkeleton::ItemUInt, KCoreConfigSkeleton::ItemLongLong, KCoreConfigSkeleton::ItemInt, KCoreConfigSkeleton::ItemBool, KCoreConfigSkeleton::ItemProperty, KCoreConfigSkeleton::ItemUrl, and KCoreConfigSkeleton::ItemString.
bool KConfigSkeletonItem::isImmutable | ( | ) | const |
Return if the entry can be modified.
Definition at line 113 of file kcoreconfigskeleton.cpp.
QString KConfigSkeletonItem::key | ( | ) | const |
Return config file key.
Definition at line 58 of file kcoreconfigskeleton.cpp.
QString KConfigSkeletonItem::label | ( | ) | const |
|
virtual |
Return maximum value of item or invalid if not specified.
Reimplemented in KCoreConfigSkeleton::ItemDouble, KCoreConfigSkeleton::ItemULongLong, KCoreConfigSkeleton::ItemUInt, KCoreConfigSkeleton::ItemLongLong, and KCoreConfigSkeleton::ItemInt.
Definition at line 108 of file kcoreconfigskeleton.cpp.
|
virtual |
Return minimum value of item or invalid if not specified.
Reimplemented in KCoreConfigSkeleton::ItemDouble, KCoreConfigSkeleton::ItemULongLong, KCoreConfigSkeleton::ItemUInt, KCoreConfigSkeleton::ItemLongLong, and KCoreConfigSkeleton::ItemInt.
Definition at line 103 of file kcoreconfigskeleton.cpp.
QString KConfigSkeletonItem::name | ( | ) | const |
Return internal name of entry.
Definition at line 68 of file kcoreconfigskeleton.cpp.
|
pure virtual |
Return item as property.
Implemented in KCoreConfigSkeleton::ItemIntList, KCoreConfigSkeleton::ItemUrlList, KCoreConfigSkeleton::ItemStringList, KCoreConfigSkeleton::ItemDateTime, KCoreConfigSkeleton::ItemSize, KCoreConfigSkeleton::ItemPoint, KCoreConfigSkeleton::ItemRect, KCoreConfigSkeleton::ItemDouble, KCoreConfigSkeleton::ItemULongLong, KCoreConfigSkeleton::ItemUInt, KCoreConfigSkeleton::ItemLongLong, KCoreConfigSkeleton::ItemInt, KCoreConfigSkeleton::ItemBool, KCoreConfigSkeleton::ItemProperty, KCoreConfigSkeleton::ItemUrl, and KCoreConfigSkeleton::ItemString.
|
pure virtual |
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Implemented in KCoreConfigSkeleton::ItemIntList, KCoreConfigSkeleton::ItemUrlList, KCoreConfigSkeleton::ItemPathList, KCoreConfigSkeleton::ItemStringList, KCoreConfigSkeleton::ItemDateTime, KCoreConfigSkeleton::ItemSize, KCoreConfigSkeleton::ItemPoint, KCoreConfigSkeleton::ItemRect, KCoreConfigSkeleton::ItemDouble, KCoreConfigSkeleton::ItemULongLong, KCoreConfigSkeleton::ItemUInt, KCoreConfigSkeleton::ItemEnum, KCoreConfigSkeleton::ItemLongLong, KCoreConfigSkeleton::ItemInt, KCoreConfigSkeleton::ItemBool, KCoreConfigSkeleton::ItemProperty, KCoreConfigSkeleton::ItemUrl, and KCoreConfigSkeleton::ItemString.
|
pure virtual |
Read global default value.
Implemented in KConfigSkeletonGenericItem< T >, KConfigSkeletonGenericItem< QList< int > >, KConfigSkeletonGenericItem< quint64 >, KConfigSkeletonGenericItem< double >, KConfigSkeletonGenericItem< QString >, KConfigSkeletonGenericItem< QVariant >, KConfigSkeletonGenericItem< KUrl >, KConfigSkeletonGenericItem< KUrl::List >, KConfigSkeletonGenericItem< QDateTime >, KConfigSkeletonGenericItem< QSize >, KConfigSkeletonGenericItem< bool >, KConfigSkeletonGenericItem< qint64 >, KConfigSkeletonGenericItem< quint32 >, KConfigSkeletonGenericItem< qint32 >, KConfigSkeletonGenericItem< QStringList >, KConfigSkeletonGenericItem< QRect >, and KConfigSkeletonGenericItem< QPoint >.
|
protected |
sets mIsImmutable to true if mKey in config is immutable
- Parameters
-
group KConfigGroup to check if mKey is immutable in
Definition at line 118 of file kcoreconfigskeleton.cpp.
|
pure virtual |
Sets the current value to the default value.
Implemented in KConfigSkeletonGenericItem< T >, KConfigSkeletonGenericItem< QList< int > >, KConfigSkeletonGenericItem< quint64 >, KConfigSkeletonGenericItem< double >, KConfigSkeletonGenericItem< QString >, KConfigSkeletonGenericItem< QVariant >, KConfigSkeletonGenericItem< KUrl >, KConfigSkeletonGenericItem< KUrl::List >, KConfigSkeletonGenericItem< QDateTime >, KConfigSkeletonGenericItem< QSize >, KConfigSkeletonGenericItem< bool >, KConfigSkeletonGenericItem< qint64 >, KConfigSkeletonGenericItem< quint32 >, KConfigSkeletonGenericItem< qint32 >, KConfigSkeletonGenericItem< QStringList >, KConfigSkeletonGenericItem< QRect >, and KConfigSkeletonGenericItem< QPoint >.
void KConfigSkeletonItem::setGroup | ( | const QString & | _group | ) |
Set config file group.
Definition at line 43 of file kcoreconfigskeleton.cpp.
void KConfigSkeletonItem::setKey | ( | const QString & | _key | ) |
Set config file key.
Definition at line 53 of file kcoreconfigskeleton.cpp.
void KConfigSkeletonItem::setLabel | ( | const QString & | l | ) |
Set label providing a translated one-line description of the item.
Definition at line 73 of file kcoreconfigskeleton.cpp.
void KConfigSkeletonItem::setName | ( | const QString & | _name | ) |
Set internal name of entry.
Definition at line 63 of file kcoreconfigskeleton.cpp.
|
pure virtual |
Set item to p
.
Implemented in KCoreConfigSkeleton::ItemIntList, KCoreConfigSkeleton::ItemUrlList, KCoreConfigSkeleton::ItemStringList, KCoreConfigSkeleton::ItemDateTime, KCoreConfigSkeleton::ItemSize, KCoreConfigSkeleton::ItemPoint, KCoreConfigSkeleton::ItemRect, KCoreConfigSkeleton::ItemDouble, KCoreConfigSkeleton::ItemULongLong, KCoreConfigSkeleton::ItemUInt, KCoreConfigSkeleton::ItemLongLong, KCoreConfigSkeleton::ItemInt, KCoreConfigSkeleton::ItemBool, KCoreConfigSkeleton::ItemProperty, KCoreConfigSkeleton::ItemUrl, and KCoreConfigSkeleton::ItemString.
void KConfigSkeletonItem::setToolTip | ( | const QString & | t | ) |
void KConfigSkeletonItem::setWhatsThis | ( | const QString & | w | ) |
Set WhatsThis description of item.
Definition at line 93 of file kcoreconfigskeleton.cpp.
|
pure virtual |
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Implemented in KConfigSkeletonGenericItem< T >, KConfigSkeletonGenericItem< QList< int > >, KConfigSkeletonGenericItem< quint64 >, KConfigSkeletonGenericItem< double >, KConfigSkeletonGenericItem< QString >, KConfigSkeletonGenericItem< QVariant >, KConfigSkeletonGenericItem< KUrl >, KConfigSkeletonGenericItem< KUrl::List >, KConfigSkeletonGenericItem< QDateTime >, KConfigSkeletonGenericItem< QSize >, KConfigSkeletonGenericItem< bool >, KConfigSkeletonGenericItem< qint64 >, KConfigSkeletonGenericItem< quint32 >, KConfigSkeletonGenericItem< qint32 >, KConfigSkeletonGenericItem< QStringList >, KConfigSkeletonGenericItem< QRect >, and KConfigSkeletonGenericItem< QPoint >.
QString KConfigSkeletonItem::toolTip | ( | ) | const |
Return ToolTip description of item.
See setToolTip().
- Since
- 4.2
Definition at line 88 of file kcoreconfigskeleton.cpp.
QString KConfigSkeletonItem::whatsThis | ( | ) | const |
Return WhatsThis description of item.
See setWhatsThis().
Definition at line 98 of file kcoreconfigskeleton.cpp.
|
pure virtual |
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Implemented in KCoreConfigSkeleton::ItemUrlList, KCoreConfigSkeleton::ItemPathList, KCoreConfigSkeleton::ItemEnum, KCoreConfigSkeleton::ItemUrl, KCoreConfigSkeleton::ItemString, KConfigSkeletonGenericItem< T >, KConfigSkeletonGenericItem< QList< int > >, KConfigSkeletonGenericItem< quint64 >, KConfigSkeletonGenericItem< double >, KConfigSkeletonGenericItem< QString >, KConfigSkeletonGenericItem< QVariant >, KConfigSkeletonGenericItem< KUrl >, KConfigSkeletonGenericItem< KUrl::List >, KConfigSkeletonGenericItem< QDateTime >, KConfigSkeletonGenericItem< QSize >, KConfigSkeletonGenericItem< bool >, KConfigSkeletonGenericItem< qint64 >, KConfigSkeletonGenericItem< quint32 >, KConfigSkeletonGenericItem< qint32 >, KConfigSkeletonGenericItem< QStringList >, KConfigSkeletonGenericItem< QRect >, and KConfigSkeletonGenericItem< QPoint >.
Member Data Documentation
|
protected |
The group name for this item.
Definition at line 205 of file kcoreconfigskeleton.h.
|
protected |
The config key for this item.
Definition at line 206 of file kcoreconfigskeleton.h.
|
protected |
The name of this item.
Definition at line 207 of file kcoreconfigskeleton.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.