[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
KLFConfigBase Class Reference

#include <klfconfigbase.h>

Collaboration diagram for KLFConfigBase:
Collaboration graph
[legend]

Classes

struct  ObjConnection
 

Public Member Functions

virtual bool okChangeProperty (KLFConfigPropBase *property, const QVariant &oldValue, const QVariant &newValue)
 
virtual void propertyChanged (KLFConfigPropBase *property, const QVariant &oldValue, const QVariant &newValue)
 
virtual void propertyValueRequested (const KLFConfigPropBase *property)
 
virtual void connectQObjectProperty (const QString &configPropertyName, QObject *object, const QByteArray &objPropName)
 
virtual void disconnectQObjectProperty (const QString &configPropertyName, QObject *object, const QByteArray &objPropName)
 
virtual void connectQObjectSlot (const QString &configPropertyName, QObject *object, const QByteArray &slotMethodName)
 
virtual void disconnectQObjectSlot (const QString &configPropertyName, QObject *object, const QByteArray &slotMethodName)
 
virtual void disconnectQObject (QObject *object)
 
virtual QStringList propertyList () const
 
KLFConfigPropBaseproperty (const QString &name)
 
void registerConfigProp (KLFConfigPropBase *p)
 

Protected Types

enum  ConnectionTarget { Property, Slot }
 

Protected Member Functions

void connectQObject (const QString &configPropertyName, QObject *object, ConnectionTarget target, const QByteArray &targetName)
 
void disconnectQObject (const QString &configPropertyName, QObject *object, ConnectionTarget target, const QByteArray &targetName)
 

Protected Attributes

QHash< QString, QList< ObjConnection > > pObjConnections
 
QList< KLFConfigPropBase * > pProperties
 

Detailed Description

Definition at line 53 of file klfconfigbase.h.

Member Enumeration Documentation

◆ ConnectionTarget

Enumerator
Property 
Slot 

Definition at line 92 of file klfconfigbase.h.

Member Function Documentation

◆ connectQObject()

void KLFConfigBase::connectQObject ( const QString configPropertyName,
QObject object,
ConnectionTarget  target,
const QByteArray targetName 
)
protected

◆ connectQObjectProperty()

void KLFConfigBase::connectQObjectProperty ( const QString configPropertyName,
QObject object,
const QByteArray objPropName 
)
virtual
Warning
The caller must garantee that object will not be destroyed! If this will be the case, disconnect it first with disconnectQObjectProperty() !
Note
the object's property objPropName is initialized to the current configuration value.

Definition at line 70 of file klfconfigbase.cpp.

◆ connectQObjectSlot()

void KLFConfigBase::connectQObjectSlot ( const QString configPropertyName,
QObject object,
const QByteArray slotMethodName 
)
virtual
Warning
The caller must garantee that object will not be destroyed! If this will be the case, disconnect it first with disconnectQObjectProperty() !
Note
the object's slot slotMethodName is called immediately, too, with the current configuration value.

Definition at line 75 of file klfconfigbase.cpp.

◆ disconnectQObject() [1/2]

void KLFConfigBase::disconnectQObject ( QObject object)
virtual

disconnects all connections concerning this object

Definition at line 154 of file klfconfigbase.cpp.

References QHash::begin(), QList::begin(), QHash::end(), QList::end(), QList::erase(), QHash::key(), klfDbg, KLFConfigPropBase::pname, and QHash::value().

◆ disconnectQObject() [2/2]

void KLFConfigBase::disconnectQObject ( const QString configPropertyName,
QObject object,
ConnectionTarget  target,
const QByteArray targetName 
)
protected

◆ disconnectQObjectProperty()

void KLFConfigBase::disconnectQObjectProperty ( const QString configPropertyName,
QObject object,
const QByteArray objPropName 
)
virtual

Definition at line 80 of file klfconfigbase.cpp.

◆ disconnectQObjectSlot()

void KLFConfigBase::disconnectQObjectSlot ( const QString configPropertyName,
QObject object,
const QByteArray slotMethodName 
)
virtual

Definition at line 85 of file klfconfigbase.cpp.

◆ okChangeProperty()

bool KLFConfigBase::okChangeProperty ( KLFConfigPropBase property,
const QVariant oldValue,
const QVariant newValue 
)
virtual

Definition at line 37 of file klfconfigbase.cpp.

◆ property()

KLFConfigPropBase * KLFConfigBase::property ( const QString name)

◆ propertyChanged()

void KLFConfigBase::propertyChanged ( KLFConfigPropBase property,
const QVariant oldValue,
const QVariant newValue 
)
virtual

◆ propertyList()

QStringList KLFConfigBase::propertyList ( ) const
virtual

Definition at line 171 of file klfconfigbase.cpp.

References KLFConfigPropBase::propName().

◆ propertyValueRequested()

void KLFConfigBase::propertyValueRequested ( const KLFConfigPropBase property)
virtual

Definition at line 65 of file klfconfigbase.cpp.

◆ registerConfigProp()

void KLFConfigBase::registerConfigProp ( KLFConfigPropBase p)
inline
Note
ONLY TO BE CALLED BY KLFConfigProp !!

Definition at line 89 of file klfconfigbase.h.

Referenced by KLFConfigProp< T >::initialize().

Member Data Documentation

◆ pObjConnections

QHash<QString, QList<ObjConnection> > KLFConfigBase::pObjConnections
protected

Definition at line 101 of file klfconfigbase.h.

◆ pProperties

QList<KLFConfigPropBase*> KLFConfigBase::pProperties
protected

Definition at line 108 of file klfconfigbase.h.


The documentation for this class was generated from the following files:

Generated by doxygen 1.8.13