Loading...
Searching...
No Matches
AnimationScene.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/AnimationScene.h
22
23 \brief This file defines a class for a Animation Scene.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_SCENE_H
27#define __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_SCENE_H
28
29// TerraLib
30#include "../Config.h"
31
32// Qt
33#include <QGraphicsScene>
34#include <QtCore/QMutex>
35
36namespace te
37{
38 namespace qt
39 {
40 namespace widgets
41 {
42 class MapDisplay;
43 class AnimationItem;
44
45 /*!
46 \class AnimationScene
47
48 \brief This class allows to add multiple trajectories and temporal image.
49 */
50 class TEQTWIDGETSEXPORT AnimationScene : public QGraphicsScene
51 {
52 public:
53
54 /*!
55 \brief Constructor
56 It constructs a animation Scene
57 */
58 AnimationScene(te::qt::widgets::MapDisplay* display, QObject* parent=0);
59
60 /*!
61 \brief Destructor
62 It destructs a animation Scene
63 */
64 virtual ~AnimationScene();
65
66 /*!
67 \brief Create a new clear pixmap.
68 */
70
71 /*!
72 \brief Add item.
73 \param item The graphics item. It can be trajectory item or pixmap item.
74 */
76
77 /*!
78 \brief Remove item.
79 \param item The graphics item.
80 */
82
83 /*!
84 \brief Clear scene. Remove all items.
85 */
86 void clear();
87
88 /*!
89 \brief It sets the trajectory duration.
90 \param duration The animation duration in miliseconds
91 */
92 void setDuration(const int& duration);
93
94 /*!
95 \brief It draws the animation item.
96 \param curtime The normalized current time (between 0 and 1).
97 */
98 void draw(const int& curTime);
99
100 ///*!
101 // \brief It configures automatic pan over a trajectory.
102 // \param title The trajectory title.
103 //*/
104 //void setAutomaticPan(const QString& title);
105
106 public:
107 te::qt::widgets::MapDisplay* m_display; //!< Indicates where the scene is displayed.
108 QPixmap* m_trajectoryPixmap; //!< QPixmap where all the trajectory item are drawn.
109 QMutex m_mutex; //!< To not use m_trajectoryPixmap simultaneously
110 int m_numberOfTrajectories; //!< Number of trajectory items.
111 int m_numberOfCoverages; //!< Number of coverage items.
112 };
113 } // end namespace widgets
114 } // end namespace qt
115} // end namespace te
116
117#endif // __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_SCENE_H
An abstract class for Animation Item.
Definition: AnimationItem.h:65
This class allows to add multiple trajectories and temporal image.
virtual ~AnimationScene()
Destructor It destructs a animation Scene.
void removeItem(AnimationItem *item)
Remove item.
void setDuration(const int &duration)
It sets the trajectory duration.
void createNewPixmap()
Create a new clear pixmap.
void clear()
Clear scene. Remove all items.
void draw(const int &curTime)
It draws the animation item.
void addItem(AnimationItem *item)
Add item.
AnimationScene(te::qt::widgets::MapDisplay *display, QObject *parent=0)
Constructor It constructs a animation Scene.
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
TerraLib.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63