KConfigCompilerSignallingItem

Search for usage in LXR

KConfigCompilerSignallingItem Class Reference

#include <KCoreConfigSkeleton>

Inheritance diagram for KConfigCompilerSignallingItem:

Public Types

typedef void(QObject::*) NotifyFunction(quint64 arg)
 
- Public Types inherited from KConfigSkeletonItem
typedef QHash< QString, KConfigSkeletonItem * > Dict
 
typedef QHash< QString, KConfigSkeletonItem * >::Iterator DictIterator
 
typedef QList< KConfigSkeletonItem * > List
 

Public Member Functions

 KConfigCompilerSignallingItem (KConfigSkeletonItem *item, QObject *object, NotifyFunction targetFunction, quint64 userData)
 
KConfigGroup configGroup (KConfig *config) const
 
bool isEqual (const QVariant &p) const override
 
QVariant maxValue () const override
 
QVariant minValue () const override
 
QVariant property () const override
 
void readConfig (KConfig *) override
 
void readDefault (KConfig *) override
 
void setDefault () override
 
void setGroup (const KConfigGroup &cg)
 
void setProperty (const QVariant &p) override
 
void setWriteFlags (KConfigBase::WriteConfigFlags flags)
 
void swapDefault () override
 
void writeConfig (KConfig *) override
 
KConfigBase::WriteConfigFlags writeFlags () const
 
- Public Member Functions inherited from KConfigSkeletonItem
 KConfigSkeletonItem (const QString &_group, const QString &_key)
 
virtual ~KConfigSkeletonItem ()
 
KConfigGroup configGroup (KConfig *config) const
 
QVariant getDefault () const
 
QString group () const
 
bool isDefault () const
 
bool isImmutable () const
 
bool isSaveNeeded () const
 
QString key () const
 
QString label () const
 
QString name () const
 
void setGroup (const KConfigGroup &cg)
 
void setGroup (const QString &_group)
 
void setKey (const QString &_key)
 
void setLabel (const QString &l)
 
void setName (const QString &_name)
 
void setToolTip (const QString &t)
 
void setWhatsThis (const QString &w)
 
void setWriteFlags (KConfigBase::WriteConfigFlags flags)
 
QString toolTip () const
 
QString whatsThis () const
 
KConfigBase::WriteConfigFlags writeFlags () const
 

Additional Inherited Members

- Protected Member Functions inherited from KConfigSkeletonItem
KCONFIGCORE_NO_EXPORT KConfigSkeletonItem (KConfigSkeletonItemPrivate &dd, const QString &_group, const QString &_key)
 
void readImmutability (const KConfigGroup &group)
 
void setGetDefaultImpl (const std::function< QVariant()> &impl)
 
void setIsDefaultImpl (const std::function< bool()> &impl)
 
void setIsSaveNeededImpl (const std::function< bool()> &impl)
 
- Protected Attributes inherited from KConfigSkeletonItem
KConfigSkeletonItemPrivate *const d_ptr
 
QString mGroup
 
QString mKey
 
QString mName
 

Detailed Description

Author
Alex Richardson

This class wraps a KConfigSkeletonItem and invokes a function whenever the value changes. That function must take one quint64 parameter. Whenever the property value of the wrapped KConfigSkeletonItem changes this function will be invoked with the stored user data passed in the constructor. It does not call a function with the new value since this class is designed solely for the The KDE Configuration Compiler generated code and is therefore probably not suited for any other usecases.

See also
KConfigSkeletonItem

Definition at line 440 of file kcoreconfigskeleton.h.

Member Typedef Documentation

◆ NotifyFunction

void(QObject::*) KConfigCompilerSignallingItem::NotifyFunction(quint64 arg)

Definition at line 443 of file kcoreconfigskeleton.h.

Constructor & Destructor Documentation

◆ KConfigCompilerSignallingItem()

KConfigCompilerSignallingItem::KConfigCompilerSignallingItem ( KConfigSkeletonItem * item,
QObject * object,
KConfigCompilerSignallingItem::NotifyFunction targetFunction,
quint64 userData )

Constructor.

Parameters
itemthe KConfigSkeletonItem to wrap
targetFunctionthe method to invoke whenever the value of item changes
objectThe object on which the method is invoked.
userDataThis data will be passed to targetFunction on every property change

Definition at line 1563 of file kcoreconfigskeleton.cpp.

◆ ~KConfigCompilerSignallingItem()

KConfigCompilerSignallingItem::~KConfigCompilerSignallingItem ( )
override

Definition at line 1588 of file kcoreconfigskeleton.cpp.

Member Function Documentation

◆ configGroup()

KConfigGroup KConfigCompilerSignallingItem::configGroup ( KConfig * config) const

Definition at line 1678 of file kcoreconfigskeleton.cpp.

◆ isEqual()

bool KConfigCompilerSignallingItem::isEqual ( const QVariant & p) const
overridevirtual

Check whether the item is equal to p.

Use this function to compare items that use custom types, because QVariant::operator== will not work for those.

Parameters
pQVariant to compare to
Returns
true if the item is equal to p, false otherwise

Implements KConfigSkeletonItem.

Definition at line 1592 of file kcoreconfigskeleton.cpp.

◆ maxValue()

QVariant KConfigCompilerSignallingItem::maxValue ( ) const
overridevirtual

Return maximum value of item or invalid if not specified.

Reimplemented from KConfigSkeletonItem.

Definition at line 1607 of file kcoreconfigskeleton.cpp.

◆ minValue()

QVariant KConfigCompilerSignallingItem::minValue ( ) const
overridevirtual

Return minimum value of item or invalid if not specified.

Reimplemented from KConfigSkeletonItem.

Definition at line 1602 of file kcoreconfigskeleton.cpp.

◆ property()

QVariant KConfigCompilerSignallingItem::property ( ) const
overridevirtual

Return item as property.

Implements KConfigSkeletonItem.

Definition at line 1597 of file kcoreconfigskeleton.cpp.

◆ readConfig()

void KConfigCompilerSignallingItem::readConfig ( KConfig * )
overridevirtual

This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.

Implements KConfigSkeletonItem.

Definition at line 1612 of file kcoreconfigskeleton.cpp.

◆ readDefault()

void KConfigCompilerSignallingItem::readDefault ( KConfig * )
overridevirtual

Read global default value.

Implements KConfigSkeletonItem.

Definition at line 1624 of file kcoreconfigskeleton.cpp.

◆ setDefault()

void KConfigCompilerSignallingItem::setDefault ( )
overridevirtual

Sets the current value to the default value.

Implements KConfigSkeletonItem.

Definition at line 1637 of file kcoreconfigskeleton.cpp.

◆ setGroup()

void KConfigCompilerSignallingItem::setGroup ( const KConfigGroup & cg)

Definition at line 1673 of file kcoreconfigskeleton.cpp.

◆ setProperty()

void KConfigCompilerSignallingItem::setProperty ( const QVariant & p)
overridevirtual

Set item to p.

Implements KConfigSkeletonItem.

Definition at line 1646 of file kcoreconfigskeleton.cpp.

◆ setWriteFlags()

void KConfigCompilerSignallingItem::setWriteFlags ( KConfigBase::WriteConfigFlags flags)

Definition at line 1663 of file kcoreconfigskeleton.cpp.

◆ swapDefault()

void KConfigCompilerSignallingItem::swapDefault ( )
overridevirtual

Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.

Implements KConfigSkeletonItem.

Definition at line 1654 of file kcoreconfigskeleton.cpp.

◆ writeConfig()

void KConfigCompilerSignallingItem::writeConfig ( KConfig * )
overridevirtual

This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.

Make sure to pass writeFlags() to every call of KConfigGroup::writeEntry() and KConfigGroup::revertToDefault().

Implements KConfigSkeletonItem.

Definition at line 1632 of file kcoreconfigskeleton.cpp.

◆ writeFlags()

KConfigBase::WriteConfigFlags KConfigCompilerSignallingItem::writeFlags ( ) const

Definition at line 1668 of file kcoreconfigskeleton.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.