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 #include <cassert>
22 
24 
26 {
27  Q_OBJECT
28  typedef pqView Superclass;
29 
30 public:
31  static QString pythonViewType() { return "PythonView"; }
32 
33  // Constructor:
34  // \c type :- view type.
35  // \c group :- SManager registration group name.
36  // \c name :- SManager registration name.
37  // \c view :- RenderView proxy.
38  // \c server:- server on which the proxy is created.
39  // \c parent:- QObject parent.
40  pqPythonView(const QString& type, const QString& group, const QString& name,
41  vtkSMViewProxy* renModule, pqServer* server, QObject* parent = NULL);
42 
43  // Destructor.
44  ~pqPythonView() override;
45 
49  void setPythonScript(QString& script);
50  QString getPythonScript();
51 
55  vtkSMPythonViewProxy* getPythonViewProxy();
56 
57 protected:
62  bool eventFilter(QObject* caller, QEvent* e) override;
63 
68  QWidget* createWidget() override;
69 
70 private:
71  Q_DISABLE_COPY(pqPythonView)
72 
73  class pqInternal;
74  pqInternal* Internal;
75 };
76 
77 #endif
type
Superclass for all view proxies.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:54
name
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
Superclass for all view proxies.
static QString pythonViewType()
Definition: pqPythonView.h:31
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