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 -------------------------------------------------------------------------*/
36 #ifndef vtkQtRichTextView_h
37 #define vtkQtRichTextView_h
38 
39 #include "vtkGUISupportQtWebkitModule.h" // For export macro
40 #include "vtkQtView.h"
41 
42 class vtkStdString;
43 class QUrl;
44 
45 class VTKGUISUPPORTQTWEBKIT_EXPORT vtkQtRichTextView : public vtkQtView
46 {
47 Q_OBJECT
48 
49 public:
50  static vtkQtRichTextView *New();
51  vtkTypeMacro(vtkQtRichTextView, vtkQtView);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
57  virtual QWidget* GetWidget();
58 
59  enum
60  {
61  FIELD_DATA = 0,
62  POINT_DATA = 1,
63  CELL_DATA = 2,
64  VERTEX_DATA = 3,
65  EDGE_DATA = 4,
66  ROW_DATA = 5,
67  };
68 
70 
72  void SetFieldType(int);
73  int GetFieldType();
75 
77 
79  vtkSetStringMacro(ContentColumnName);
80  vtkGetStringMacro(ContentColumnName);
82 
84 
86  vtkSetStringMacro(PreviewColumnName);
87  vtkGetStringMacro(PreviewColumnName);
89 
91 
93  vtkSetStringMacro(TitleColumnName);
94  vtkGetStringMacro(TitleColumnName);
96 
98 
99  vtkSetStringMacro(ProxyURL);
100  vtkGetStringMacro(ProxyURL);
102 
104 
105  vtkSetMacro(ProxyPort, int);
106  vtkGetMacro(ProxyPort, int);
108 
110  virtual void Update();
111 
112 protected slots:
113  void onBack();
114  void onForward();
115  void onZoomIn();
116  void onZoomReset();
117  void onZoomOut();
118  void onLoadProgress(int progress);
119  void onLinkClicked(const QUrl &url);
120 
121 protected:
124 
125 private:
126  vtkQtRichTextView(const vtkQtRichTextView&); // Not implemented.
127  void operator=(const vtkQtRichTextView&); // Not implemented.
128 
129  char* ContentColumnName;
130  char* PreviewColumnName;
131  char* TitleColumnName;
132  char* ProxyURL;
133  int ProxyPort;
134 
135  class Implementation;
136  Implementation* Internal;
137 };
138 
139 #endif
Superclass for QAbstractItemView-based views.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
static vtkView * New()
virtual void Update()
virtual QWidget * GetWidget()=0
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for Qt widget-based views.
Definition: vtkQtView.h:30