Loading...
Searching...
No Matches
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
38namespace 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 Animation.
55
56 \Brief This class is responsible for making the animation of a trajectory or temporal image.
57 It has controls like loop, forward, backward and pause.
58 */
59 class TEQTWIDGETSEXPORT Animation : public QPropertyAnimation
60 {
61 public:
62 /*!
63 \brief Constructor
64 It constructs a Animation.
65 \param target The target QObject for this animation.
66 \param propertyName The target property name for this animation.
67 \param parent Parent of this object.
68 */
69 Animation(QObject* target, const QByteArray& propertyName, QObject* parent=0);
70
71 /*!
72 \brief Destructor
73 It destructs a Animation.
74 */
75 virtual ~Animation();
76
77 /*!
78 \brief
79 It adjust animation data for a given period;
80 /param period The temporal period.
81 */
83
84 /*!
85 \brief
86 It It sets the data key values.
87 */
89
90 /*!
91 \brief
92 It It gets the closest animation data index.
93 \param trel Normalized time (between 0 and 1).
94
95 \return The animation data index.
96 */
97 int getClosestAnimationDataIndex(const double& trel);
98
99 /*!
100 \brief
101 It It gets the next animation data index. it is the end point, between two points of the trajectory.
102 \param trel Normalized time (between 0 and 1).
103
104 \return The animation data index.
105 */
106 int getNextAnimationDataIndex(const double& trel);
107
108 public:
109 te::gm::Envelope m_spatialExtent; //!< Spatial extent.
110 te::dt::TimePeriod m_temporalExtent; //!< Total temporal extent.
111 te::dt::TimePeriod m_temporalAnimationExtent; //!< Temporal animation extent. It can be a portion of the total or greater than the total.
112 };
113 } // end namespace widgets
114 } // end namespace qt
115} // end namespace te
116
117#endif // __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_H
118
A class to represent time period.
Definition TimePeriod.h:55
An Envelope defines a 2D rectangular region.
Definition Envelope.h:52
void setDataKeyValues()
It It sets the data key values.
int getClosestAnimationDataIndex(const double &trel)
It It gets the closest animation data index.
int getNextAnimationDataIndex(const double &trel)
It It gets the next animation data index. it is the end point, between two points of the trajectory.
te::dt::TimePeriod m_temporalAnimationExtent
Temporal animation extent. It can be a portion of the total or greater than the total.
Definition Animation.h:111
Animation(QObject *target, const QByteArray &propertyName, QObject *parent=0)
Constructor It constructs a Animation.
void adjustDataToAnimationTemporalExtent(const te::dt::TimePeriod &period)
It adjust animation data for a given period; /param period The temporal period.
virtual ~Animation()
Destructor It destructs a Animation.
te::gm::Envelope m_spatialExtent
Spatial extent.
Definition Animation.h:109
te::dt::TimePeriod m_temporalExtent
Total temporal extent.
Definition Animation.h:110
This file contains include headers for the Data Type module of TerraLib.
This file contains include headers for the Vector Geometry model of TerraLib.
Namespace for the Data Type module of TerraLib.
Definition Transactor.h:42
Namespace for the Vector Geometry module of TerraLib.
Definition DataSource.h:46
Namespace for the Qt Widgets module of TerraLib.
Definition Renderer.h:58
Namespace for the Qt module of TerraLib.
Definition Renderer.h:56
TerraLib.
Configuration flags for the TerraLib Qt Widgets.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition Config.h:63