ParaView
pqPythonView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqPythonView.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 #ifndef pqPythonView_h
16 #define pqPythonView_h
17 
18 #include "pqSMProxy.h"
19 #include "pqView.h"
20 
21 class vtkSMPythonViewProxy;
22 
23 class PQCORE_EXPORT pqPythonView : public pqView
24 {
25  Q_OBJECT
26  typedef pqView Superclass;
27 
28 public:
29  static QString pythonViewType() { return "PythonView"; }
30 
31  // Constructor:
32  // \c type :- view type.
33  // \c group :- SManager registration group name.
34  // \c name :- SManager registration name.
35  // \c view :- RenderView proxy.
36  // \c server:- server on which the proxy is created.
37  // \c parent:- QObject parent.
38  pqPythonView(const QString& type,
39  const QString& group,
40  const QString& name,
41  vtkSMViewProxy* renModule,
42  pqServer* server,
43  QObject* parent=NULL);
44 
45  // Destructor.
46  virtual ~pqPythonView();
47 
49  void setPythonScript(QString & script);
50  QString getPythonScript();
51 
53  vtkSMPythonViewProxy* getPythonViewProxy();
54 
55 protected slots:
56  virtual void initializeAfterObjectsCreated();
57 
62  virtual void initializeWidgets();
63 
64 protected:
67  virtual bool eventFilter(QObject* caller, QEvent* e);
68 
71  virtual QWidget* createWidget();
72 
76  virtual void initialize();
77 
79  // updates.
81 
82 private:
83  Q_DISABLE_COPY(pqPythonView)
84 
85  class pqInternal;
86  pqInternal* Internal;
87 };
88 
89 #endif
This is a PQ abstraction of a generic view module.
Definition: pqView.h:55
bool AllowCaching
On Mac, we usually try to cache the front buffer to avoid unecessary.
Definition: pqPythonView.h:80
virtual void initialize()
Use this method to initialize the pqObject state using the underlying vtkSMProxy. ...
static QString pythonViewType()
Definition: pqPythonView.h:29
virtual QWidget * createWidget()=0
Subclasses must override this method to create a widget for the view.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:62