Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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
25 class QLabel;
26 class QLayout;
27 class QToolButton;
28 
29 // qMRMLWidget includes
30 #include "qMRMLWidget.h"
31 #include "qMRMLWidgetsExport.h"
32 class qMRMLViewControllerBarPrivate;
33 
39 //
40 // Widget layout:
41 // VBoxLayout (ControllerLayout)
42 // Widget (BarWidget)
43 // HBoxLayout (BarLayout)
44 // Optional PopupWidget (can be statically displayed under BarWidget if ControllerBar is a panel)
45 //
46 //
47 // To add widgets to the "bar" section, add them to the barLayout().
48 // To add widgets to the "controller" section (when not using a
49 // popup), add them to the layout().
50 //
51 class QMRML_WIDGETS_EXPORT qMRMLViewControllerBar
52  : public qMRMLWidget
53 {
54  Q_OBJECT
55 public:
58 
60  explicit qMRMLViewControllerBar(QWidget* parent = 0);
61  virtual ~qMRMLViewControllerBar();
62 
64  Popup=0,
65  Panel
66  };
67 
71  Q_INVOKABLE void setLayoutBehavior(LayoutBehavior behavior);
72 
76  Q_INVOKABLE QLayout* barLayout();
77 
81  Q_INVOKABLE QWidget* barWidget();
82 
84  Q_INVOKABLE QToolButton* pinButton();
85 
87  Q_INVOKABLE QLabel* viewLabel();
88 
89 protected:
90  QScopedPointer<qMRMLViewControllerBarPrivate> d_ptr;
91  qMRMLViewControllerBar(qMRMLViewControllerBarPrivate* pimpl, QWidget* parent = 0);
92 
93 private:
94  Q_DECLARE_PRIVATE(qMRMLViewControllerBar);
95  Q_DISABLE_COPY(qMRMLViewControllerBar);
96 };
97 
98 #endif
QScopedPointer< qMRMLViewControllerBarPrivate > d_ptr
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
qMRMLWidget Superclass
Superclass typedef.