Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
29 class qMRMLPlotViewPrivate;
30 
31 // MRML includes
33 class vtkMRMLScene;
34 
35 // VTK includes
36 class vtkCollection;
37 class vtkStringArray;
38 
44 
45 class QMRML_WIDGETS_EXPORT qMRMLPlotView : public ctkVTKChartView
46 {
47  Q_OBJECT
48 public:
50  typedef ctkVTKChartView Superclass;
51 
53  explicit qMRMLPlotView(QWidget* parent = 0);
54  virtual ~qMRMLPlotView();
55 
57  vtkMRMLScene* mrmlScene() const;
58 
60  vtkMRMLPlotViewNode* mrmlPlotViewNode()const;
61 
63  virtual QSize sizeHint() const;
64 
65 public slots:
66 
68  void setMRMLScene(vtkMRMLScene* newScene);
69 
71  void setMRMLPlotViewNode(vtkMRMLPlotViewNode* newPlotViewNode);
72 
74  void fitToContent();
75 
77  void RemovePlotSelections();
78 
79 signals:
80 
84  void mrmlSceneChanged(vtkMRMLScene*);
85 
89  void dataSelected(vtkStringArray* mrmlPlotSeriesIDs, vtkCollection* selectionCol);
90 
91 protected slots:
92 
93  void updateMRMLChartAxisRangeFromWidget();
94 
95 protected:
96  QScopedPointer<qMRMLPlotViewPrivate> d_ptr;
97 
99  virtual void keyPressEvent(QKeyEvent* event);
100 
101  virtual void keyReleaseEvent(QKeyEvent* event);
102 
103 private:
104  Q_DECLARE_PRIVATE(qMRMLPlotView);
105  Q_DISABLE_COPY(qMRMLPlotView);
106 };
107 
108 #endif
MRML node to represent Plot view parameters.
ctkVTKChartView Superclass
Superclass typedef.
Definition: qMRMLPlotView.h:50
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
QScopedPointer< qMRMLPlotViewPrivate > d_ptr
Definition: qMRMLPlotView.h:96
qMRMLPlotView is the display canvas for a Plot.
Definition: qMRMLPlotView.h:45