Slicer  4.10
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;
33 class vtkMRMLScene;
35 
42 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerMouseModeToolBar: public QToolBar
43 {
44  Q_OBJECT
46  Q_PROPERTY(QString defaultPlaceClassName READ defaultPlaceClassName WRITE setDefaultPlaceClassName)
47 public:
48  typedef QToolBar Superclass;
49 
52  qSlicerMouseModeToolBar(const QString& title, QWidget* parent = 0);
53  qSlicerMouseModeToolBar(QWidget* parent = 0);
54  virtual ~qSlicerMouseModeToolBar();
55 
57  QString activeActionText();
58 
59  QString defaultPlaceClassName()const;
60  void setDefaultPlaceClassName(const QString& className);
61 
64  Q_INVOKABLE vtkMRMLInteractionNode* interactionNode()const;
65 
66 public slots:
67 
70  void setApplicationLogic(vtkSlicerApplicationLogic* logic);
71 
73  void setMRMLScene(vtkMRMLScene* newScene);
74 
75  void switchToViewTransformMode();
76 
77  void changeCursorTo(QCursor cursor);
78 
80  void switchPlaceMode();
81 
83  void setPersistence(bool persistent);
84 
87  void setInteractionNode(vtkMRMLInteractionNode* interactionNode);
88 
89 protected:
90  QScopedPointer<qSlicerMouseModeToolBarPrivate> d_ptr;
91 
92  QAction* actionFromPlaceNodeClassName(QString placeNodeClassName, QMenu *menu);
93 private:
94  Q_DECLARE_PRIVATE(qSlicerMouseModeToolBar);
95  Q_DISABLE_COPY(qSlicerMouseModeToolBar);
96 };
97 
98 #endif
QScopedPointer< qSlicerMouseModeToolBarPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54