An expandable field editor is encapsulating a widget that can be initially hidden and can be shown by clicking on an expand button. More...
#include <ExpandableFieldEditor.h>
Inheritance diagram for ExpandableFieldEditor:
Collaboration diagram for ExpandableFieldEditor:Public Slots | |
| void | expandButtonClicked (bool checked) |
| called when the ">" button is clicked (shows/hides the inner widget) | |
Public Member Functions | |
| virtual void | appendRowTo (QGridLayout *layout) |
| Append this widget to the given grid layout As ExpandableFieldEditor don't have any label, the widget is spanned over 2 columns. | |
| ExpandableFieldEditor (CamiTKExtensionModelPresenter *presenter, QWidget *innerWidget, VariantDataModel &dataModel, const QString &label="Advanced", bool compact=false, bool expandedAtInitialization=false) | |
| virtual QWidget * | getWidget () override |
| Build the advanced widget that encapsulate the innerWidget. | |
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 Attributes | |
| bool | compact |
| QHBoxLayout * | expandableWidgetTitleLayout |
| The layout that has the expand button and label. In subclass AdvandedPlusFieldEditor a "+" is added at the left. | |
| QPushButton * | expandButton |
| the expand button (">") | |
| bool | expandedAtInitialization |
| QWidget * | innerWidget |
| the advanced/hidden inner widget | |
| QString | label |
| The title label (left to the ">" button) | |
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) | |
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. | |
An expandable field editor is encapsulating a widget that can be initially hidden and can be shown by clicking on an expand button.
Its role is to simplify the appearance of the GUI to present a relatively smaller number of fields to edit.
| ExpandableFieldEditor::ExpandableFieldEditor | ( | CamiTKExtensionModelPresenter * | presenter, |
| QWidget * | innerWidget, | ||
| VariantDataModel & | dataModel, | ||
| const QString & | label = "Advanced", |
||
| bool | compact = false, |
||
| bool | expandedAtInitialization = false |
||
| ) |
References compact, expandedAtInitialization, innerWidget, and label.
|
virtual |
Append this widget to the given grid layout As ExpandableFieldEditor don't have any label, the widget is spanned over 2 columns.
References FieldEditor::description, getWidget(), and FieldEditor::myGridLayout.
Referenced by ActionTabPresenter::ActionTabPresenter(), CppActionTabPresenter::CppActionTabPresenter(), CppExtensionTabPresenter::CppExtensionTabPresenter(), and PythonActionTabPresenter::PythonActionTabPresenter().
Here is the call graph for this function:
Here is the caller graph for this function:
|
slot |
called when the ">" button is clicked (shows/hides the inner widget)
References expandButton, innerWidget, and FieldEditor::myWidget.
Referenced by getWidget(), and CamiTKPropertyListFieldEditor::plusButtonClicked().
Here is the caller graph for this function:
|
overridevirtual |
Build the advanced widget that encapsulate the innerWidget.
Implements FieldEditor.
Reimplemented in CamiTKPropertyListFieldEditor.
References compact, expandableWidgetTitleLayout, expandButton, expandButtonClicked(), expandedAtInitialization, innerWidget, label, and FieldEditor::myWidget.
Referenced by appendRowTo(), and CamiTKPropertyListFieldEditor::getWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Referenced by ExpandableFieldEditor(), and getWidget().
|
protected |
The layout that has the expand button and label. In subclass AdvandedPlusFieldEditor a "+" is added at the left.
Referenced by CamiTKPropertyListFieldEditor::getWidget(), and getWidget().
|
protected |
the expand button (">")
Referenced by expandButtonClicked(), and getWidget().
|
protected |
Referenced by ExpandableFieldEditor(), and getWidget().
|
protected |
the advanced/hidden inner widget
Referenced by ExpandableFieldEditor(), expandButtonClicked(), getWidget(), and CamiTKPropertyListFieldEditor::plusButtonClicked().
|
protected |
The title label (left to the ">" button)
Referenced by ExpandableFieldEditor(), CamiTKPropertyListFieldEditor::getWidget(), and getWidget().