Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qMRMLAbstractViewWidget.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Kyle Sunderland, PerkLab, Queen's University
16 and was supported through CANARIE's Research Software Program, Cancer
17 Care Ontario, OpenAnatomy, and Brigham and Women's Hospital through NIH grant R01MH112748.
18
19==============================================================================*/
20
21#ifndef __qMRMLAbstractViewWidget_h
22#define __qMRMLAbstractViewWidget_h
23
24// Qt includes
25class QWidget;
26
27// qMRMLWidget includes
28#include "qMRMLWidget.h"
30
31// MRML includes
33
34// MRMLLogic includes
36
37class QMRML_WIDGETS_EXPORT qMRMLAbstractViewWidget : public qMRMLWidget
38{
39 Q_OBJECT
40
41 Q_PROPERTY(QString viewLabel READ viewLabel WRITE setViewLabel)
42 Q_PROPERTY(QColor viewColor READ viewColor WRITE setViewColor)
43
44public:
47
49 explicit qMRMLAbstractViewWidget(QWidget* parent = nullptr);
50 ~qMRMLAbstractViewWidget() override = default;
51
53 virtual Q_INVOKABLE qMRMLViewControllerBar* controllerWidget() const = 0;
54
56 virtual Q_INVOKABLE vtkMRMLAbstractViewNode* mrmlAbstractViewNode() const = 0;
57
59 virtual Q_INVOKABLE vtkMRMLAbstractLogic* logic() const;
60
64 virtual Q_INVOKABLE QWidget* viewWidget() const = 0;
65
68 virtual Q_INVOKABLE QString viewLabel() const;
69
72 virtual Q_INVOKABLE void setViewLabel(const QString& newViewLabel);
73
76 virtual Q_INVOKABLE QColor viewColor() const;
77
80 virtual Q_INVOKABLE void setViewColor(const QColor& newViewColor);
81
82public slots:
84 virtual void setMRMLAbstractViewNode(vtkMRMLAbstractViewNode* newViewNode) = 0;
85
88 virtual void setRenderPaused(bool pause);
91 virtual void pauseRender();
94 virtual void resumeRender();
95
96private:
97 Q_DISABLE_COPY(qMRMLAbstractViewWidget);
98};
99
100#endif
virtual Q_INVOKABLE void setViewLabel(const QString &newViewLabel)
virtual Q_INVOKABLE vtkMRMLAbstractViewNode * mrmlAbstractViewNode() const =0
Get the View node observed by view.
virtual void setMRMLAbstractViewNode(vtkMRMLAbstractViewNode *newViewNode)=0
Set the current viewNode to observe.
virtual Q_INVOKABLE qMRMLViewControllerBar * controllerWidget() const =0
Get slice controller.
virtual Q_INVOKABLE void setViewColor(const QColor &newViewColor)
virtual void setRenderPaused(bool pause)
virtual void pauseRender()
virtual Q_INVOKABLE vtkMRMLAbstractLogic * logic() const
virtual Q_INVOKABLE QWidget * viewWidget() const =0
virtual void resumeRender()
qMRMLAbstractViewWidget(QWidget *parent=nullptr)
Constructors.
qMRMLWidget Superclass
Superclass typedef.
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Superclass for MRML logic classes.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...