Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qMRMLViewControllerBar.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 This file was originally developed by Julien Finet, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qMRMLViewControllerBar_h
22#define __qMRMLViewControllerBar_h
23
24// Qt includes
25class QLabel;
26class QLayout;
27class QToolButton;
28
29// CTK includes
30#include <ctkVTKObject.h>
31
32// qMRMLWidget includes
33#include "qMRMLWidget.h"
34#include "qMRMLWidgetsExport.h"
35class qMRMLViewControllerBarPrivate;
37
43//
44// Widget layout:
45// VBoxLayout (ControllerLayout)
46// Widget (BarWidget)
47// HBoxLayout (BarLayout)
48// Optional PopupWidget (can be statically displayed under BarWidget if ControllerBar is a panel)
49//
50//
51// To add widgets to the "bar" section, add them to the barLayout().
52// To add widgets to the "controller" section (when not using a
53// popup), add them to the layout().
54//
55class QMRML_WIDGETS_EXPORT qMRMLViewControllerBar
56 : public qMRMLWidget
57{
58 Q_OBJECT
59 QVTK_OBJECT
61
62public:
65
67 explicit qMRMLViewControllerBar(QWidget* parent = nullptr);
69
74
78 Q_INVOKABLE void setLayoutBehavior(LayoutBehavior behavior);
79
83 Q_INVOKABLE QLayout* barLayout();
84
88 Q_INVOKABLE QWidget* barWidget();
89
91 Q_INVOKABLE QToolButton* pinButton();
92
94 Q_INVOKABLE QLabel* viewLabel();
95
97
98public slots:
100
102
103protected slots:
105
106protected:
107 QScopedPointer<qMRMLViewControllerBarPrivate> d_ptr;
108 qMRMLViewControllerBar(qMRMLViewControllerBarPrivate* pimpl, QWidget* parent = nullptr);
109
112
113private:
114 Q_DECLARE_PRIVATE(qMRMLViewControllerBar);
115 Q_DISABLE_COPY(qMRMLViewControllerBar);
116};
117
118#endif
bool showMaximizeViewButton() const
QScopedPointer< qMRMLViewControllerBarPrivate > d_ptr
Q_INVOKABLE QWidget * barWidget()
qMRMLViewControllerBar(QWidget *parent=nullptr)
Constructors.
Q_INVOKABLE QLayout * barLayout()
qMRMLWidget Superclass
Superclass typedef.
virtual void setMRMLViewNode(vtkMRMLAbstractViewNode *viewNode)
~qMRMLViewControllerBar() override
qMRMLViewControllerBar(qMRMLViewControllerBarPrivate *pimpl, QWidget *parent=nullptr)
QVTK_OBJECTbool showMaximizeViewButton
virtual void updateWidgetFromMRMLView()
Q_INVOKABLE QLabel * viewLabel()
Label that displays the view's name.
virtual vtkMRMLAbstractViewNode * mrmlViewNode() const
Q_INVOKABLE void setLayoutBehavior(LayoutBehavior behavior)
void setShowMaximizeViewButton(bool show)
Q_INVOKABLE QToolButton * pinButton()
Push-pin icon that shows additional options when clicked.
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...