Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
ExpandableFieldEditor.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 __EXPANDABLE_FIELD_EDITOR__
28#define __EXPANDABLE_FIELD_EDITOR__
29
30#include "FieldEditor.h"
31
32#include <QPushButton>
33
41public:
43
45 virtual QWidget* getWidget() override;
46
49 virtual void appendRowTo(QGridLayout* layout);
50
51public slots:
53 void expandButtonClicked(bool checked);
54
55protected:
57 QWidget* innerWidget;
59 QPushButton* expandButton;
61 QString label;
64 // if true, the the widget is compacted to minimal space
65 bool compact;
66 // if true the hidden widget starts in an expanded state
68};
69
70#endif // __EXPANDABLE_FIELD_EDITOR__
Presenter for a CamiTK extension file model.
Definition CamiTKExtensionModelPresenter.h:47
An expandable field editor is encapsulating a widget that can be initially hidden and can be shown by...
Definition ExpandableFieldEditor.h:40
QPushButton * expandButton
the expand button (">")
Definition ExpandableFieldEditor.h:59
QString label
The title label (left to the ">" button)
Definition ExpandableFieldEditor.h:61
virtual void appendRowTo(QGridLayout *layout)
Append this widget to the given grid layout As ExpandableFieldEditor don't have any label,...
Definition ExpandableFieldEditor.cpp:74
bool expandedAtInitialization
Definition ExpandableFieldEditor.h:67
void expandButtonClicked(bool checked)
called when the ">" button is clicked (shows/hides the inner widget)
Definition ExpandableFieldEditor.cpp:82
virtual QWidget * getWidget() override
Build the advanced widget that encapsulate the innerWidget.
Definition ExpandableFieldEditor.cpp:40
bool compact
Definition ExpandableFieldEditor.h:65
QHBoxLayout * expandableWidgetTitleLayout
The layout that has the expand button and label. In subclass AdvandedPlusFieldEditor a "+" is added a...
Definition ExpandableFieldEditor.h:63
QWidget * innerWidget
the advanced/hidden inner widget
Definition ExpandableFieldEditor.h:57
Abstract class for field editor.
Definition FieldEditor.h:51
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
VariantDataModel encapsulates QVariant and can be used as a model for any type of QVariant supported ...
Definition VariantDataModel.h:124