KConfigCompilerSignallingItem
#include <KCoreConfigSkeleton>
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 |
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
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
-
item the KConfigSkeletonItem to wrap targetFunction the method to invoke whenever the value of item
changesobject The object on which the method is invoked. userData This data will be passed to targetFunction
on every property change
Definition at line 1563 of file kcoreconfigskeleton.cpp.
◆ ~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()
|
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
-
p QVariant to compare to
- Returns
true
if the item is equal top
,false
otherwise
Implements KConfigSkeletonItem.
Definition at line 1592 of file kcoreconfigskeleton.cpp.
◆ maxValue()
|
overridevirtual |
Return maximum value of item or invalid if not specified.
Reimplemented from KConfigSkeletonItem.
Definition at line 1607 of file kcoreconfigskeleton.cpp.
◆ minValue()
|
overridevirtual |
Return minimum value of item or invalid if not specified.
Reimplemented from KConfigSkeletonItem.
Definition at line 1602 of file kcoreconfigskeleton.cpp.
◆ property()
|
overridevirtual |
Return item as property.
Implements KConfigSkeletonItem.
Definition at line 1597 of file kcoreconfigskeleton.cpp.
◆ readConfig()
|
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()
|
overridevirtual |
Read global default value.
Implements KConfigSkeletonItem.
Definition at line 1624 of file kcoreconfigskeleton.cpp.
◆ 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()
|
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()
|
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()
|
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:
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.