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

Field editor for CamiTK property. More...

#include <CamiTKPropertyFieldEditor.h>

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

QtPropertyFieldEditornameFieldEditor
QtPropertyFieldEditortypeFieldEditor
FieldEditordefaultValueEditor
QWidget * minMaxWidget
QtPropertyFieldEditorminimumValueEditor
QtPropertyFieldEditormaximumValueEditor
QtPropertyFieldEditorsingleStepEditor
QtPropertyFieldEditordecimalsEditor
QtPropertyFieldEditorregExpEditor
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)

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)

Detailed Description

Field editor for CamiTK property.

Presents the different attributes of a property: name, type, initial value, ...

Constructor & Destructor Documentation

◆ CamiTKPropertyFieldEditor()

CamiTKPropertyFieldEditor::CamiTKPropertyFieldEditor ( CamiTKExtensionModelPresenter * presenter,
VariantDataModel & dataModel,
const QString & name = "",
const QString & description = "" )

Member Function Documentation

◆ addToGrid()

void CamiTKPropertyFieldEditor::addToGrid ( QGridLayout * gridLayout,
FieldEditor * field,
int row,
int column,
int columnSpan = 1 )
protected

add a field editor to a specific grid cell (allows for stacking more than default label/field editor)

References FieldEditor::FieldEditor(), and FieldEditor::getWidget().

Referenced by buildTypeDependentEditors(), and getWidget().

◆ appendRowTo()

void CamiTKPropertyFieldEditor::appendRowTo ( QGridLayout * layout,
bool canBeDeleted )
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, and separatorLine.

Referenced by CamiTKPropertyListFieldEditor::plusButtonClicked().

◆ buildTypeDependentEditors()

◆ deleteButtonClicked

void CamiTKPropertyFieldEditor::deleteButtonClicked ( )
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.

◆ getWidget()

Member Data Documentation

◆ decimalsEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::decimalsEditor
protected

◆ defaultValueEditor

FieldEditor* CamiTKPropertyFieldEditor::defaultValueEditor
protected

◆ expandableGridLayout

QGridLayout* CamiTKPropertyFieldEditor::expandableGridLayout
protected

the advanced grid layout

Referenced by buildTypeDependentEditors(), and getWidget().

◆ mainGridLayout

QGridLayout* CamiTKPropertyFieldEditor::mainGridLayout
protected

the main grid layout

Referenced by buildTypeDependentEditors(), and getWidget().

◆ maximumValueEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::maximumValueEditor
protected

◆ minimumValueEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::minimumValueEditor
protected

◆ minMaxWidget

QWidget* CamiTKPropertyFieldEditor::minMaxWidget
protected

◆ nameFieldEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::nameFieldEditor
protected

Referenced by appendRowTo(), and getWidget().

◆ regExpEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::regExpEditor
protected

◆ separatorLine

QFrame* CamiTKPropertyFieldEditor::separatorLine
protected

separator line inserted after the field editor (separator)

Referenced by appendRowTo(), CamiTKPropertyFieldEditor(), and deleteButtonClicked().

◆ singleStepEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::singleStepEditor
protected

◆ typeFieldEditor

QtPropertyFieldEditor* CamiTKPropertyFieldEditor::typeFieldEditor
protected

Referenced by getWidget().


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