kexi
KFormDesigner::WidgetWithSubpropertiesInterface Class Reference
#include <widgetwithsubpropertiesinterface.h>
Inheritance diagram for KFormDesigner::WidgetWithSubpropertiesInterface:

Detailed Description
An interface for declaring form widgets to have subproperties.Currently used in KexiDBAutoField to allow editing specific properties of its internal editor. For example, if the autofield is of type Image Box, the Image Box widget has some specific properties like "lineWidth". Such properties are provided by the parent KexiDBAutoField object as subproperties.
Definition at line 36 of file widgetwithsubpropertiesinterface.h.
Public Member Functions | |
WidgetWithSubpropertiesInterface () | |
virtual | ~WidgetWithSubpropertiesInterface () |
void | setSubwidget (QWidget *widget) |
QWidget * | subwidget () const |
QValueList< QCString > | subproperies () const |
const QMetaProperty * | findMetaSubproperty (const char *name) const |
QVariant | subproperty (const char *name, bool &ok) const |
bool | setSubproperty (const char *name, const QVariant &value) |
Protected Attributes | |
QGuardedPtr< QWidget > | m_subwidget |
QValueList< QCString > | m_subproperies |
Member Function Documentation
void WidgetWithSubpropertiesInterface::setSubwidget | ( | QWidget * | widget | ) |
Setting 0 clears subwidget.
- Todo:
- maybe someone wants to add more than one widget here?
Definition at line 37 of file widgetwithsubpropertiesinterface.cpp.
QWidget * WidgetWithSubpropertiesInterface::subwidget | ( | ) | const |
QValueList< QCString > WidgetWithSubpropertiesInterface::subproperies | ( | ) | const |
- Returns:
- a list of subproperties avaliable for this widget.
This is achieved by only listing those properties that are available in the
Definition at line 66 of file widgetwithsubpropertiesinterface.cpp.
const QMetaProperty * WidgetWithSubpropertiesInterface::findMetaSubproperty | ( | const char * | name | ) | const |
- Returns:
- a meta property for a widget's subproperty or 0 if there is no such subproperty.
Definition at line 71 of file widgetwithsubpropertiesinterface.cpp.
QVariant WidgetWithSubpropertiesInterface::subproperty | ( | const char * | name, | |
bool & | ok | |||
) | const |
- Returns:
- a value of widget's subproperty.
ok is set to true on success and to false on failure.
Definition at line 82 of file widgetwithsubpropertiesinterface.cpp.
bool WidgetWithSubpropertiesInterface::setSubproperty | ( | const char * | name, | |
const QVariant & | value | |||
) |
Sets a subproperty value value for a subproperty name.
- Returns:
- true on successful setting and false when there is no such a subproperty in the subwidget or QObject::setProperty() failed.
Definition at line 92 of file widgetwithsubpropertiesinterface.cpp.
The documentation for this class was generated from the following files: