pqAnimationScene.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 pqAnimationScene_h
5 #define pqAnimationScene_h
6 
7 #include "pqProxy.h"
8 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_11_0
9 #include <QPair>
10 #include <QSet>
11 
13 class pqAnimationCue;
14 class QSize;
15 class vtkObject;
16 
22 class PQCORE_EXPORT pqAnimationScene : public pqProxy
23 {
24  Q_OBJECT
25  typedef pqProxy Superclass;
26 
27 public:
28  pqAnimationScene(const QString& group, const QString& name, vtkSMProxy* proxy, pqServer* server,
29  QObject* parent = nullptr);
30  ~pqAnimationScene() override;
31 
37  pqAnimationCue* getCue(vtkSMProxy* proxy, const char* propertyname, int index) const;
38 
40 
46  pqAnimationCue* createCue(vtkSMProxy* proxy, const char* propertyname, int index);
47  pqAnimationCue* createCue(
48  vtkSMProxy* proxy, const char* propertyname, int index, const QString& cuetype);
49  pqAnimationCue* createCue(const QString& cuetype);
50  pqAnimationCue* createCue(const pqAnimatedPropertyInfo& propInfo);
52 
56  void removeCues(vtkSMProxy* proxy);
57 
61  void removeCue(pqAnimationCue* cue);
62 
66  bool contains(pqAnimationCue*) const;
67 
71  QPair<double, double> getClockTimeRange() const;
72 
76  QSet<pqAnimationCue*> getCues() const;
77 
81  double getAnimationTime() const;
82 
86  QList<double> getTimeSteps() const;
87 
88 Q_SIGNALS:
92  void preAddedCue(pqAnimationCue*);
93 
97  void addedCue(pqAnimationCue*);
98 
102  void preRemovedCue(pqAnimationCue*);
103 
107  void removedCue(pqAnimationCue*);
108 
112  void cuesChanged();
113 
117  void playModeChanged();
118 
123  void loopChanged();
124 
128  void clockTimeRangesChanged();
129 
133  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
134  void beginPlay();
135 
139  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
140  void endPlay();
141 
147  void beginPlay(vtkObject* caller, unsigned long, void*, void* reversed);
148 
154  void endPlay(vtkObject* caller, unsigned long, void*, void* reversed);
155 
160  void tick(int percentCompleted);
161 
166  void animationTime(double time);
167 
171  void frameCountChanged();
172 
176  void timeStepsChanged();
177 
181  void timeLabelChanged();
182 
183 public Q_SLOTS:
187  void play();
188 
192  void pause();
193 
197  void setAnimationTime(double time);
198 
199 private Q_SLOTS:
205  void onCuesChanged();
206 
210  void onTick(vtkObject* caller, unsigned long, void*, void* info);
211 
216  void onAnimationTimePropertyChanged();
217 
218 protected:
222  void initializeCue(vtkSMProxy* proxy, const char* propertyname, int index, pqAnimationCue* cue);
223 
224 private:
225  Q_DISABLE_COPY(pqAnimationScene)
226 
227  class pqInternals;
228  pqInternals* Internals;
229 
230  pqAnimationCue* createCueInternal(
231  const QString& cuetype, vtkSMProxy* proxy, const char* propertyname, int index);
232 };
233 
234 #endif
pqAnimatedPropertyInfo
pqAnimatedPropertyInfo stores information about an animated property.
Definition: pqAnimationCue.h:17
vtkObject
time
time
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
name
name
info
info
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
pqProxy.h
index
index