Slicer  5.2
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 = nullptr);
53  qSlicerMouseModeToolBar(QWidget* parent = nullptr);
54  ~qSlicerMouseModeToolBar() override;
55 
56  QString defaultPlaceClassName()const;
57  void setDefaultPlaceClassName(const QString& className);
58 
61  Q_INVOKABLE vtkMRMLInteractionNode* interactionNode()const;
62 
63 public slots:
64 
67  void setApplicationLogic(vtkSlicerApplicationLogic* logic);
68 
70  void setMRMLScene(vtkMRMLScene* newScene);
71 
72  void switchToViewTransformMode();
73 
74  void changeCursorTo(QCursor cursor);
75 
77  void switchPlaceMode();
78 
80  void setPersistence(bool persistent);
81 
84  void setInteractionNode(vtkMRMLInteractionNode* interactionNode);
85 
86  void interactionModeActionTriggered(bool);
87 
88  void setAdjustWindowLevelMode(int);
89 
90  void toggleMarkupsToolBar();
91 
92 protected:
93  QScopedPointer<qSlicerMouseModeToolBarPrivate> d_ptr;
94 
95  QAction* actionFromPlaceNodeClassName(QString placeNodeClassName, QMenu *menu);
96 private:
97  Q_DECLARE_PRIVATE(qSlicerMouseModeToolBar);
98  Q_DISABLE_COPY(qSlicerMouseModeToolBar);
99 };
100 
101 #endif
QScopedPointer< qSlicerMouseModeToolBarPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57