VTK
vtkQtRichTextView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtRichTextView.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
38 #ifndef vtkQtRichTextView_h
39 #define vtkQtRichTextView_h
40 
41 #include "vtkGUISupportQtWebkitModule.h" // For export macro
42 #include "vtkQtView.h"
43 
44 class vtkStdString;
45 class QUrl;
46 
47 class VTKGUISUPPORTQTWEBKIT_EXPORT vtkQtRichTextView : public vtkQtView
48 {
49 Q_OBJECT
50 
51 public:
52  static vtkQtRichTextView *New();
53  vtkTypeMacro(vtkQtRichTextView, vtkQtView);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
62  virtual QWidget* GetWidget();
63 
64  enum
65  {
66  FIELD_DATA = 0,
67  POINT_DATA = 1,
68  CELL_DATA = 2,
69  VERTEX_DATA = 3,
70  EDGE_DATA = 4,
71  ROW_DATA = 5,
72  };
73 
75 
79  void SetFieldType(int);
80  int GetFieldType();
82 
84 
88  vtkSetStringMacro(ContentColumnName);
89  vtkGetStringMacro(ContentColumnName);
91 
93 
97  vtkSetStringMacro(PreviewColumnName);
98  vtkGetStringMacro(PreviewColumnName);
100 
102 
106  vtkSetStringMacro(TitleColumnName);
107  vtkGetStringMacro(TitleColumnName);
109 
111 
114  vtkSetStringMacro(ProxyURL);
115  vtkGetStringMacro(ProxyURL);
117 
119 
122  vtkSetMacro(ProxyPort, int);
123  vtkGetMacro(ProxyPort, int);
125 
129  virtual void Update();
130 
131 protected slots:
132  void onBack();
133  void onForward();
134  void onZoomIn();
135  void onZoomReset();
136  void onZoomOut();
137  void onLoadProgress(int progress);
138  void onLinkClicked(const QUrl &url);
139 
140 protected:
143 
144 private:
145  vtkQtRichTextView(const vtkQtRichTextView&) = delete;
146  void operator=(const vtkQtRichTextView&) = delete;
147 
148  char* ContentColumnName;
149  char* PreviewColumnName;
150  char* TitleColumnName;
151  char* ProxyURL;
152  int ProxyPort;
153 
154  class Implementation;
155  Implementation* Internal;
156 };
157 
158 #endif
Superclass for QAbstractItemView-based views.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:40
static vtkView * New()
virtual void Update()
Update the view.
virtual QWidget * GetWidget()=0
Get the main container of this view (a QWidget).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass for Qt widget-based views.
Definition: vtkQtView.h:31