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 
51 class PQCOMPONENTS_EXPORT pqAnimationManager : public QObject
52 {
53  Q_OBJECT
54 public:
55  pqAnimationManager(QObject* parent=0);
56  virtual ~pqAnimationManager();
57 
59  pqAnimationScene* getActiveScene() const;
60 
62  pqAnimationScene* getScene(pqServer* server) const;
63 
67  pqAnimationCue* getCue(pqAnimationScene* scene,
68  vtkSMProxy* proxy, const char* propertyname, int index) const;
69 
73  bool saveAnimation();
74 
77  bool saveGeometry(const QString& filename, pqView* view);
78 
80  void saveSettings();
81 
83  void restoreSettings();
84 
86  bool animationPlaying() const;
87 
88 signals:
90  void activeSceneChanged(pqAnimationScene* scene);
91 
93  void activeServerChanged(pqServer* scene);
94 
96  void saveProgress(const QString&, int);
97 
100  void beginNonUndoableChanges();
101 
104  void endNonUndoableChanges();
105 
109  void disconnectServer();
110 
112  void writeAnimation(const QString& filename, int magnification, double frameRate);
113 
115  void beginPlay();
116 
118  void endPlay();
119 
120 public slots:
121  // Called when the active server changes.
122  void onActiveServerChanged(pqServer*);
123 
124 protected slots:
125  void onProxyAdded(pqProxy*);
126  void onProxyRemoved(pqProxy*);
127 
128  void updateGUI();
129 
131  void updateViewModules();
132 
134  void onTick(int);
135 
137  void onBeginPlay();
138  void onEndPlay();
139 
141  void onWidthEdited();
142  void onHeightEdited();
143  void onLockAspectRatio(bool lock);
144 private:
145  Q_DISABLE_COPY(pqAnimationManager)
146 
147  class pqInternals;
148  pqInternals* Internals;
149 
150  // the most recently used file extension
151  QString AnimationExtension;
152 };
153 
154 
155 #endif
This is a PQ abstraction of a generic view module.
Definition: pqView.h:55
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