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
qMRMLSceneViewMenu.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 __qMRMLSceneViewMenu_h
22#define __qMRMLSceneViewMenu_h
23
24// Slicer includes
25#include "qSlicerSceneViewsModuleExport.h"
26
27// Qt includes
28#include <QMenu>
29
30// CTK includes
31#include <ctkVTKObject.h>
32
33class qMRMLSceneViewMenuPrivate;
34class vtkMRMLScene;
35class vtkMRMLNode;
37
38class Q_SLICER_QTMODULES_SCENEVIEWS_EXPORT qMRMLSceneViewMenu : public QMenu
39{
40 Q_OBJECT
41 QVTK_OBJECT
42 Q_PROPERTY(QString NoSceneViewText READ noSceneViewText WRITE setNoSceneViewText)
43public:
45 typedef QMenu Superclass;
46
48 explicit qMRMLSceneViewMenu(QWidget* newParent = nullptr);
50
53
55 QString noSceneViewText()const;
56 void setNoSceneViewText(const QString& newText);
57
59
60public slots:
61
63 virtual void setMRMLScene(vtkMRMLScene* scene);
64
65signals:
67
68protected:
69 QScopedPointer<qMRMLSceneViewMenuPrivate> d_ptr;
70
71private:
72 Q_DECLARE_PRIVATE(qMRMLSceneViewMenu);
73 Q_DISABLE_COPY(qMRMLSceneViewMenu);
74
75};
76
77#endif
~qMRMLSceneViewMenu() override
virtual void setMRMLScene(vtkMRMLScene *scene)
Set the MRML scene associated with the widget.
vtkMRMLScene * mrmlScene() const
Return a pointer on the current MRML scene.
void setNoSceneViewText(const QString &newText)
QMenu Superclass
Superclass typedef.
void setSceneViewsLogic(vtkSlicerSceneViewsModuleLogic *logic)
void mrmlSceneChanged(vtkMRMLScene *)
qMRMLSceneViewMenu(QWidget *newParent=nullptr)
Constructors.
QScopedPointer< qMRMLSceneViewMenuPrivate > d_ptr
QVTK_OBJECTQString NoSceneViewText
QString noSceneViewText() const
This property holds the menu's text displayed when there are no scene views.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.