Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
CamiTKPropertyListFieldEditor Class Reference

Same as ExpandableFieldEditor but has a "+" button on the left that, when clicked, adds a new CamiTKPropertyFieldEditor at the end of the inner widget. More...

#include <CamiTKPropertyListFieldEditor.h>

+ Inheritance diagram for CamiTKPropertyListFieldEditor:
+ Collaboration diagram for CamiTKPropertyListFieldEditor:

Public Slots

void plusButtonClicked ()
 called when the "+" button is clicked
 
- Public Slots inherited from ExpandableFieldEditor
void expandButtonClicked (bool checked)
 called when the ">" button is clicked (shows/hides the inner widget)
 

Public Member Functions

 CamiTKPropertyListFieldEditor (CamiTKExtensionModelPresenter *presenter, QWidget *innerWidget, VariantDataModel &dataModel, const QString &label="Advanced Plus", bool compact=false, bool expandedAtInitialization=false)
 constructor
 
virtual QWidget * getWidget () override
 get the widget (adds a "+" at the end of the ExpandableFieldEditor title + connect the "+" button clicked signal to the corresponding slot)
 
- Public Member Functions inherited from ExpandableFieldEditor
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)
 
- 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)
 

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 ExpandableFieldEditor
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
VariantDataModeldataModel
 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)
 
CamiTKExtensionModelPresenterpresenter
 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)
 

Detailed Description

Same as ExpandableFieldEditor but has a "+" button on the left that, when clicked, adds a new CamiTKPropertyFieldEditor at the end of the inner widget.

Constructor & Destructor Documentation

◆ CamiTKPropertyListFieldEditor()

CamiTKPropertyListFieldEditor::CamiTKPropertyListFieldEditor ( CamiTKExtensionModelPresenter presenter,
QWidget *  innerWidget,
VariantDataModel dataModel,
const QString &  label = "Advanced Plus",
bool  compact = false,
bool  expandedAtInitialization = false 
)

constructor

Member Function Documentation

◆ getWidget()

QWidget * CamiTKPropertyListFieldEditor::getWidget ( )
overridevirtual

get the widget (adds a "+" at the end of the ExpandableFieldEditor title + connect the "+" button clicked signal to the corresponding slot)

Reimplemented from ExpandableFieldEditor.

References ExpandableFieldEditor::expandableWidgetTitleLayout, ExpandableFieldEditor::getWidget(), ExpandableFieldEditor::label, FieldEditor::myWidget, and plusButtonClicked().

+ Here is the call graph for this function:

◆ plusButtonClicked

void CamiTKPropertyListFieldEditor::plusButtonClicked ( )
slot

called when the "+" button is clicked

References VariantDataModel::append(), CamiTKPropertyFieldEditor::appendRowTo(), FieldEditor::dataModel, ExpandableFieldEditor::expandButtonClicked(), ExpandableFieldEditor::innerWidget, VariantDataModel::last(), CamiTKExtensionModelPresenter::modelUpdated(), and FieldEditor::presenter.

Referenced by getWidget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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