Kexi API Documentation (2.0 alpha)

KFormDesigner::WidgetWithSubpropertiesInterface Class Reference

#include <widgetwithsubpropertiesinterface.h>

Inheritance diagram for KFormDesigner::WidgetWithSubpropertiesInterface:

KexiDBAutoField KexiDBComboBox List of all members.

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)
QWidgetsubwidget () 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)
 Sets a subproperty value value for a subproperty name.

Protected Attributes

QGuardedPtr< QWidgetm_subwidget
QValueList< QCString > m_subproperies


Constructor & Destructor Documentation

WidgetWithSubpropertiesInterface::WidgetWithSubpropertiesInterface  ) 
 

Definition at line 29 of file widgetwithsubpropertiesinterface.cpp.

WidgetWithSubpropertiesInterface::~WidgetWithSubpropertiesInterface  )  [virtual]
 

Definition at line 33 of file widgetwithsubpropertiesinterface.cpp.


Member Function Documentation

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.

References m_subproperies, and m_subwidget.

Referenced by KFormDesigner::WidgetPropertySet::createPropertiesForWidget(), and KFormDesigner::WidgetPropertySet::isPropertyVisible().

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.

References m_subproperies, and m_subwidget.

Referenced by KexiDBAutoField::setProperty().

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.

References m_subproperies, and m_subwidget.

Referenced by KexiDBAutoField::createEditor().

QValueList< QCString > WidgetWithSubpropertiesInterface::subproperies  )  const
 

Returns:
a list of subproperties available for this widget. This is achieved by only listing those properties that are available in the

Definition at line 66 of file widgetwithsubpropertiesinterface.cpp.

References m_subproperies.

Referenced by KFormDesigner::WidgetPropertySet::createPropertiesForWidget().

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.

References m_subproperies, and m_subwidget.

Referenced by KexiDBAutoField::property().

QWidget * WidgetWithSubpropertiesInterface::subwidget  )  const
 

Returns:
the assigned subwidget.

Definition at line 61 of file widgetwithsubpropertiesinterface.cpp.

References m_subwidget.

Referenced by KFormDesigner::WidgetFactory::createEditor(), KFormDesigner::WidgetPropertySet::createPropertiesForWidget(), KFormDesigner::WidgetPropertySet::createPropertyCommandsInDesignMode(), KFormDesigner::WidgetPropertySet::isPropertyVisible(), KFormDesigner::FormIO::loadWidget(), KFormDesigner::FormIO::readChildNodes(), KFormDesigner::FormIO::readPropertyValue(), KFormDesigner::WidgetPropertySet::saveAlignProperty(), KFormDesigner::FormIO::savePropertyValue(), KFormDesigner::PropertyCommand::unexecute(), and KexiFormView::updateValuesForSubproperties().


Member Data Documentation

QValueList<QCString> KFormDesigner::WidgetWithSubpropertiesInterface::m_subproperies [protected]
 

Definition at line 68 of file widgetwithsubpropertiesinterface.h.

Referenced by findMetaSubproperty(), setSubproperty(), setSubwidget(), subproperies(), and subproperty().

QGuardedPtr<QWidget> KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget [protected]
 

Definition at line 67 of file widgetwithsubpropertiesinterface.h.

Referenced by KexiDBComboBox::beforeSignalValueChanged(), KexiDBAutoField::changeText(), KexiDBAutoField::clear(), KexiDBAutoField::copyPropertiesToEditor(), KexiDBComboBox::createEditor(), KexiDBAutoField::createEditor(), KexiDBAutoField::cursorAtEnd(), KexiDBAutoField::cursorAtStart(), KexiDBAutoField::editor(), KexiDBComboBox::eventFilter(), findMetaSubproperty(), KexiDBAutoField::init(), KexiDBAutoField::installListener(), KexiDBAutoField::isReadOnly(), KexiDBAutoField::keyPressed(), KexiDBAutoField::moveCursorToEnd(), KexiDBAutoField::moveCursorToStart(), KexiDBAutoField::selectAll(), KexiDBAutoField::setColumnInfoInternal(), KexiDBAutoField::setDisplayDefaultValue(), KexiDBComboBox::setEditable(), KexiDBAutoField::setFieldCaptionInternal(), KexiDBAutoField::setFocusPolicy(), KexiDBAutoField::setInvalidState(), KexiDBComboBox::setLabelPosition(), KexiDBAutoField::setLabelPosition(), KexiDBAutoField::setReadOnly(), setSubproperty(), setSubwidget(), KexiDBComboBox::setValueInInternalEditor(), KexiDBAutoField::setValueInternal(), KexiDBComboBox::setVisibleValueInternal(), KexiDBAutoField::sizeHint(), KexiDBComboBox::styleChange(), subproperty(), subwidget(), KexiDBAutoField::value(), KexiDBAutoField::valueChanged(), KexiDBAutoField::valueIsEmpty(), KexiDBAutoField::valueIsNull(), KexiDBAutoField::valueIsValid(), and KexiDBAutoField::~KexiDBAutoField().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:51:02 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003