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 "QVTKWin32Header.h"
41 #include "vtkQtView.h"
42 
43 class vtkStdString;
44 class QUrl;
45 
46 class VTKGUISUPPORTQTWEBKIT_EXPORT vtkQtRichTextView : public vtkQtView
47 {
48 Q_OBJECT
49 
50 public:
51  static vtkQtRichTextView *New();
52  vtkTypeMacro(vtkQtRichTextView, vtkQtView);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
58  virtual QWidget* GetWidget();
59 
60  enum
61  {
62  FIELD_DATA = 0,
63  POINT_DATA = 1,
64  CELL_DATA = 2,
65  VERTEX_DATA = 3,
66  EDGE_DATA = 4,
67  ROW_DATA = 5,
68  };
69 
71 
73  void SetFieldType(int);
74  int GetFieldType();
76 
78 
80  vtkSetStringMacro(ContentColumnName);
81  vtkGetStringMacro(ContentColumnName);
83 
85 
87  vtkSetStringMacro(PreviewColumnName);
88  vtkGetStringMacro(PreviewColumnName);
90 
92 
94  vtkSetStringMacro(TitleColumnName);
95  vtkGetStringMacro(TitleColumnName);
97 
99 
100  vtkSetStringMacro(ProxyURL);
101  vtkGetStringMacro(ProxyURL);
103 
105 
106  vtkSetMacro(ProxyPort, int);
107  vtkGetMacro(ProxyPort, int);
109 
111  virtual void Update();
112 
113 protected slots:
114  void onBack();
115  void onForward();
116  void onZoomIn();
117  void onZoomReset();
118  void onZoomOut();
119  void onLoadProgress(int progress);
120  void onLinkClicked(const QUrl &url);
121 
122 protected:
125 
126 private:
127  vtkQtRichTextView(const vtkQtRichTextView&); // Not implemented.
128  void operator=(const vtkQtRichTextView&); // Not implemented.
129 
130  char* ContentColumnName;
131  char* PreviewColumnName;
132  char* TitleColumnName;
133  char* ProxyURL;
134  int ProxyPort;
135 
136  class Implementation;
137  Implementation* Internal;
138 };
139 
140 #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:31