Seamly2D
Code documentation
VPE::VPropertyFormWidget Class Reference

Class that displays the sub properties of a property using a form layout. More...

#include <vpropertyformwidget.h>

Inheritance diagram for VPE::VPropertyFormWidget:
Collaboration diagram for VPE::VPropertyFormWidget:

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

VPropertyFormWidgetPrivated_ptr
 The protected data. More...
 

Detailed Description

Class that displays the sub properties of a property using a form layout.

Definition at line 43 of file vpropertyformwidget.h.

Constructor & Destructor Documentation

◆ VPropertyFormWidget() [1/3]

VPE::VPropertyFormWidget::VPropertyFormWidget ( const QString &  title,
const QString &  description,
const QList< VProperty * > &  properties,
QWidget *  parent 
)

Constructor.

Definition at line 38 of file vpropertyformwidget.cpp.

References build().

◆ VPropertyFormWidget() [2/3]

VPE::VPropertyFormWidget::VPropertyFormWidget ( VProperty parent_property,
QWidget *  parent 
)

◆ ~VPropertyFormWidget()

VPE::VPropertyFormWidget::~VPropertyFormWidget ( )

Destructor.

Definition at line 69 of file vpropertyformwidget.cpp.

◆ VPropertyFormWidget() [3/3]

VPE::VPropertyFormWidget::VPropertyFormWidget ( VPropertyFormWidgetPrivate d_pointer,
QWidget *  parent,
const QString &  title = QString(),
const QString &  description = QString() 
)
protected

Protected Constructor.

Definition at line 60 of file vpropertyformwidget.cpp.

References build().

Member Function Documentation

◆ build

◆ buildEditor

void VPE::VPropertyFormWidget::buildEditor ( VProperty property,
QFormLayout *  formLayout,
Property  type = Property::Simple 
)
slot

◆ commitData [1/3]

void VPE::VPropertyFormWidget::commitData ( )
slot

Reads the data from the editors and commits it to the properties.

Definition at line 200 of file vpropertyformwidget.cpp.

Referenced by commitData().

◆ commitData() [2/3]

void VPE::VPropertyFormWidget::commitData ( const QWidget *  editor)
protected

Commits data of an editor.

Definition at line 355 of file vpropertyformwidget.cpp.

References VPE::VPropertyFormWidgetPrivate::SEditorWidget::Editor.

◆ commitData [3/3]

◆ eventFilter()

bool VPE::VPropertyFormWidget::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Event filter for the editor widgets.

Definition at line 297 of file vpropertyformwidget.cpp.

References VPE::MyCustomEventType.

◆ getChildPropertyFormWidgets()

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().

◆ loadData [1/2]

void VPE::VPropertyFormWidget::loadData ( )
slot

Refills the editors with the propertie's data.

Definition at line 208 of file vpropertyformwidget.cpp.

Referenced by loadData().

◆ loadData [2/2]

void VPE::VPropertyFormWidget::loadData ( int  row)
slot

◆ propertyDataSubmitted

void VPE::VPropertyFormWidget::propertyDataSubmitted ( VProperty property)
signal

Emitted whenever a property data changes.

Referenced by VPE::VPropertyFormView::connectPropertyFormWidget().

◆ setCommitBehaviour

void VPE::VPropertyFormWidget::setCommitBehaviour ( bool  auto_commit = true)
slot

Sets the update behaviour.

Parameters
auto_commitIf 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().

Member Data Documentation

◆ d_ptr

VPropertyFormWidgetPrivate* VPE::VPropertyFormWidget::d_ptr
protected

The protected data.

Definition at line 94 of file vpropertyformwidget.h.

Referenced by VPropertyFormWidget().


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