pqPythonView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef pqPythonView_h
4 #define pqPythonView_h
5 
6 #include "pqSMProxy.h"
7 #include "pqView.h"
8 
9 #include <cassert>
10 
12 
14 {
15  Q_OBJECT
16  typedef pqView Superclass;
17 
18 public:
19  static QString pythonViewType() { return "PythonView"; }
20 
21  // Constructor:
22  // \c type :- view type.
23  // \c group :- SManager registration group name.
24  // \c name :- SManager registration name.
25  // \c view :- RenderView proxy.
26  // \c server:- server on which the proxy is created.
27  // \c parent:- QObject parent.
28  pqPythonView(const QString& type, const QString& group, const QString& name,
29  vtkSMViewProxy* renModule, pqServer* server, QObject* parent = nullptr);
30 
31  // Destructor.
32  ~pqPythonView() override;
33 
37  void setPythonScript(QString& script);
38  QString getPythonScript();
39 
43  vtkSMPythonViewProxy* getPythonViewProxy();
44 
45 protected:
50  bool eventFilter(QObject* caller, QEvent* e) override;
51 
56  QWidget* createWidget() override;
57 
58 private:
59  Q_DISABLE_COPY(pqPythonView)
60 
61  class pqInternal;
62  pqInternal* Internal;
63 };
64 
65 #endif
type
Superclass for all view proxies.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
name
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
Superclass for all view proxies.
static QString pythonViewType()
Definition: pqPythonView.h:19
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:35