pqAnimationManager.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqAnimationManager_h
5 #define pqAnimationManager_h
6 
7 #include <QObject>
8 
9 #include "pqComponentsModule.h" // for exports
10 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_11_0
11 
12 class QSize;
13 
14 class pqAnimationCue;
15 class pqAnimationScene;
16 class pqProxy;
17 class pqServer;
18 class pqView;
19 class vtkSMProxy;
20 class vtkObject;
21 
28 class PQCOMPONENTS_EXPORT pqAnimationManager : public QObject
29 {
30  Q_OBJECT
31 public:
32  pqAnimationManager(QObject* parent = nullptr);
33  ~pqAnimationManager() override;
34 
38  pqAnimationScene* getActiveScene() const;
39 
43  pqAnimationScene* getScene(pqServer* server) const;
44 
50  pqAnimationCue* getCue(
51  pqAnimationScene* scene, vtkSMProxy* proxy, const char* propertyname, int index) const;
52 
57  bool saveGeometry(const QString& filename, pqView* view);
58 
62  bool animationPlaying() const;
63 
64 Q_SIGNALS:
68  void activeSceneChanged(pqAnimationScene* scene);
69 
73  void activeServerChanged(pqServer* scene);
74 
78  void saveProgress(const QString&, int);
79 
84  void beginNonUndoableChanges();
85 
90  void endNonUndoableChanges();
91 
95  void writeAnimation(const QString& filename, int magnification, double frameRate);
96 
100  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
101  void beginPlay();
102 
106  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
107  void endPlay();
108 
112  void beginPlay(vtkObject* caller, unsigned long, void*, void* reversed);
113 
117  void endPlay(vtkObject* caller, unsigned long, void*, void* reversed);
118 
119 public Q_SLOTS:
120  // Called when the active server changes.
121  void onActiveServerChanged(pqServer*);
122 
123 protected Q_SLOTS:
124  void onProxyAdded(pqProxy*);
125  void onProxyRemoved(pqProxy*);
126 
130  void onTick(int);
131 
135  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
136  void onBeginPlay();
137 
141  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
142  void onEndPlay();
143 
147  void onBeginPlay(vtkObject* caller, unsigned long, void*, void* reversed);
148  void onEndPlay(vtkObject* caller, unsigned long, void*, void* reversed);
149 
150 private:
151  Q_DISABLE_COPY(pqAnimationManager)
152 
153  class pqInternals;
154  pqInternals* Internals;
155 };
156 
157 #endif
pqView
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
vtkObject
pqAnimationManager
pqAnimationManager manages the Animation sub-system.
Definition: pqAnimationManager.h:28
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
pqServer
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35
pqAnimationScene
pqAnimationScene is a representation for a vtkSMAnimationScene proxy.
Definition: pqAnimationScene.h:22
vtkParaViewDeprecation.h
PARAVIEW_DEPRECATED_IN_5_11_0
#define PARAVIEW_DEPRECATED_IN_5_11_0(reason)
Definition: vtkParaViewDeprecation.h:109
pqProxy
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:28
pqAnimationCue
pqAnimationCue is the pqProxy wrapping an animation proxy.
Definition: pqAnimationCue.h:35
index
index