KDEUI
KConfigSkeleton Class Reference
#include <kconfigskeleton.h>
Inheritance diagram for KConfigSkeleton:

Classes | |
class | ItemColor |
class | ItemFont |
Public Member Functions | |
KConfigSkeleton (const QString &configname=QString(), QObject *parent=0) | |
KConfigSkeleton (KSharedConfig::Ptr config, QObject *parent=0) | |
ItemColor * | addItemColor (const QString &name, QColor &reference, const QColor &defaultValue=QColor(128, 128, 128), const QString &key=QString()) |
ItemFont * | addItemFont (const QString &name, QFont &reference, const QFont &defaultValue=QFont(), const QString &key=QString()) |
![]() | |
KCoreConfigSkeleton (const QString &configname=QString(), QObject *parent=0) | |
KCoreConfigSkeleton (KSharedConfig::Ptr config, QObject *parent=0) | |
virtual | ~KCoreConfigSkeleton () |
void | addItem (KConfigSkeletonItem *, const QString &name=QString()) |
ItemBool * | addItemBool (const QString &name, bool &reference, bool defaultValue=false, const QString &key=QString()) |
ItemDateTime * | addItemDateTime (const QString &name, QDateTime &reference, const QDateTime &defaultValue=QDateTime(), const QString &key=QString()) |
ItemDouble * | addItemDouble (const QString &name, double &reference, double defaultValue=0.0, const QString &key=QString()) |
ItemInt * | addItemInt (const QString &name, qint32 &reference, qint32 defaultValue=0, const QString &key=QString()) |
ItemLongLong * | addItemInt64 (const QString &name, qint64 &reference, qint64 defaultValue=0, const QString &key=QString()) |
ItemIntList * | addItemIntList (const QString &name, QList< int > &reference, const QList< int > &defaultValue=QList< int >(), const QString &key=QString()) |
ItemLongLong * | addItemLongLong (const QString &name, qint64 &reference, qint64 defaultValue=0, const QString &key=QString()) |
ItemPassword * | addItemPassword (const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString()) |
ItemPath * | addItemPath (const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString()) |
ItemPoint * | addItemPoint (const QString &name, QPoint &reference, const QPoint &defaultValue=QPoint(), const QString &key=QString()) |
ItemProperty * | addItemProperty (const QString &name, QVariant &reference, const QVariant &defaultValue=QVariant(), const QString &key=QString()) |
ItemRect * | addItemRect (const QString &name, QRect &reference, const QRect &defaultValue=QRect(), const QString &key=QString()) |
ItemSize * | addItemSize (const QString &name, QSize &reference, const QSize &defaultValue=QSize(), const QString &key=QString()) |
ItemString * | addItemString (const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString()) |
ItemStringList * | addItemStringList (const QString &name, QStringList &reference, const QStringList &defaultValue=QStringList(), const QString &key=QString()) |
ItemUInt * | addItemUInt (const QString &name, quint32 &reference, quint32 defaultValue=0, const QString &key=QString()) |
ItemULongLong * | addItemUInt64 (const QString &name, quint64 &reference, quint64 defaultValue=0, const QString &key=QString()) |
ItemULongLong * | addItemULongLong (const QString &name, quint64 &reference, quint64 defaultValue=0, const QString &key=QString()) |
KConfig * | config () |
const KConfig * | config () const |
QString | currentGroup () const |
KConfigSkeletonItem * | findItem (const QString &name) |
KConfigSkeletonItem * | findItem (const QString &name) const |
bool | isImmutable (const QString &name) |
bool | isImmutable (const QString &name) const |
KConfigSkeletonItem::List | items () const |
virtual void | readConfig () |
void | setCurrentGroup (const QString &group) |
virtual void | setDefaults () |
void | setSharedConfig (KSharedConfig::Ptr pConfig) |
virtual bool | useDefaults (bool b) |
virtual void | writeConfig () |
Additional Inherited Members | |
![]() | |
typedef ItemLongLong | ItemInt64 |
typedef ItemULongLong | ItemUInt64 |
![]() | |
void | configChanged () |
![]() | |
virtual void | usrReadConfig () |
virtual void | usrSetDefaults () |
virtual bool | usrUseDefaults (bool b) |
virtual void | usrWriteConfig () |
Detailed Description
Class for handling preferences settings for an application.
This class extends KCoreConfigSkeleton by support for GUI types.
Definition at line 40 of file kconfigskeleton.h.
Constructor & Destructor Documentation
◆ KConfigSkeleton() [1/2]
|
explicit |
Constructor.
- Parameters
-
configname name of config file. If no name is given, the default config file as returned by KGlobal::config() is used.
Definition at line 26 of file kconfigskeleton.cpp.
◆ KConfigSkeleton() [2/2]
|
explicit |
Constructor.
- Parameters
-
config configuration object to use.
Definition at line 31 of file kconfigskeleton.cpp.
Member Function Documentation
◆ addItemColor()
KConfigSkeleton::ItemColor * KConfigSkeleton::addItemColor | ( | const QString & | name, |
QColor & | reference, | ||
const QColor & | defaultValue = QColor(128, 128, 128) , |
||
const QString & | key = QString() |
||
) |
Register an item of type QColor.
- Parameters
-
name Name used to identify this setting. Names must be unique. reference Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue Default value, which is used when the config file does not yet contain the key of this item. key Key used in config file. If key is null, name is used as key.
- Returns
- The created item
Definition at line 101 of file kconfigskeleton.cpp.
◆ addItemFont()
KConfigSkeleton::ItemFont * KConfigSkeleton::addItemFont | ( | const QString & | name, |
QFont & | reference, | ||
const QFont & | defaultValue = QFont() , |
||
const QString & | key = QString() |
||
) |
Register an item of type QFont.
- Parameters
-
name Name used to identify this setting. Names must be unique. reference Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue Default value, which is used when the config file does not yet contain the key of this item. key Key used in config file. If key is null, name is used as key.
- Returns
- The created item
Definition at line 111 of file kconfigskeleton.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.