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 <QPair>
37 #include <QSet>
38 
39 class pqAnimationCue;
40 class QSize;
41 class vtkObject;
42 
48 {
49  Q_OBJECT
50  typedef pqProxy Superclass;
51 
52 public:
53  pqAnimationScene(const QString& group, const QString& name, vtkSMProxy* proxy, pqServer* server,
54  QObject* parent = NULL);
55  ~pqAnimationScene() override;
56 
62  pqAnimationCue* getCue(vtkSMProxy* proxy, const char* propertyname, int index) const;
63 
70  pqAnimationCue* createCue(vtkSMProxy* proxy, const char* propertyname, int index);
71  pqAnimationCue* createCue(
72  vtkSMProxy* proxy, const char* propertyname, int index, const QString& cuetype);
73  pqAnimationCue* createCue(const QString& cuetype);
74 
78  void removeCues(vtkSMProxy* proxy);
79 
83  void removeCue(pqAnimationCue* cue);
84 
88  bool contains(pqAnimationCue*) const;
89 
93  QPair<double, double> getClockTimeRange() const;
94 
98  QSet<pqAnimationCue*> getCues() const;
99 
103  double getAnimationTime() const;
104 
108  QList<double> getTimeSteps() const;
109 
110 Q_SIGNALS:
114  void preAddedCue(pqAnimationCue*);
115 
119  void addedCue(pqAnimationCue*);
120 
124  void preRemovedCue(pqAnimationCue*);
125 
129  void removedCue(pqAnimationCue*);
130 
134  void cuesChanged();
135 
139  void playModeChanged();
140 
145  void loopChanged();
146 
150  void clockTimeRangesChanged();
151 
155  void beginPlay();
156 
160  void endPlay();
161 
166  void tick(int percentCompleted);
167 
172  void animationTime(double time);
173 
177  void frameCountChanged();
178 
182  void timeStepsChanged();
183 
187  void timeLabelChanged();
188 
189 public Q_SLOTS:
193  void play();
194 
198  void pause();
199 
203  void setAnimationTime(double time);
204 
205 private Q_SLOTS:
211  void onCuesChanged();
212 
216  void onTick(vtkObject* caller, unsigned long, void*, void* info);
217 
222  void onAnimationTimePropertyChanged();
223 
224 protected:
228  void initializeCue(vtkSMProxy* proxy, const char* propertyname, int index, pqAnimationCue* cue);
229 
230 private:
231  Q_DISABLE_COPY(pqAnimationScene)
232 
233  class pqInternals;
234  pqInternals* Internals;
235 
236  pqAnimationCue* createCueInternal(
237  const QString& cuetype, vtkSMProxy* proxy, const char* propertyname, int index);
238 };
239 
240 #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.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:64