Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qMRMLMarkupsToolBar.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==============================================================================*/
17
18#ifndef __qMRMLMarkupsToolBar_h
19#define __qMRMLMarkupsToolBar_h
20
21// Qt includes
22#include <QSignalMapper>
23#include <QToolBar>
24#include <QMenu>
25#include <QCheckBox>
26
27
28// CTK includes
29#include <ctkPimpl.h>
30// no ui begin
31#include <ctkVTKObject.h>
32// no ui end
33
34// qMRMLWidget includes
35#include "qMRMLWidget.h"
36#include "qSlicerMarkupsModuleWidgetsExport.h"
37
38// MRML includes
39#include <vtkMRMLScene.h>
40
41// MRML includes
43
44class qMRMLMarkupsToolBarPrivate;
45class vtkMRMLNode;
46class vtkMRMLScene;
51
52class QAction;
53class QActionGroup;
54class QToolButton;
55
56class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsToolBar : public QToolBar
57{
58 Q_OBJECT
59 QVTK_OBJECT
60public:
61 typedef QToolBar Superclass;
62
65 qMRMLMarkupsToolBar(const QString& title, QWidget* parent = 0);
66 qMRMLMarkupsToolBar(QWidget* parent = 0);
68
72
74 void addCreateNodeShortcut(QString keySequence);
75 void addTogglePersistenceShortcut(QString keySequence);
76 void addPlacePointShortcut(QString keySequence);
77
78public slots:
80 virtual void setMRMLScene(vtkMRMLScene* newScene);
82
84 void setActiveMarkupsNode(vtkMRMLMarkupsNode* newActiveMarkupsNode);
85 void setPersistence(bool persistent);
89
91 void onAddNewMarkupsNodeByClass(const QString& className);
92
93 // Keyboard shortcuts for Markups node interactions
97
98signals:
102
103protected slots:
106
107protected:
108 QScopedPointer<qMRMLMarkupsToolBarPrivate> d_ptr;
109
110private:
111 Q_DECLARE_PRIVATE(qMRMLMarkupsToolBar);
112 Q_DISABLE_COPY(qMRMLMarkupsToolBar);
113};
114
115#endif
void onTogglePersistenceShortcut()
void initializeToolBarLayout()
~qMRMLMarkupsToolBar() override
void onMarkupsNodeChanged(vtkMRMLNode *)
Update the widget when a different markups node is selected by the combo box.
QScopedPointer< qMRMLMarkupsToolBarPrivate > d_ptr
vtkMRMLMarkupsNode * activeMarkupsNode()
void mrmlSceneChanged(vtkMRMLScene *)
virtual void setMRMLScene(vtkMRMLScene *newScene)
void onAddNewMarkupsNodeByClass(const QString &className)
Create markup by class.
qMRMLMarkupsToolBar(QWidget *parent=0)
void setSelectionNode(vtkMRMLSelectionNode *selectionNode)
Q_INVOKABLE vtkMRMLInteractionNode * interactionNode() const
void activeMarkupsNodeChanged(vtkMRMLNode *activeMarkupsNode)
Q_INVOKABLE vtkMRMLSelectionNode * selectionNode() const
void addCreateNodeShortcut(QString keySequence)
qMRMLMarkupsToolBar(const QString &title, QWidget *parent=0)
void setApplicationLogic(vtkSlicerApplicationLogic *logic)
void addTogglePersistenceShortcut(QString keySequence)
void addPlacePointShortcut(QString keySequence)
void activeMarkupsPlaceModeChanged(bool enabled)
void setActiveMarkupsNode(vtkMRMLMarkupsNode *newActiveMarkupsNode)
Set the currently selected markups node.
void interactionModeActionTriggered(bool)
void setPersistence(bool persistent)
void setInteractionNode(vtkMRMLInteractionNode *interactionNode)
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
MRML node for storing information about the active nodes in the scene.