All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Animation.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/qt/widgets/st/Animation.h
22 
23  \brief This file defines a class for a Trajectory Animation.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_H
27 #define __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_H
28 
29 // TerraLib
30 #include "../Config.h"
31 #include "../../../geometry.h"
32 #include "../../../datatype.h"
33 
34 // Qt
35 #include <QtCore/QPropertyAnimation>
36 
37 
38 namespace te
39 {
40  namespace gm
41  {
42  class Envelope;
43  }
44  namespace dt
45  {
46  class TimePeriod;
47  }
48 
49  namespace qt
50  {
51  namespace widgets
52  {
53  /*!
54  \class AnimationScene
55 
56  \brief This class is a dialog for the Animation.
57  */
58  class TEQTWIDGETSEXPORT Animation : public QPropertyAnimation
59  {
60  public:
61  /*!
62  \brief Constructor
63  It constructs a Animation.
64  \param target The target QObject for this animation.
65  \param propertyName The target property name for this animation.
66  \param parent Parent of this object.
67  */
68  Animation(QObject* target, const QByteArray& propertyName, QObject* parent=0);
69 
70  /*!
71  \brief Destructor
72  It destructs a Animation.
73  */
74  virtual ~Animation();
75 
76  /*!
77  \brief
78  It creates animation data for a given period;
79  /param period The temporal period.
80  */
81  void createAnimationDataInDisplayProjection(const te::dt::TimePeriod& period);
82 
83  /*!
84  \brief
85  It It sets the data key values.
86  */
87  void setDataKeyValues();
88 
89  /*!
90  \brief
91  It It gets the animation data index. It is relative to temporal animation extent.
92  \param trel Normalized time (between 0 and 1).
93 
94  \return The animation data index.
95  */
96  int getAnimationDataIndex(const double& trel);
97 
98  public:
99  te::gm::Envelope m_spatialExtent; //!< Spatial extent.
100  te::dt::TimePeriod m_temporalExtent; //!< Total temporal extent.
101  te::dt::TimePeriod m_temporalAnimationExtent; //!< Temporal animation extent. It can be a portion of the total or greater than the total.
102  };
103  } // end namespace widgets
104  } // end namespace qt
105 } // end namespace te
106 
107 #endif // __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_H
108 
te::gm::Envelope m_spatialExtent
Spatial extent.
Definition: Animation.h:99
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
A class to represent time period.
Definition: TimePeriod.h:54
te::dt::TimePeriod m_temporalExtent
Total temporal extent.
Definition: Animation.h:100
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
te::dt::TimePeriod m_temporalAnimationExtent
Temporal animation extent. It can be a portion of the total or greater than the total.
Definition: Animation.h:101