#include <klfconfigbase.h>
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 |
KLFConfigPropBase * | property (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 |
Definition at line 53 of file klfconfigbase.h.
enum KLFConfigBase::ConnectionTarget [protected] |
Definition at line 92 of file klfconfigbase.h.
void KLFConfigBase::connectQObject | ( | const QString & | configPropertyName, |
QObject * | object, | ||
ConnectionTarget | target, | ||
const QByteArray & | targetName | ||
) | [protected] |
Definition at line 91 of file klfconfigbase.cpp.
References QList::begin(), QList::end(), QMetaObject::invokeMethod(), KLF_ASSERT_NOT_NULL, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbg, pObjConnections, pProperties, Property, Slot, KLFConfigBase::ObjConnection::target, KLFConfigPropBase::toVariant(), and QVariant::typeName().
Referenced by connectQObjectProperty(), and connectQObjectSlot().
void KLFConfigBase::connectQObjectProperty | ( | const QString & | configPropertyName, |
QObject * | object, | ||
const QByteArray & | objPropName | ||
) | [virtual] |
object
will not be destroyed! If this will be the case, disconnect it first with disconnectQObjectProperty() !object's
property objPropName
is initialized to the current configuration value. Definition at line 70 of file klfconfigbase.cpp.
References connectQObject(), and Property.
Referenced by KLFConfigProp< T >::connectQObjectProperty().
void KLFConfigBase::connectQObjectSlot | ( | const QString & | configPropertyName, |
QObject * | object, | ||
const QByteArray & | slotMethodName | ||
) | [virtual] |
object
will not be destroyed! If this will be the case, disconnect it first with disconnectQObjectProperty() !object's
slot slotMethodName
is called immediately, too, with the current configuration value. Definition at line 75 of file klfconfigbase.cpp.
References connectQObject(), and Slot.
Referenced by KLFConfigProp< T >::connectQObjectSlot().
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, pObjConnections, and QHash::value().
Referenced by disconnectQObjectProperty(), and disconnectQObjectSlot().
void KLFConfigBase::disconnectQObject | ( | const QString & | configPropertyName, |
QObject * | object, | ||
ConnectionTarget | target, | ||
const QByteArray & | targetName | ||
) | [protected] |
Definition at line 133 of file klfconfigbase.cpp.
References QList::begin(), QList::end(), QList::erase(), KLF_FUNC_NAME, klfDbg, KLFConfigBase::ObjConnection::object, pObjConnections, KLFConfigBase::ObjConnection::target, and KLFConfigBase::ObjConnection::targetName.
void KLFConfigBase::disconnectQObjectProperty | ( | const QString & | configPropertyName, |
QObject * | object, | ||
const QByteArray & | objPropName | ||
) | [virtual] |
Definition at line 80 of file klfconfigbase.cpp.
References disconnectQObject(), and Property.
Referenced by KLFConfigProp< T >::disconnectQObjectProperty().
void KLFConfigBase::disconnectQObjectSlot | ( | const QString & | configPropertyName, |
QObject * | object, | ||
const QByteArray & | slotMethodName | ||
) | [virtual] |
Definition at line 85 of file klfconfigbase.cpp.
References disconnectQObject(), and Slot.
Referenced by KLFConfigProp< T >::disconnectQObjectSlot().
bool KLFConfigBase::okChangeProperty | ( | KLFConfigPropBase * | property, |
const QVariant & | oldValue, | ||
const QVariant & | newValue | ||
) | [virtual] |
Definition at line 37 of file klfconfigbase.cpp.
Referenced by KLFConfigProp< T >::setValue().
KLFConfigPropBase * KLFConfigBase::property | ( | const QString & | name | ) |
Definition at line 180 of file klfconfigbase.cpp.
References QString::isEmpty(), KLF_FUNC_NAME, klfWarning, pProperties, and KLFConfigPropBase::propName().
void KLFConfigBase::propertyChanged | ( | KLFConfigPropBase * | property, |
const QVariant & | oldValue, | ||
const QVariant & | newValue | ||
) | [virtual] |
Definition at line 43 of file klfconfigbase.cpp.
References QList::begin(), QHash::contains(), QList::end(), QMetaObject::invokeMethod(), KLF_ASSERT_NOT_NULL, KLF_FUNC_NAME, pObjConnections, Property, Slot, and QVariant::typeName().
Referenced by KLFConfigProp< T >::setValue().
QStringList KLFConfigBase::propertyList | ( | ) | const [virtual] |
Definition at line 171 of file klfconfigbase.cpp.
References pProperties, and KLFConfigPropBase::propName().
void KLFConfigBase::propertyValueRequested | ( | const KLFConfigPropBase * | property | ) | [virtual] |
Definition at line 65 of file klfconfigbase.cpp.
Referenced by KLFConfigProp< T >::value().
void KLFConfigBase::registerConfigProp | ( | KLFConfigPropBase * | p | ) | [inline] |
Definition at line 89 of file klfconfigbase.h.
Referenced by KLFConfigProp< T >::initialize().
QHash<QString, QList<ObjConnection> > KLFConfigBase::pObjConnections [protected] |
Definition at line 101 of file klfconfigbase.h.
Referenced by connectQObject(), disconnectQObject(), and propertyChanged().
QList<KLFConfigPropBase*> KLFConfigBase::pProperties [protected] |
Definition at line 108 of file klfconfigbase.h.
Referenced by connectQObject(), property(), and propertyList().