ParaView
pqAnimationManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqAnimationManager.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 pqAnimationManager_h
33 #define pqAnimationManager_h
34 
35 #include "pqComponentsModule.h"
36 #include <QObject>
37 
38 class QSize;
39 
40 class pqAnimationCue;
41 class pqAnimationScene;
42 class pqProxy;
43 class pqServer;
44 class pqView;
45 class vtkSMProxy;
46 
53 class PQCOMPONENTS_EXPORT pqAnimationManager : public QObject
54 {
55  Q_OBJECT
56 public:
57  pqAnimationManager(QObject* parent = 0);
58  virtual ~pqAnimationManager();
59 
63  pqAnimationScene* getActiveScene() const;
64 
68  pqAnimationScene* getScene(pqServer* server) const;
69 
75  pqAnimationCue* getCue(
76  pqAnimationScene* scene, vtkSMProxy* proxy, const char* propertyname, int index) const;
77 
83  bool saveAnimation();
84 
89  bool saveGeometry(const QString& filename, pqView* view);
90 
94  void saveSettings();
95 
99  void restoreSettings();
100 
104  bool animationPlaying() const;
105 
106 signals:
110  void activeSceneChanged(pqAnimationScene* scene);
111 
115  void activeServerChanged(pqServer* scene);
116 
120  void saveProgress(const QString&, int);
121 
126  void beginNonUndoableChanges();
127 
132  void endNonUndoableChanges();
133 
139  void disconnectServer();
140 
144  void writeAnimation(const QString& filename, int magnification, double frameRate);
145 
149  void beginPlay();
150 
154  void endPlay();
155 
156 public slots:
157  // Called when the active server changes.
158  void onActiveServerChanged(pqServer*);
159 
160 protected slots:
161  void onProxyAdded(pqProxy*);
162  void onProxyRemoved(pqProxy*);
163 
164  void updateGUI();
165 
169  void updateViewModules();
170 
174  void onTick(int);
175 
179  void onBeginPlay();
180  void onEndPlay();
181 
185  void onWidthEdited();
186  void onHeightEdited();
187  void onLockAspectRatio(bool lock);
188 
189 private:
190  Q_DISABLE_COPY(pqAnimationManager)
191 
192  class pqInternals;
193  pqInternals* Internals;
194 
195  // the most recently used file extension
196  QString AnimationExtension;
197 };
198 
199 #endif
This is a PQ abstraction of a generic view module.
Definition: pqView.h:56
pqAnimationManager manages the Animation sub-system.
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
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