• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.2 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Classes | Public Member Functions
KConfigSkeleton Class Reference

#include <kconfigskeleton.h>

Inheritance diagram for KConfigSkeleton:
KCoreConfigSkeleton QObject

List of all members.

Classes

class  ItemColor
 Class for handling a color preferences item. More...
class  ItemFont
 Class for handling a font preferences item. More...

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())
- Public Member Functions inherited from KCoreConfigSkeleton
 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) const
KConfigSkeletonItem * findItem (const QString &name)
bool isImmutable (const QString &name) const
bool isImmutable (const QString &name)
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

- Public Types inherited from KCoreConfigSkeleton
typedef ItemLongLong ItemInt64
typedef ItemULongLong ItemUInt64
- Signals inherited from KCoreConfigSkeleton
void configChanged ()
- Protected Member Functions inherited from KCoreConfigSkeleton
virtual void usrReadConfig ()
virtual void usrSetDefaults ()
virtual bool usrUseDefaults (bool b)
virtual void usrWriteConfig ()

Detailed Description

Class for handling preferences settings for an application.

Author:
Cornelius Schumacher

This class extends KCoreConfigSkeleton by support for GUI types.

Definition at line 40 of file kconfigskeleton.h.


Constructor & Destructor Documentation

KConfigSkeleton::KConfigSkeleton ( const QString &  configname = QString(),
QObject *  parent = 0 
)
explicit

Constructor.

Parameters:
confignamename 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::KConfigSkeleton ( KSharedConfig::Ptr  config,
QObject *  parent = 0 
)
explicit

Constructor.

Parameters:
configconfiguration object to use.

Definition at line 31 of file kconfigskeleton.cpp.


Member Function Documentation

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:
nameName used to identify this setting. Names must be unique.
referencePointer to the variable, which is set by readConfig() calls and read by writeConfig() calls.
defaultValueDefault value, which is used when the config file does not yet contain the key of this item.
keyKey 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.

KConfigSkeleton::ItemFont * KConfigSkeleton::addItemFont ( const QString &  name,
QFont &  reference,
const QFont &  defaultValue = QFont(),
const QString &  key = QString() 
)

Register an item of type QFont.

Parameters:
nameName used to identify this setting. Names must be unique.
referencePointer to the variable, which is set by readConfig() calls and read by writeConfig() calls.
defaultValueDefault value, which is used when the config file does not yet contain the key of this item.
keyKey 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:
  • kconfigskeleton.h
  • kconfigskeleton.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sun Apr 28 2013 14:26:18 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.10.2 API Reference

Skip menu "kdelibs-4.10.2 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal