pqAnimationScene.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqAnimationScene.h
5 
6  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 ========================================================================*/
32 #ifndef pqAnimationScene_h
33 #define pqAnimationScene_h
34 
35 #include "pqProxy.h"
36 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_11_0
37 #include <QPair>
38 #include <QSet>
39 
40 class pqAnimationCue;
41 class QSize;
42 class vtkObject;
43 
49 {
50  Q_OBJECT
51  typedef pqProxy Superclass;
52 
53 public:
54  pqAnimationScene(const QString& group, const QString& name, vtkSMProxy* proxy, pqServer* server,
55  QObject* parent = nullptr);
56  ~pqAnimationScene() override;
57 
63  pqAnimationCue* getCue(vtkSMProxy* proxy, const char* propertyname, int index) const;
64 
71  pqAnimationCue* createCue(vtkSMProxy* proxy, const char* propertyname, int index);
72  pqAnimationCue* createCue(
73  vtkSMProxy* proxy, const char* propertyname, int index, const QString& cuetype);
74  pqAnimationCue* createCue(const QString& cuetype);
75 
79  void removeCues(vtkSMProxy* proxy);
80 
84  void removeCue(pqAnimationCue* cue);
85 
89  bool contains(pqAnimationCue*) const;
90 
94  QPair<double, double> getClockTimeRange() const;
95 
99  QSet<pqAnimationCue*> getCues() const;
100 
104  double getAnimationTime() const;
105 
109  QList<double> getTimeSteps() const;
110 
111 Q_SIGNALS:
115  void preAddedCue(pqAnimationCue*);
116 
120  void addedCue(pqAnimationCue*);
121 
125  void preRemovedCue(pqAnimationCue*);
126 
130  void removedCue(pqAnimationCue*);
131 
135  void cuesChanged();
136 
140  void playModeChanged();
141 
146  void loopChanged();
147 
151  void clockTimeRangesChanged();
152 
156  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
157  void beginPlay();
158 
162  PARAVIEW_DEPRECATED_IN_5_11_0("Use the overload with VTK callback signature.")
163  void endPlay();
164 
170  void beginPlay(vtkObject* caller, unsigned long, void*, void* reversed);
171 
177  void endPlay(vtkObject* caller, unsigned long, void*, void* reversed);
178 
183  void tick(int percentCompleted);
184 
189  void animationTime(double time);
190 
194  void frameCountChanged();
195 
199  void timeStepsChanged();
200 
204  void timeLabelChanged();
205 
206 public Q_SLOTS:
210  void play();
211 
215  void pause();
216 
220  void setAnimationTime(double time);
221 
222 private Q_SLOTS:
228  void onCuesChanged();
229 
233  void onTick(vtkObject* caller, unsigned long, void*, void* info);
234 
239  void onAnimationTimePropertyChanged();
240 
241 protected:
245  void initializeCue(vtkSMProxy* proxy, const char* propertyname, int index, pqAnimationCue* cue);
246 
247 private:
248  Q_DISABLE_COPY(pqAnimationScene)
249 
250  class pqInternals;
251  pqInternals* Internals;
252 
253  pqAnimationCue* createCueInternal(
254  const QString& cuetype, vtkSMProxy* proxy, const char* propertyname, int index);
255 };
256 
257 #endif
info
name
time
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:56
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
index
pqAnimationScene is a representation for a vtkSMAnimationScene proxy.
#define PARAVIEW_DEPRECATED_IN_5_11_0(reason)
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:63