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 
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, const QString& group, const QString& name,
39  vtkSMViewProxy* renModule, pqServer* server, QObject* parent = NULL);
40 
41  // Destructor.
42  virtual ~pqPythonView();
43 
47  void setPythonScript(QString& script);
48  QString getPythonScript();
49 
53  vtkSMPythonViewProxy* getPythonViewProxy();
54 
55 protected slots:
56  virtual void initializeAfterObjectsCreated();
57 
64  virtual void initializeWidgets();
65 
66 protected:
71  virtual bool eventFilter(QObject* caller, QEvent* e);
72 
77  virtual QWidget* createWidget();
78 
84  virtual void initialize();
85 
89  // updates.
91 
92 private:
93  Q_DISABLE_COPY(pqPythonView)
94 
95  class pqInternal;
96  pqInternal* Internal;
97 };
98 
99 #endif
Superclass for all view proxies.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:56
bool AllowCaching
On Mac, we usually try to cache the front buffer to avoid unecessary.
Definition: pqPythonView.h:90
virtual void initialize()
Use this method to initialize the pqObject state using the underlying vtkSMProxy. ...
Superclass for all view proxies.
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:64