Slicer  4.8
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 QLayout;
26 
27 // qMRMLWidget includes
28 #include "qMRMLWidget.h"
29 #include "qMRMLWidgetsExport.h"
30 class qMRMLViewControllerBarPrivate;
31 
37 //
38 // Widget layout:
39 // VBoxLayout (ControllerLayout)
40 // Widget (BarWidget)
41 // HBoxLayout (BarLayout)
42 // Optional PopupWidget (can be statically displayed under BarWidget if ControllerBar is a panel)
43 //
44 //
45 // To add widgets to the "bar" section, add them to the barLayout().
46 // To add widgets to the "controller" section (when not using a
47 // popup), add them to the layout().
48 //
49 class QMRML_WIDGETS_EXPORT qMRMLViewControllerBar
50  : public qMRMLWidget
51 {
52  Q_OBJECT
53 public:
56 
58  explicit qMRMLViewControllerBar(QWidget* parent = 0);
59  virtual ~qMRMLViewControllerBar();
60 
62  Popup=0,
63  Panel
64  };
65 
69  void setLayoutBehavior(LayoutBehavior behavior);
70 
71  // get the layout for the "bar" in the view controller. this layout
72  // is an HBoxLayout. It itself is packed in a VBoxLayout that
73  // contains the "bar" and other controllers.
74  QLayout* barLayout();
75 
76  // get the widget for the "bar" in the view controller.
77  QWidget* barWidget();
78 
79 protected:
80  QScopedPointer<qMRMLViewControllerBarPrivate> d_ptr;
81  qMRMLViewControllerBar(qMRMLViewControllerBarPrivate* pimpl, QWidget* parent = 0);
82 
83 private:
84  Q_DECLARE_PRIVATE(qMRMLViewControllerBar);
85  Q_DISABLE_COPY(qMRMLViewControllerBar);
86 };
87 
88 #endif
QScopedPointer< qMRMLViewControllerBarPrivate > d_ptr
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
qMRMLWidget Superclass
Superclass typedef.