Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
CamiTKPropertyFieldEditor.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2025 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26
27#ifndef __CAMITK_PROPERTY_FIELD_EDITOR__
28#define __CAMITK_PROPERTY_FIELD_EDITOR__
29
30
31#include "FieldEditor.h"
33
41public:
44
46 virtual QWidget* getWidget() override;
47
49 virtual void appendRowTo(QGridLayout* layout, bool canBeDeleted) override;
50
51protected:
59 QWidget* minMaxWidget;
66
68 QGridLayout* mainGridLayout;
69
72
75
77 void addToGrid(QGridLayout* gridLayout, FieldEditor* field, int row, int column, int columnSpan = 1);
78
80 void buildTypeDependentEditors(VariantDataModel& dataModelType, bool overwriteDefault = true);
81
82protected slots:
83
86 virtual void deleteButtonClicked() override;
87};
88
89
90#endif // __CAMITK_PROPERTY_FIELD_EDITOR__
Presenter for a CamiTK extension file model.
Definition CamiTKExtensionModelPresenter.h:47
Field editor for CamiTK property.
Definition CamiTKPropertyFieldEditor.h:40
QtPropertyFieldEditor * typeFieldEditor
Definition CamiTKPropertyFieldEditor.h:57
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
Definition CamiTKPropertyFieldEditor.cpp:132
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)
Definition CamiTKPropertyFieldEditor.cpp:143
QtPropertyFieldEditor * singleStepEditor
Definition CamiTKPropertyFieldEditor.h:62
QGridLayout * expandableGridLayout
the advanced grid layout
Definition CamiTKPropertyFieldEditor.h:71
virtual QWidget * getWidget() override
the editor widget
Definition CamiTKPropertyFieldEditor.cpp:51
FieldEditor * defaultValueEditor
Definition CamiTKPropertyFieldEditor.h:58
void buildTypeDependentEditors(VariantDataModel &dataModelType, bool overwriteDefault=true)
build all the editors that depends from the current type
Definition CamiTKPropertyFieldEditor.cpp:150
QtPropertyFieldEditor * minimumValueEditor
Definition CamiTKPropertyFieldEditor.h:60
QGridLayout * mainGridLayout
the main grid layout
Definition CamiTKPropertyFieldEditor.h:68
virtual void deleteButtonClicked() override
Called when the delete button is called Do the same as FieldEditor, but also remove the separator lin...
Definition CamiTKPropertyFieldEditor.cpp:41
QWidget * minMaxWidget
Definition CamiTKPropertyFieldEditor.h:59
QtPropertyFieldEditor * nameFieldEditor
Definition CamiTKPropertyFieldEditor.h:56
QtPropertyFieldEditor * regExpEditor
Definition CamiTKPropertyFieldEditor.h:64
QtPropertyFieldEditor * decimalsEditor
Definition CamiTKPropertyFieldEditor.h:63
QFrame * separatorLine
separator line inserted after the field editor (separator)
Definition CamiTKPropertyFieldEditor.h:74
QtPropertyFieldEditor * maximumValueEditor
Definition CamiTKPropertyFieldEditor.h:61
Abstract class for field editor.
Definition FieldEditor.h:51
QString name
Name of the field (displayed as a label)
Definition FieldEditor.h:92
QString description
Description (displayed as tool tip / what's that)
Definition FieldEditor.h:95
CamiTKExtensionModelPresenter * presenter
The presenter that contains the full VariantDataModel.
Definition FieldEditor.h:83
VariantDataModel & dataModel
The edited data model (part of the presenter's full model)
Definition FieldEditor.h:86
Field editor for atomic type QVariant managed using a single line edit using QtPropertyBrowser.
Definition QtPropertyFieldEditor.h:65
VariantDataModel encapsulates QVariant and can be used as a model for any type of QVariant supported ...
Definition VariantDataModel.h:124