FieldEditor for list. More...
#include <ListFieldEditor.h>
Inheritance diagram for ListFieldEditor:
Collaboration diagram for ListFieldEditor:Public Member Functions | |
| virtual QWidget * | getWidget () override |
| Build an editable QListWidget (where items can be added an removed) | |
| ListFieldEditor (CamiTKExtensionModelPresenter *presenter, VariantDataModel &dataModel, const QString &name="", const QString &description="") | |
| Constructor. | |
Public Member Functions inherited from FieldEditor | |
| virtual void | appendRowTo (QGridLayout *layout, bool canBeDeleted=false) |
| Adds a row at the end of the given layout with two columns: | |
| 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 Member Functions | |
| void | updateModel () |
| update the VariantDataModel according to the modification in the GUI (and informed the CamiTKExtensionModelPresenter) | |
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) | |
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 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) | |
FieldEditor for list.
Provides an editable list widget for string list data model.
| ListFieldEditor::ListFieldEditor | ( | CamiTKExtensionModelPresenter * | presenter, |
| VariantDataModel & | dataModel, | ||
| const QString & | name = "", |
||
| const QString & | description = "" |
||
| ) |
Constructor.
|
overridevirtual |
Build an editable QListWidget (where items can be added an removed)
Implements FieldEditor.
References FieldEditor::dataModel, FieldEditor::description, VariantDataModel::getValue(), FieldEditor::myWidget, FieldEditor::name, and updateModel().
Here is the call graph for this function:
|
protected |
update the VariantDataModel according to the modification in the GUI (and informed the CamiTKExtensionModelPresenter)
References FieldEditor::dataModel, CamiTKExtensionModelPresenter::modelUpdated(), and FieldEditor::presenter.
Referenced by getWidget().
Here is the call graph for this function:
Here is the caller graph for this function: