ParaView
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 
45 class PQCORE_EXPORT pqAnimationScene : public pqProxy
46 {
47  Q_OBJECT
48  typedef pqProxy Superclass;
49 public:
50  pqAnimationScene(const QString& group, const QString& name,
51  vtkSMProxy* proxy, pqServer* server, QObject* parent=NULL);
52  virtual ~pqAnimationScene();
53 
57  pqAnimationCue* getCue(vtkSMProxy* proxy, const char* propertyname,
58  int index) const;
59 
64  pqAnimationCue* createCue(vtkSMProxy* proxy, const char* propertyname,
65  int index);
66  pqAnimationCue* createCue(vtkSMProxy* proxy, const char* propertyname,
67  int index, const QString& cuetype);
68  pqAnimationCue* createCue(const QString& cuetype);
69 
71  void removeCues(vtkSMProxy* proxy);
72 
74  void removeCue(pqAnimationCue* cue);
75 
77  bool contains(pqAnimationCue*) const;
78 
80  QPair<double, double> getClockTimeRange() const;
81 
83  QSet<pqAnimationCue*> getCues() const;
84 
86  double getAnimationTime() const;
87 
89  QList<double> getTimeSteps() const;
90 
91 signals:
93  void preAddedCue(pqAnimationCue*);
94 
96  void addedCue(pqAnimationCue*);
97 
99  void preRemovedCue(pqAnimationCue*);
100 
102  void removedCue(pqAnimationCue*);
103 
105  void cuesChanged();
106 
108  void playModeChanged();
109 
112  void loopChanged();
113 
115  void clockTimeRangesChanged();
116 
118  void beginPlay();
119 
121  void endPlay();
122 
125  void tick(int percentCompleted);
126 
129  void animationTime(double time);
130 
132  void frameCountChanged();
133 
135  void timeStepsChanged();
136 
138  void timeLabelChanged();
139 
140 public slots:
142  void play();
143 
145  void pause();
146 
148  void setAnimationTime(double time);
149 
150 private slots:
154  void onCuesChanged();
155 
157  void onTick(vtkObject* caller, unsigned long, void*, void* info);
158 
161  void onAnimationTimePropertyChanged();
162 
163 protected:
165  void initializeCue(
166  vtkSMProxy* proxy, const char* propertyname, int index,
167  pqAnimationCue* cue);
168 private:
169  Q_DISABLE_COPY(pqAnimationScene)
170 
171  class pqInternals;
172  pqInternals* Internals;
173 
174  pqAnimationCue* createCueInternal(const QString& cuetype,
175  vtkSMProxy* proxy, const char* propertyname, int index);
176 };
177 
178 #endif
179 
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:52
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:62