Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLChartView.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
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 __qMRMLChartView_h
19 #define __qMRMLChartView_h
20 
21 #include "qMRMLWidgetsConfigure.h" // For MRML_WIDGETS_HAVE_WEBKIT_SUPPORT
22 
23 // Qt includes
24 #ifdef MRML_WIDGETS_HAVE_WEBKIT_SUPPORT
25 #include <QWebView>
26 #else
27 #include <QWebEngineView>
28 #endif
29 
30 #include "qMRMLWidgetsExport.h"
31 
32 class qMRMLChartViewPrivate;
33 
34 // MRML includes
36 class vtkMRMLColorLogic;
37 class vtkMRMLScene;
38 
46 class QMRML_WIDGETS_EXPORT qMRMLChartView :
47 #ifdef MRML_WIDGETS_HAVE_WEBKIT_SUPPORT
48  public QWebView
49 #else
50  public QWebEngineView
51 #endif
52 {
53  Q_OBJECT
54 public:
56 #ifdef MRML_WIDGETS_HAVE_WEBKIT_SUPPORT
57  typedef QWebView Superclass;
58 #else
59  typedef QWebEngineView Superclass;
60 #endif
61 
63  explicit qMRMLChartView(QWidget* parent = 0);
64  virtual ~qMRMLChartView();
65 
67  vtkMRMLScene* mrmlScene() const;
68 
70  vtkMRMLChartViewNode* mrmlChartViewNode()const;
71 
74  void setColorLogic(vtkMRMLColorLogic* colorLogic);
75 
77  vtkMRMLColorLogic* colorLogic()const;
78 
80  virtual QSize sizeHint() const;
81 
82 public slots:
83 
85  void setMRMLScene(vtkMRMLScene* newScene);
86 
88  void setMRMLChartViewNode(vtkMRMLChartViewNode* newChartViewNode);
89 
90 signals:
91 
94  void dataMouseOver(const char *mrmlArrayID, int pointidx, double x, double y);
95 
98  void dataPointClicked(const char *mrmlArrayID, int pointidx, double x, double y);
99 
103  void mrmlSceneChanged(vtkMRMLScene*);
104 
105 protected:
106  QScopedPointer<qMRMLChartViewPrivate> d_ptr;
107 
108 private:
109  Q_DECLARE_PRIVATE(qMRMLChartView);
110  Q_DISABLE_COPY(qMRMLChartView);
111 };
112 
113 #endif
MRML logic class for color manipulation.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
QWebEngineView Superclass
Superclass typedef.
MRML node to represent chart view parameters.
qMRMLChartView is the display canvas for a Chart.
QScopedPointer< qMRMLChartViewPrivate > d_ptr