Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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// CTK includes
28#include <ctkPimpl.h>
29// no ui begin
30#include <ctkVTKObject.h>
31// no ui end
32
33// qMRMLWidget includes
34#include "qMRMLWidget.h"
35#include "qSlicerMarkupsModuleWidgetsExport.h"
36
37// MRML includes
38#include <vtkMRMLScene.h>
39
40// MRML includes
42
43class qMRMLMarkupsToolBarPrivate;
44class vtkMRMLNode;
45class vtkMRMLScene;
50
51class QAction;
52class QActionGroup;
53class QToolButton;
54
55class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsToolBar : public QToolBar
56{
57 Q_OBJECT
58 QVTK_OBJECT
59public:
60 typedef QToolBar Superclass;
61
64 qMRMLMarkupsToolBar(const QString& title, QWidget* parent = 0);
65 qMRMLMarkupsToolBar(QWidget* parent = 0);
67
70 Q_INVOKABLE vtkMRMLSelectionNode* selectionNode() const;
71
73 void addCreateNodeShortcut(QString keySequence);
74 void addTogglePersistenceShortcut(QString keySequence);
75 void addPlacePointShortcut(QString keySequence);
76
77public slots:
79 virtual void setMRMLScene(vtkMRMLScene* newScene);
81
83 void setActiveMarkupsNode(vtkMRMLMarkupsNode* newActiveMarkupsNode);
84 void setPersistence(bool persistent);
88
90 void onAddNewMarkupsNodeByClass(const QString& className);
91
92 // Keyboard shortcuts for Markups node interactions
96
97signals:
101
102protected slots:
105
106protected:
107 QScopedPointer<qMRMLMarkupsToolBarPrivate> d_ptr;
108
109private:
110 Q_DECLARE_PRIVATE(qMRMLMarkupsToolBar);
111 Q_DISABLE_COPY(qMRMLMarkupsToolBar);
112};
113
114#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.