Field editor for CamiTK property. More...
#include <CamiTKPropertyFieldEditor.h>
Inheritance diagram for CamiTKPropertyFieldEditor:
Collaboration diagram for CamiTKPropertyFieldEditor:Public Member Functions | |
| virtual void | appendRowTo (QGridLayout *layout, bool canBeDeleted) override |
| overriden in order to synchronize the row label with the name field, and add a line between rows | |
| CamiTKPropertyFieldEditor (CamiTKExtensionModelPresenter *presenter, VariantDataModel &dataModel, const QString &name="", const QString &description="") | |
| Constructor. | |
| virtual QWidget * | getWidget () override |
| the editor widget | |
Public Member Functions inherited from FieldEditor | |
| FieldEditor (CamiTKExtensionModelPresenter *presenter, VariantDataModel &dataModel, const QString &name="", const QString &description="") | |
| Constructor Creates a field for the given data model inside the given presenter A name and description can be associated with the field (it will be used when the field is added to a gridlayout,. | |
| void | setEnabled (bool isEnabled) |
| Is the widget and labels currently enabled. | |
| virtual | ~FieldEditor () |
| Destructor (delete myWidget) | |
Protected Slots | |
| virtual void | deleteButtonClicked () override |
| Called when the delete button is called Do the same as FieldEditor, but also remove the separator line frame. | |
Protected Slots inherited from FieldEditor | |
| virtual void | deleteButtonClicked () |
| Called when the (optional) delete button is called This will make user the user knows what she/he does If deletion is confirmed by the user, remove the data model. | |
Protected Member Functions | |
| void | addToGrid (QGridLayout *gridLayout, FieldEditor *field, int row, int column, int columnSpan=1) |
| add a field editor to a specific grid cell (allows for stacking more than default label/field editor) | |
| void | buildTypeDependentEditors (VariantDataModel &dataModelType, bool overwriteDefault=true) |
| build all the editors that depends from the current type | |
Protected Attributes | |
| QGridLayout * | expandableGridLayout |
| the advanced grid layout | |
| QGridLayout * | mainGridLayout |
| the main grid layout | |
| QFrame * | separatorLine |
| separator line inserted after the field editor (separator) | |
edited properties and fields | |
Required to synchronize the CamiTK property label to the name, and the value editor to the current type, and the property attributes | |
| QtPropertyFieldEditor * | nameFieldEditor |
| QtPropertyFieldEditor * | typeFieldEditor |
| FieldEditor * | defaultValueEditor |
| QWidget * | minMaxWidget |
| QtPropertyFieldEditor * | minimumValueEditor |
| QtPropertyFieldEditor * | maximumValueEditor |
| QtPropertyFieldEditor * | singleStepEditor |
| QtPropertyFieldEditor * | decimalsEditor |
| QtPropertyFieldEditor * | regExpEditor |
Protected Attributes inherited from FieldEditor | |
| VariantDataModel & | dataModel |
| The edited data model (part of the presenter's full model) | |
| QString | description |
| Description (displayed as tool tip / what's that) | |
| QGridLayout * | myGridLayout |
| where the widget is added | |
| QWidget * | myWidget |
| The created widget (inheriting must use this to create their widgets) | |
| QString | name |
| Name of the field (displayed as a label) | |
| CamiTKExtensionModelPresenter * | presenter |
| The presenter that contains the full VariantDataModel. | |
| QLabel * | rowLabel |
| the row label widget (that contains the name of the row) the label text can be modified (see CamiTKPropertyFieldEditor.h for an example) | |
Additional Inherited Members | |
Signals inherited from FieldEditor | |
| void | valueChanged (VariantDataModel &changedDataModel) |
| emitted when the edited value has changed (useful to synchronize other field editor depending of this editor current value) | |
Field editor for CamiTK property.
Presents the different attributes of a property: name, type, initial value, ...
| CamiTKPropertyFieldEditor::CamiTKPropertyFieldEditor | ( | CamiTKExtensionModelPresenter * | presenter, |
| VariantDataModel & | dataModel, | ||
| const QString & | name = "", |
||
| const QString & | description = "" |
||
| ) |
Constructor.
References separatorLine.
|
protected |
add a field editor to a specific grid cell (allows for stacking more than default label/field editor)
References FieldEditor::getWidget().
Referenced by buildTypeDependentEditors(), and getWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
overriden in order to synchronize the row label with the name field, and add a line between rows
Reimplemented from FieldEditor.
References FieldEditor::appendRowTo(), nameFieldEditor, FieldEditor::rowLabel, separatorLine, and QtPropertyFieldEditor::setLabelToUpdateWithFieldValue().
Referenced by CamiTKPropertyListFieldEditor::plusButtonClicked().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
build all the editors that depends from the current type
References addToGrid(), FieldEditor::dataModel, decimalsEditor, defaultValueEditor, FieldEditor::description, expandableGridLayout, VariantDataModel::getValue(), getValue(), QtPropertyFieldEditor::getWidget(), FieldEditor::getWidget(), VariantDataModel::isValid(), mainGridLayout, maximumValueEditor, minimumValueEditor, minMaxWidget, FieldEditor::presenter, regExpEditor, VariantDataModel::remove(), QtPropertyFieldEditor::setDecimals(), QtPropertyFieldEditor::setMaximum(), QtPropertyFieldEditor::setMinimum(), QtPropertyFieldEditor::setPlaceHolderText(), QtPropertyFieldEditor::setRegExp(), singleStepEditor, VariantDataModel::toString(), and FieldEditor::valueChanged().
Referenced by getWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprotectedvirtualslot |
Called when the delete button is called Do the same as FieldEditor, but also remove the separator line frame.
References FieldEditor::deleteButtonClicked(), and separatorLine.
Here is the call graph for this function:
|
overridevirtual |
the editor widget
Implements FieldEditor.
References addToGrid(), buildTypeDependentEditors(), FieldEditor::dataModel, decimalsEditor, defaultValueEditor, expandableGridLayout, QtPropertyFieldEditor::getWidget(), mainGridLayout, maximumValueEditor, minimumValueEditor, minMaxWidget, FieldEditor::myWidget, nameFieldEditor, FieldEditor::presenter, regExpEditor, QtPropertyFieldEditor::setCheckBoxText(), QtPropertyFieldEditor::setEnumValues(), QtPropertyFieldEditor::setMandatory(), QtPropertyFieldEditor::setPlaceHolderText(), QtPropertyFieldEditor::setTitleCase(), singleStepEditor, typeFieldEditor, and FieldEditor::valueChanged().
Here is the call graph for this function:
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
the advanced grid layout
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
the main grid layout
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
Referenced by appendRowTo(), and getWidget().
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
separator line inserted after the field editor (separator)
Referenced by appendRowTo(), CamiTKPropertyFieldEditor(), and deleteButtonClicked().
|
protected |
Referenced by buildTypeDependentEditors(), and getWidget().
|
protected |
Referenced by getWidget().