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

KDECore

Public Types | Public Member Functions | Protected Member Functions | List of all members
KConfigBase Class Referenceabstract

#include <KConfigBase>

Inheritance diagram for KConfigBase:
Inheritance graph
[legend]

Public Types

enum  AccessMode { NoAccess, ReadOnly, ReadWrite }
 
enum  WriteConfigFlag { Persistent = 0x01, Global = 0x02, Localized = 0x04, Normal =Persistent }
 

Public Member Functions

virtual ~KConfigBase ()
 
virtual AccessMode accessMode () const =0
 
void deleteGroup (const QByteArray &group, WriteConfigFlags flags=Normal)
 
void deleteGroup (const QString &group, WriteConfigFlags flags=Normal)
 
void deleteGroup (const char *group, WriteConfigFlags flags=Normal)
 
KConfigGroup group (const QByteArray &group)
 
KConfigGroup group (const QString &group)
 
KConfigGroup group (const char *group)
 
const KConfigGroup group (const QByteArray &group) const
 
const KConfigGroup group (const QString &group) const
 
const KConfigGroup group (const char *group) const
 
virtual QStringList groupList () const =0
 
bool hasGroup (const QString &group) const
 
bool hasGroup (const char *group) const
 
bool hasGroup (const QByteArray &group) const
 
bool isGroupImmutable (const QByteArray &aGroup) const
 
bool isGroupImmutable (const QString &aGroup) const
 
bool isGroupImmutable (const char *aGroup) const
 
virtual bool isImmutable () const =0
 
virtual void markAsClean ()=0
 
virtual void sync ()=0
 

Protected Member Functions

 KConfigBase ()
 
virtual void deleteGroupImpl (const QByteArray &group, WriteConfigFlags flags=Normal)=0
 
virtual KConfigGroup groupImpl (const QByteArray &b)=0
 
virtual const KConfigGroup groupImpl (const QByteArray &b) const =0
 
virtual bool hasGroupImpl (const QByteArray &group) const =0
 
virtual bool isGroupImmutableImpl (const QByteArray &aGroup) const =0
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

Definition at line 38 of file kconfigbase.h.

Member Enumeration Documentation

enum KConfigBase::AccessMode

Possible return values for accessMode().

Enumerator
NoAccess 
ReadOnly 
ReadWrite 

Definition at line 133 of file kconfigbase.h.

enum KConfigBase::WriteConfigFlag

Flags to control write entry.

Enumerator
Persistent 

Save this entry when saving the config object.

Global 

Save the entry to the global KDE config file instead of the application specific config file.

Localized 

Add the locale tag to the key when writing it.

Normal 

Save the entry to the application specific config file without a locale tag.

This is the default.

Definition at line 44 of file kconfigbase.h.

Constructor & Destructor Documentation

KConfigBase::~KConfigBase ( )
virtual

Destructs the KConfigBase object.

Definition at line 105 of file kconfigbase.cpp.

KConfigBase::KConfigBase ( )
protected

Definition at line 108 of file kconfigbase.cpp.

Member Function Documentation

virtual AccessMode KConfigBase::accessMode ( ) const
pure virtual

Returns the access mode of the app-config object.

Possible return values are NoAccess (the application-specific config file could not be opened neither read-write nor read-only), ReadOnly (the application-specific config file is opened read-only, but not read-write) and ReadWrite (the application-specific config file is opened read-write).

Returns
the access mode of the app-config object

Implemented in KConfig, and KConfigGroup.

void KConfigBase::deleteGroup ( const QByteArray &  group,
WriteConfigFlags  flags = Normal 
)

Delete aGroup.

This marks aGroup as deleted in the config object. This effectively removes any cascaded values from config files earlier in the stack.

Definition at line 74 of file kconfigbase.cpp.

void KConfigBase::deleteGroup ( const QString &  group,
WriteConfigFlags  flags = Normal 
)

Definition at line 79 of file kconfigbase.cpp.

void KConfigBase::deleteGroup ( const char *  group,
WriteConfigFlags  flags = Normal 
)

Definition at line 84 of file kconfigbase.cpp.

virtual void KConfigBase::deleteGroupImpl ( const QByteArray &  group,
WriteConfigFlags  flags = Normal 
)
protectedpure virtual

Implemented in KConfigGroup, and KConfig.

KConfigGroup KConfigBase::group ( const QByteArray &  group)

Returns an object for the named subgroup.

Parameters
groupthe group to open. Pass a null string on to the KConfig object to obtain a handle on the root group.
Returns
The list of groups.

Definition at line 44 of file kconfigbase.cpp.

KConfigGroup KConfigBase::group ( const QString &  group)

Definition at line 49 of file kconfigbase.cpp.

KConfigGroup KConfigBase::group ( const char *  group)

Definition at line 54 of file kconfigbase.cpp.

const KConfigGroup KConfigBase::group ( const QByteArray &  group) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 59 of file kconfigbase.cpp.

const KConfigGroup KConfigBase::group ( const QString &  group) const

Definition at line 64 of file kconfigbase.cpp.

const KConfigGroup KConfigBase::group ( const char *  group) const

Definition at line 69 of file kconfigbase.cpp.

virtual KConfigGroup KConfigBase::groupImpl ( const QByteArray &  b)
protectedpure virtual

Implemented in KConfigGroup, and KConfig.

virtual const KConfigGroup KConfigBase::groupImpl ( const QByteArray &  b) const
protectedpure virtual

Implemented in KConfigGroup, and KConfig.

virtual QStringList KConfigBase::groupList ( ) const
pure virtual

Returns a list of groups that are known about.

Returns
The list of groups.

Implemented in KConfig, and KConfigGroup.

bool KConfigBase::hasGroup ( const QString &  group) const

Returns true if the specified group is known about.

Parameters
groupThe group to search for.
Returns
true if the group exists.

Definition at line 29 of file kconfigbase.cpp.

bool KConfigBase::hasGroup ( const char *  group) const

Definition at line 34 of file kconfigbase.cpp.

bool KConfigBase::hasGroup ( const QByteArray &  group) const

Definition at line 39 of file kconfigbase.cpp.

virtual bool KConfigBase::hasGroupImpl ( const QByteArray &  group) const
protectedpure virtual

Implemented in KConfigGroup, and KConfig.

bool KConfigBase::isGroupImmutable ( const QByteArray &  aGroup) const

Can changes be made to the entries in aGroup?

Parameters
aGroupThe group to check for immutability.
Returns
false if the entries in aGroup can be modified.

Definition at line 89 of file kconfigbase.cpp.

bool KConfigBase::isGroupImmutable ( const QString &  aGroup) const

Definition at line 94 of file kconfigbase.cpp.

bool KConfigBase::isGroupImmutable ( const char *  aGroup) const

Definition at line 100 of file kconfigbase.cpp.

virtual bool KConfigBase::isGroupImmutableImpl ( const QByteArray &  aGroup) const
protectedpure virtual

Implemented in KConfigGroup, and KConfig.

virtual bool KConfigBase::isImmutable ( ) const
pure virtual

Checks whether this configuration object can be modified.

Returns
whether changes may be made to this configuration object.

Implemented in KConfigGroup, and KConfig.

virtual void KConfigBase::markAsClean ( )
pure virtual

Reset the dirty flags of all entries in the entry map, so the values will not be written to disk on a later call to sync().

Implemented in KConfig, and KConfigGroup.

virtual void KConfigBase::sync ( )
pure virtual

Syncs the configuration object that this group belongs to.

Unrelated concurrent changes to the same file are merged and thus not overwritten. Note however, that this object is not automatically updated with those changes.

Implemented in KConfig, and KConfigGroup.

void KConfigBase::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.

Unused in this class.

Reimplemented in KConfig.

Definition at line 111 of file kconfigbase.cpp.


The documentation for this class was generated from the following files:
  • kconfigbase.h
  • kconfigbase.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs 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

Search



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