All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AnimationScene.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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/canvas/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 
35 namespace te
36 {
37  namespace qt
38  {
39  namespace widgets
40  {
41  class MapDisplay;
42  class AnimationItem;
43 
44  /*!
45  \class AnimationScene
46 
47  \brief This class is a dialog for the Trajectory Scene.
48  */
49  class TEQTWIDGETSEXPORT AnimationScene : public QGraphicsScene
50  {
51  public:
52 
53  /*!
54  \brief Constructor
55  It constructs a Trajectory Scene
56  */
57  AnimationScene(te::qt::widgets::MapDisplay* display, QObject* parent=0);
58 
59  /*!
60  \brief Destructor
61  It destructs a Trajectory Scene
62  */
63  virtual ~AnimationScene();
64 
65  /*!
66  \brief Create a new clear pixmap.
67  */
68  void createNewPixmap();
69 
70  /*!
71  \brief Add item.
72  \param item The graphics item.
73  */
74  void addItem(AnimationItem* item);
75 
76  /*!
77  \brief Remove item.
78  \param item The graphics item.
79  */
80  void removeItem(AnimationItem* item);
81 
82  /*!
83  \brief Clear scene.
84  */
85  void clear();
86 
87  /*!
88  \brief It sets the transformation matrix.
89  */
90  void setMatrix();
91 
92  /*!
93  \brief It sets the trajectory duration.
94  \param duration The animation duration in miliseconds
95  */
96  void setDuration(const int& duration);
97 
98  /*!
99  \brief It draws the animation item.
100  \param curtime The normalized current time (between 0 and 1).
101  */
102  void draw(const int& curTime);
103 
104  /*!
105  \brief It configures automatic pan over a trajectory.
106  \param title The trajectory title.
107  */
108  void setAutomaticPan(const QString& title);
109 
110  public:
111  te::qt::widgets::MapDisplay* m_display; //!< Indicates where the scene is displayed.
112  QPixmap* m_trajectoryPixmap; //!< QPixmap where all the trajectory item are drawn.
113  int m_numberOfTrajectories; //!< Number of trajectory items.
114  int m_numberOfPixmaps; //!< Number of pixmap items.
115  };
116  } // end namespace widgets
117  } // end namespace qt
118 } // end namespace te
119 
120 #endif // __TERRALIB_QT_WIDGETS_SLIDER_INTERNAL_ANIMATION_SCENE_H
int m_numberOfPixmaps
Number of pixmap items.
QPixmap * m_trajectoryPixmap
QPixmap where all the trajectory item are drawn.
A widget to control the display of a set of layers.
Definition: MapDisplay.h:65
te::qt::widgets::MapDisplay * m_display
Indicates where the scene is displayed.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
This class is a dialog for the Pixmap Item.
Definition: AnimationItem.h:57
This class is a dialog for the Animation.
int m_numberOfTrajectories
Number of trajectory items.