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
qMRMLPlotView.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Kapteyn Astronomical Institute
4 University of Groningen, Groningen, Netherlands. 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 Davide Punzo, Kapteyn Astronomical Institute,
16 and was supported through the European Research Council grant nr. 291531.
17
18==============================================================================*/
19
20#ifndef __qMRMLPlotView_h
21#define __qMRMLPlotView_h
22
23// CTK includes
24#include <ctkPimpl.h>
25#include <ctkVTKChartView.h>
26
27#include "qMRMLWidgetsExport.h"
28
29class qMRMLPlotViewPrivate;
30
31// MRML includes
33class vtkMRMLScene;
34
35// VTK includes
36class vtkCollection;
37class vtkStringArray;
38
44
45class QMRML_WIDGETS_EXPORT qMRMLPlotView : public ctkVTKChartView
46{
47 Q_OBJECT
48public:
50 typedef ctkVTKChartView Superclass;
51
53 explicit qMRMLPlotView(QWidget* parent = nullptr);
54 ~qMRMLPlotView() override;
55
58
61
63 QSize sizeHint() const override;
64
65public slots:
66
68 void setMRMLScene(vtkMRMLScene* newScene);
69
72
75
78
82 void saveAsSVG(const QString &fileName);
83
84signals:
85
90
94 void dataSelected(vtkStringArray* mrmlPlotSeriesIDs, vtkCollection* selectionCol);
95
96protected slots:
97
99
100protected:
101 QScopedPointer<qMRMLPlotViewPrivate> d_ptr;
102
104 void keyPressEvent(QKeyEvent* event) override;
105
106 void keyReleaseEvent(QKeyEvent* event) override;
107
108private:
109 Q_DECLARE_PRIVATE(qMRMLPlotView);
110 Q_DISABLE_COPY(qMRMLPlotView);
111};
112
113#endif
void setMRMLPlotViewNode(vtkMRMLPlotViewNode *newPlotViewNode)
Set the current viewNode to observe.
vtkMRMLScene * mrmlScene() const
Return a pointer on the current MRML scene.
void mrmlSceneChanged(vtkMRMLScene *)
void fitToContent()
Change axis limits to show all content.
void setMRMLScene(vtkMRMLScene *newScene)
Set the MRML scene that should be listened for events.
void dataSelected(vtkStringArray *mrmlPlotSeriesIDs, vtkCollection *selectionCol)
void keyReleaseEvent(QKeyEvent *event) override
void keyPressEvent(QKeyEvent *event) override
Handle keyboard events.
void updateMRMLChartAxisRangeFromWidget()
qMRMLPlotView(QWidget *parent=nullptr)
Constructors.
void RemovePlotSelections()
Unselect all the points.
vtkMRMLPlotViewNode * mrmlPlotViewNode() const
Get the PlotView node observed by view.
~qMRMLPlotView() override
ctkVTKChartView Superclass
Superclass typedef.
QSize sizeHint() const override
Redefine the sizeHint so layouts work properly.
void saveAsSVG(const QString &fileName)
QScopedPointer< qMRMLPlotViewPrivate > d_ptr
MRML node to represent Plot view parameters.
A set of MRML Nodes that supports serialization and undo/redo.