VTK
dox/GUISupport/QtWebkit/vtkQtRichTextView.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtRichTextView.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00036 #ifndef __vtkQtRichTextView_h
00037 #define __vtkQtRichTextView_h
00038 
00039 #include "vtkGUISupportQtWebkitModule.h" // For export macro
00040 #include "QVTKWin32Header.h"
00041 #include "vtkQtView.h"
00042 
00043 class vtkStdString;
00044 class QUrl;
00045 
00046 class VTKGUISUPPORTQTWEBKIT_EXPORT vtkQtRichTextView : public vtkQtView
00047 {
00048 Q_OBJECT
00049 
00050 public:
00051   static vtkQtRichTextView *New();
00052   vtkTypeMacro(vtkQtRichTextView, vtkQtView);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00058   virtual QWidget* GetWidget();
00059 
00060   enum
00061     {
00062     FIELD_DATA = 0,
00063     POINT_DATA = 1,
00064     CELL_DATA = 2,
00065     VERTEX_DATA = 3,
00066     EDGE_DATA = 4,
00067     ROW_DATA = 5,
00068     };
00069 
00071 
00073   void SetFieldType(int);
00074   int GetFieldType();
00076 
00078 
00080   vtkSetStringMacro(ContentColumnName);
00081   vtkGetStringMacro(ContentColumnName);
00083 
00085 
00087   vtkSetStringMacro(PreviewColumnName);
00088   vtkGetStringMacro(PreviewColumnName);
00090 
00092 
00094   vtkSetStringMacro(TitleColumnName);
00095   vtkGetStringMacro(TitleColumnName);
00097 
00099 
00100   vtkSetStringMacro(ProxyURL);
00101   vtkGetStringMacro(ProxyURL);
00103 
00105 
00106   vtkSetMacro(ProxyPort, int);
00107   vtkGetMacro(ProxyPort, int);
00109 
00111   virtual void Update();
00112 
00113 protected slots:
00114   void onBack();
00115   void onForward();
00116   void onZoomIn();
00117   void onZoomReset();
00118   void onZoomOut();
00119   void onLoadProgress(int progress);
00120   void onLinkClicked(const QUrl &url);
00121 
00122 protected:
00123   vtkQtRichTextView();
00124   ~vtkQtRichTextView();
00125 
00126 private:
00127   vtkQtRichTextView(const vtkQtRichTextView&);  // Not implemented.
00128   void operator=(const vtkQtRichTextView&);  // Not implemented.
00129 
00130   char* ContentColumnName;
00131   char* PreviewColumnName;
00132   char* TitleColumnName;
00133   char* ProxyURL;
00134   int   ProxyPort;
00135 
00136   class Implementation;
00137   Implementation* Internal;
00138 };
00139 
00140 #endif