Class that displays the sub properties of a property using a form layout. More...
#include <vpropertyformwidget.h>
Public Slots | |
virtual void | build () |
Rebuilds the whole form. More... | |
void | buildEditor (VProperty *property, QFormLayout *formLayout, Property type=Property::Simple) |
void | commitData () |
Reads the data from the editors and commits it to the properties. More... | |
void | loadData () |
Refills the editors with the propertie's data. More... | |
void | commitData (int row) |
Reads the data from row'th editor and commits it to the property. More... | |
void | loadData (int row) |
Reads the data from row'th property. More... | |
void | setCommitBehaviour (bool auto_commit=true) |
Sets the update behaviour. More... | |
Signals | |
void | propertyDataSubmitted (VProperty *property) |
Emitted whenever a property data changes. More... | |
Public Member Functions | |
VPropertyFormWidget (const QString &title, const QString &description, const QList< VProperty * > &properties, QWidget *parent) | |
Constructor. More... | |
VPropertyFormWidget (VProperty *parent_property, QWidget *parent) | |
Constructor. More... | |
~VPropertyFormWidget () | |
Destructor. More... | |
QList< VPropertyFormWidget * > | getChildPropertyFormWidgets () const |
Returns a list of all child property form widgets (note that indirect children will not be in the list) More... | |
Protected Member Functions | |
VPropertyFormWidget (VPropertyFormWidgetPrivate *d_pointer, QWidget *parent, const QString &title=QString(), const QString &description=QString()) | |
Protected Constructor. More... | |
bool | eventFilter (QObject *object, QEvent *event) |
Event filter for the editor widgets. More... | |
void | commitData (const QWidget *editor) |
Commits data of an editor. More... | |
Protected Attributes | |
VPropertyFormWidgetPrivate * | d_ptr |
The protected data. More... | |
Class that displays the sub properties of a property using a form layout.
Definition at line 43 of file vpropertyformwidget.h.
VPE::VPropertyFormWidget::VPropertyFormWidget | ( | VProperty * | parent_property, |
QWidget * | parent | ||
) |
Constructor.
Definition at line 47 of file vpropertyformwidget.cpp.
References build(), d_ptr, VPE::VProperty::getChildren(), VPE::VProperty::getDescription(), VPE::VProperty::getName(), and VPE::VPropertyFormWidgetPrivate::Properties.
VPE::VPropertyFormWidget::~VPropertyFormWidget | ( | ) |
Destructor.
Definition at line 69 of file vpropertyformwidget.cpp.
|
protected |
|
virtualslot |
Rebuilds the whole form.
Definition at line 75 of file vpropertyformwidget.cpp.
References VPE::VProperty::childChanged(), VPE::VProperty::childValueChanged(), VPE::Complex, VPE::VProperty::getChildren(), VPE::VProperty::getRowCount(), VPE::VWidgetProperty::getWidget(), VPE::Label, VPE::VProperty::propertyType(), setCommitBehaviour(), and VPE::VProperty::type().
Referenced by VPE::VPropertyFormView::build(), and VPropertyFormWidget().
|
slot |
Definition at line 151 of file vpropertyformwidget.cpp.
References VPE::Complex, VPE::VProperty::getDescription(), VPE::VProperty::getName(), and VPE::Label.
|
slot |
Reads the data from the editors and commits it to the properties.
Definition at line 200 of file vpropertyformwidget.cpp.
Referenced by commitData().
|
protected |
Commits data of an editor.
Definition at line 355 of file vpropertyformwidget.cpp.
References VPE::VPropertyFormWidgetPrivate::SEditorWidget::Editor.
|
slot |
Reads the data from row'th editor and commits it to the property.
Definition at line 216 of file vpropertyformwidget.cpp.
References commitData(), VPE::Complex, VPE::VProperty::data(), VPE::VProperty::DPC_Data, VPE::VPropertyFormWidgetPrivate::SEditorWidget::Editor, VPE::VPropertyFormWidgetPrivate::SEditorWidget::FormWidget, VPE::VProperty::getEditorData(), VPE::VProperty::getParent(), VPE::VProperty::propertyType(), VPE::VProperty::setValue(), and VPE::VProperty::updateParent().
|
protected |
Event filter for the editor widgets.
Definition at line 297 of file vpropertyformwidget.cpp.
References VPE::MyCustomEventType.
QList< VPE::VPropertyFormWidget * > VPE::VPropertyFormWidget::getChildPropertyFormWidgets | ( | ) | const |
Returns a list of all child property form widgets (note that indirect children will not be in the list)
Definition at line 283 of file vpropertyformwidget.cpp.
References VPE::VPropertyFormWidgetPrivate::SEditorWidget::FormWidget.
Referenced by VPE::VPropertyFormView::connectPropertyFormWidget().
|
slot |
Refills the editors with the propertie's data.
Definition at line 208 of file vpropertyformwidget.cpp.
Referenced by loadData().
|
slot |
Reads the data from row'th property.
Definition at line 250 of file vpropertyformwidget.cpp.
References VPE::VPropertyFormWidgetPrivate::SEditorWidget::Editor, VPE::VPropertyFormWidgetPrivate::SEditorWidget::FormWidget, loadData(), and VPE::VProperty::setEditorData().
|
signal |
Emitted whenever a property data changes.
Referenced by VPE::VPropertyFormView::connectPropertyFormWidget().
|
slot |
Sets the update behaviour.
auto_commit | If set to true, whenever an event like focusOut is triggered on an editor, the data will be submitted to the property. |
Definition at line 269 of file vpropertyformwidget.cpp.
References setCommitBehaviour().
Referenced by build(), and setCommitBehaviour().
|
protected |
The protected data.
Definition at line 94 of file vpropertyformwidget.h.
Referenced by VPropertyFormWidget().