Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerMouseModeToolBar.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 Jean-Christophe Fillion-Robin, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerMouseModeToolBar_h
22 #define __qSlicerMouseModeToolBar_h
23 
24 // Qt includes
25 #include <QToolBar>
26 #include <QMenu>
27 
28 // CTK includes
29 #include "qSlicerBaseQTGUIExport.h"
30 
31 class qSlicerMouseModeToolBarPrivate;
32 class vtkMRMLScene;
34 
41 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerMouseModeToolBar: public QToolBar
42 {
43  Q_OBJECT
45  Q_PROPERTY(QString defaultPlaceClassName READ defaultPlaceClassName WRITE setDefaultPlaceClassName)
46 public:
47  typedef QToolBar Superclass;
48 
51  qSlicerMouseModeToolBar(const QString& title, QWidget* parent = 0);
52  qSlicerMouseModeToolBar(QWidget* parent = 0);
53  virtual ~qSlicerMouseModeToolBar();
54 
56  QString activeActionText();
57 
58  QString defaultPlaceClassName()const;
59  void setDefaultPlaceClassName(const QString& className);
60 
61 public slots:
62 
65  void setApplicationLogic(vtkSlicerApplicationLogic* logic);
66 
68  void setMRMLScene(vtkMRMLScene* newScene);
69 
70  void switchToViewTransformMode();
71 
72  void changeCursorTo(QCursor cursor);
73 
75  void switchPlaceMode();
76 
78  void setPersistence(bool persistent);
79 
80 protected:
81  QScopedPointer<qSlicerMouseModeToolBarPrivate> d_ptr;
82 
83  QAction* actionFromText(QString actionText, QMenu *menu);
84 private:
85  Q_DECLARE_PRIVATE(qSlicerMouseModeToolBar);
86  Q_DISABLE_COPY(qSlicerMouseModeToolBar);
87 };
88 
89 #endif
QScopedPointer< qSlicerMouseModeToolBarPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54