Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLExpandingWebView.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 __qMRMLExpandingWebView_h
19 #define __qMRMLExpandingWebView_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 qMRMLExpandingWebViewPrivate;
33 
34 // MRML includes
35 class vtkMRMLScene;
36 
40 class QMRML_WIDGETS_EXPORT qMRMLExpandingWebView :
41 #ifdef MRML_WIDGETS_HAVE_WEBKIT_SUPPORT
42  public QWebView
43 #else
44  public QWebEngineView
45 #endif
46 {
47  Q_OBJECT
48 public:
50 #ifdef MRML_WIDGETS_HAVE_WEBKIT_SUPPORT
51  typedef QWebView Superclass;
52 #else
53  typedef QWebEngineView Superclass;
54 #endif
55 
57  explicit qMRMLExpandingWebView(QWidget* parent = 0);
58  virtual ~qMRMLExpandingWebView();
59 
61  vtkMRMLScene* mrmlScene() const;
62 
63  // Redefine the sizeHint so layouts work properly.
64  virtual QSize sizeHint() const;
65 
66 public slots:
67 
69  void setMRMLScene(vtkMRMLScene* newScene);
70 
72  virtual void updateWidgetFromMRML();
73 
74 signals:
75 
79  void mrmlSceneChanged(vtkMRMLScene*);
80 
81 protected:
82  QScopedPointer<qMRMLExpandingWebViewPrivate> d_ptr;
83 
84 private:
85  Q_DECLARE_PRIVATE(qMRMLExpandingWebView);
86  Q_DISABLE_COPY(qMRMLExpandingWebView);
87 };
88 
89 #endif
QWebEngineView Superclass
Superclass typedef.
QScopedPointer< qMRMLExpandingWebViewPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
qMRMLExpandingWebView is the display canvas for some or all of a MRML scene.