TimeSliderWidget.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/slider/TimeSliderWidget.h
22 
23  \brief A widget used to alow the user to control the visualization of temporal data
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_TIMESLIDERWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_TIMESLIDERWIDGET_H
28 
29 //TerraLib
30 #include "../Config.h"
31 #ifndef Q_MOC_RUN
32 #include "../../../geometry.h"
33 #include "../../../datatype.h"
34 #include "../InterfaceController.h"
35 #include "SliderPropertiesDialog.h"
36 #endif
37 
38 // Qt
39 #include <QWidget>
40 #include <QAbstractAnimation>
41 #include <QDateTime>
42 #include <QUrl>
43 
44 //STL
45 #include <memory>
46 
47 namespace Ui { class TimeSliderWidgetForm; }
48 
49 class QGraphicsView;
50 class QParallelAnimationGroup;
51 class QGraphicsItem;
52 class QDateTimeEdit;
53 
54 namespace te
55 {
56  namespace dt
57  {
58  class TimePeriod;
59  class TimeInstant;
60  }
61  namespace gm
62  {
63  class Envelope;
64  }
65  namespace st
66  {
67  class TrajectoryDataSet;
68  class TrajectoryDataSetLayer;
69  }
70 
71  namespace qt
72  {
73  namespace widgets
74  {
75  class MapDisplay;
76  class Animation;
77  class AnimationItem;
78  class TrajectoryItem;
79  class ImageItem;
80  class AnimationScene;
81 
82  /*!
83  \class TimeSliderWidget
84 
85  \brief A wdiget used to control the visualization of temporal data
86  */
88  {
89  Q_OBJECT
90 
91  friend class SliderPropertiesDialog;
92  public:
93 
94  /*!
95  \brief Constructor
96 
97  It constructs a Time Slider Widget
98  */
99  TimeSliderWidget(MapDisplay* d, QWidget* parent = 0, Qt::WindowFlags f = 0);
100 
101  /*!
102  \brief Destructor
103 
104  It destructs a Time Slider Widget
105  */
107 
108  /*!
109  \brief This method is used to set current layer
110 
111  */
113 
114  /*!
115  \brief This method is used to add a new layer
116 
117  */
119 
120  /*!
121  \brief This method is used to remove a layer
122 
123  */
125 
126  void addTemporalImages(const QString& filePath);
127 
128  /*!
129  \brief This method is used to load a temporal image data.
130  NOTE: It should be edited to enter with new types of temporal images.
131 
132  Param path The folder that has temporal images and the control file.
133  */
135  /*!
136  \brief This method is used to find out the type of temporal image has the folder.
137  NOTE: It should be edited to enter with new types of temporal images.
138  NOTE: You must find a way to discover its kind.
139 
140  \param path The folder that has temporal images and the control file.
141  \return The temporal image type.
142  */
143  QString getTemporalImageType(const QString& path);
144 
145  /*!
146  \brief Add trajectory to animation scene.
147 
148  \param title The trajectory title.
149  \param pixmapFile The trajectory icon.
150  \param poinstFile The trajectory points.
151  */
152  void addTrajectory(te::st::TrajectoryDataSetLayer* tl, const QString& pixmapFile);
153 
154  /*!
155  \brief It calculates the spatial extent.
156  */
158 
159  /*!
160  \brief It calculates the temporal extent.
161  */
163 
164  /*!
165  \brief Change direction.
166  */
168 
169  /*!
170  \brief Sets the mode of animation.
171  \param t True if the animation goes back and forth
172  */
173  void setGoAndBack(bool t);
174 
175  /*!
176  \brief Sets the animation direction.
177  \param direction The animation direction.
178  */
179  void setDirection(const QAbstractAnimation::Direction& direction);
180 
181  /*!
182  \brief Sets the animation duration.
183  \param duration The animation duration in miliseconds.
184  */
185  void setDuration(const unsigned int& duration);
186 
187  /*!
188  \brief create new pixmap.
189  */
191 
192  /*!
193  \brief Set transformation matrix and draw current animation.
194  */
195  void draw();
196 
197  /*!
198  \brief It emits, indirectly, a sign for this widget is destroyed.
199  */
200  void deleteMe();
201 
202  /*!
203  \brief It puts graphic item to front.
204 
205  \param item The graphic item.
206  */
208 
209  /*!
210  \brief It puts graphic item to back.
211 
212  \param item The graphic item.
213  */
215 
216  /*!
217  \brief It gets the initial time.
218 
219  \return The initial time.
220  */
222 
223  /*!
224  \brief It gets the final time.
225 
226  \return The final time.
227  */
229 
230  void showWidget(const bool& b);
231 
232  protected:
233 
234  /*!
235  \brief it filters the events of interest.
236  */
237  bool eventFilter(QObject*, QEvent*);
238 
239  /*!
240  \brief Update animation time.
241  */
243 
244  /*!
245  \brief Updates the position of the slider with respect to time animation.
246  */
248 
249  /*!
250  \brief Play animation.
251  */
252  void play();
253 
254  /*!
255  \brief Create animations.
256  */
258 
259  /*!
260  \brief
261  It it gets the animation time on a time instant.
262  /param tinstant The time instant.
263 
264  \return The animation time in miliseconds.
265  */
266  int getAnimationTime(const te::dt::TimeInstant& tinstant);
267 
268  /*!
269  \brief
270  It it gets the animation time instant.
271 
272  \return The animation time instant.
273  */
275 
276  /*!
277  \brief
278  It Erase trajectory piece.
279  */
280  void erase(const unsigned int& curTime);
281 
282  /*!
283  \brief
284  True to erase trajectory piece perfectly.
285  Note: Perfectly clear implies loss of performance.
286  */
287  void setErasePerfectly(bool b);
288 
289  /*!
290  \brief
291  It corrects the edited date time
292 
293  /param dte DateTimeEdit to be fixed.
294  /param t The edite date time.
295  */
296  QDateTime fixDateTimeEdit(QDateTimeEdit* dte, const QDateTime& t);
297 
298  void loadAnimation(const QString& title);
299 
300  void removeAnimation(const int& ind);
301  //void removeAnimation(const QString& title);
302 
303  //void removeOnPropertieCombo(const QString& title);
304 
305  bool trajectoryAlreadyExists(QPair<QString, QString>& item);
306  bool coverageAlreadyExists(QPair<QString, QString>& item);
307 
308  /*!
309  \brief It initialize a property animation dialog
310  */
311  void initProperty();
312 
313  /*!
314  \brief Show Property
315 
316  \param b true = show, false = hide
317  */
318  void showPropertySection(bool b);
319 
320  /*!
321  \brief Is Setting Changed
322 
323  \return true = changed, false = not changed
324  */
326 
328 
330 
331 
332  protected slots:
333 
334  /*!
335  \brief it draw on display.
336  \param p Pointer to QPainter.
337  */
338  void onDisplayPaintEvent(QPainter* p);
339 
340  /*!
341  \brief Drag enter event on display.
342  \param e The drag enter event.
343  */
344  void onAnimationDragEnterEvent(QDragEnterEvent* e);
345 
346  void onAnimationDropEvent(QDropEvent*);
347  /*!
348  \brief it opens the configuration window animation.
349  */
351 
352  /*!
353  \brief Play or pause the animation.
354  */
356 
357  /*!
358  \brief Stop animation.
359  */
361 
362  /*!
363  \brief It takes the necessary measures after slider move.
364  \param e The slider value.
365  */
366  void onSliderMoved(int value);
367 
368  /*!
369  \brief It takes the necessary measures after the change of extent.
370  */
372 
373  /*!
374  \brief It takes the necessary measures after the change of extent.
375  */
377 
378  /*!
379  \brief It takes the necessary measures after the end of the trajectory.
380  */
382 
383  /*!
384  \brief It takes the necessary steps after changing the duration.
385  \param v Value of duration in miliseconds.
386  */
388 
389  /*!
390  \brief It takes the necessary steps after changing the duration.
391  \param v Value of opacity (0 - 255).
392  */
394 
395  /*!
396  \brief It takes the necessary steps after changing the current time of animation.
397  \param t The new current time.
398  */
399  void onDateTimeEditChanged(const QDateTime& t);
400 
405 
406  /*!
407  \brief Help button clicked.
408  */
410 
411  /*!
412  \brief Draw track check box clicked.
413 
414  \param b True if the button is checked, or false if the button is unchecked
415  */
417 
418  /*!
419  \brief Forward radio button clicked.
420 
421  \param b True if the button is checked, or false if the button is unchecked
422  */
424 
425  /*!
426  \brief Backward radio button clicked.
427 
428  \param b True if the button is checked, or false if the button is unchecked
429  */
431 
432  /*!
433  \brief Loop check box clicked.
434 
435  \param b True if the button is checked, or false if the button is unchecked
436  */
437  void onLoopCheckBoxClicked(bool b);
438 
439  /*!
440  \brief Forward and then backward check box clicked.
441 
442  \param b True if the button is checked, or false if the button is unchecked
443  */
445 
446  /*!
447  \brief Apply time interval push button clicked.
448 
449  \param b True if the button is checked, or false if the button is unchecked
450  */
452 
453  /*!
454  \brief Opacity combo box activated.
455 
456  \param i The index of combo box.
457  */
459 
460  /*!
461  \brief Remove item animation.
462  */
464 
465  /*!
466  \brief Remove all animations.
467  */
469 
470  /*!
471  \brief Reset initial time button clicked.
472  */
474 
475  /*!
476  \brief Reset final time button clicked.
477  */
479 
481 
483 
484  void dropAction();
485 
486  signals:
487 
488  /*!
489  \brief This sign warns that this widget must be destroyed.
490  */
492 
493  private:
494 
495  //struct AnimationAuxInfo
496  //{
497  // QString type;
498  // QString title;
499  // unsigned char opacity;
500  // bool drawTrail;
501  // bool autoPan;
502  // QColor forwardColor;
503  // QColor backwardColor;
504  //};
505 
506  bool m_loop; //!< This property holds whether the slider's animation is on loop.
507  int m_duration; //!< The animation's duration time in miliseconds
508  QAbstractAnimation::Direction m_direction; //!< QAbstractAnimation::Forward or QAbstractAnimation::Backward
509  bool m_goAndBack; //!< Forward and then backward direction
510  bool m_comingBack; //!< Flag to indicate that the trend is coming back
511  MapDisplay* m_display; //!< The map display
512  QGraphicsView* m_animationView; //!< The animation graphics view
513  AnimationScene* m_animationScene; //!< The animation scene
514  QParallelAnimationGroup* m_parallelAnimation; //!< The parallel animation
515  te::gm::Envelope m_spatialExtent; //!< Spatial extent.
516  te::dt::TimePeriod m_temporalExtent; //!< Temporal extent.
517  te::dt::TimePeriod m_temporalAnimationExtent; //!< Animation temporal extent. It is used for show animation.
518  int m_currentTime; //!< Current animation time (relative to time duration).
519  bool m_erasePerfectly; //!< flag to erase trajectory piece perfectly (default = false).
520  std::unique_ptr<Ui::TimeSliderWidgetForm> m_ui; //!< The widget form.
521  QDateTime m_oldQDateTime; //!< The old Qt date time.
522  QDateTime m_oldIQDateTime; //!< The old initial Qt date time.
523  QDateTime m_oldFQDateTime; //!< The old final Qt date time.
524  bool m_dateTimeChanged; //!< flag to signal change in animation time.
525  int m_maxSliderValue; //!< The max slider value.
526  bool m_finished; //!< flag to signal animation finish.
527  bool m_paused; //!< flag to signal animation pause.
528  QList<QPair<QString, te::st::TrajectoryDataSetLayer*> > m_trajectoryItemList; //!< List of all trajectory items (title, layer).
529  QList<QPair<QString, QString> > m_coverageItemList; //!< List of all animation items (title, path).
530  Qt::KeyboardModifiers m_dropModifiers; //!< Control pressed to add animation with drag and drop.
531  QList<QUrl> m_dropUrls; //!< Urls to animation with drag and drop.
532  QByteArray m_dropBA; //!< Layer animation with drag and drop.
533  SliderPropertiesDialog* m_spd; //!< Slider Properties Dialog.
534  QList<QString> m_animationIdList; //!< List containing the shadow of m_ui->m_animationComboBox
535  double m_panFactor; //!< the range is between 0.002 and 0.5
536  };
537  } // end namespace widgets
538  } // end namespace qt
539 } // end namespace te
540 
541 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_TIMESLIDERWIDGET_H
te::qt::widgets::AnimationItem
An abstract class for Animation Item.
Definition: AnimationItem.h:65
te::gm::Envelope
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
te::qt::widgets::TimeSliderWidget::getFinalTime
te::dt::TimeInstant getFinalTime()
It gets the final time.
te::qt::widgets::TimeSliderWidget::putToFront
void putToFront(AnimationItem *item)
It puts graphic item to front.
te::qt::widgets::TimeSliderWidget::onFrontPushButtonClicked
void onFrontPushButtonClicked(bool b)
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::qt::widgets::TimeSliderWidget::getDateString
QString getDateString(const te::dt::TimeInstant &t)
te::qt::widgets::TimeSliderWidget::setErasePerfectly
void setErasePerfectly(bool b)
True to erase trajectory piece perfectly. Note: Perfectly clear implies loss of performance.
te::qt::widgets::TimeSliderWidget::layerAdded
virtual void layerAdded(te::map::AbstractLayerPtr layer)
This method is used to add a new layer.
te::qt::widgets::TimeSliderWidget::onResetInitialTimePushButtonClicked
void onResetInitialTimePushButtonClicked()
Reset initial time button clicked.
te::dt::TimePeriod
A class to represent time period.
Definition: TimePeriod.h:55
te::qt::widgets::TimeSliderWidget::m_animationIdList
QList< QString > m_animationIdList
List containing the shadow of m_ui->m_animationComboBox.
Definition: TimeSliderWidget.h:534
te::qt::widgets::MapDisplay
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
te::qt::widgets::TimeSliderWidget::onLoopCheckBoxClicked
void onLoopCheckBoxClicked(bool b)
Loop check box clicked.
te::qt::widgets::TimeSliderWidget::m_oldQDateTime
QDateTime m_oldQDateTime
The old Qt date time.
Definition: TimeSliderWidget.h:521
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::qt::widgets::TimeSliderWidget::m_temporalExtent
te::dt::TimePeriod m_temporalExtent
Temporal extent.
Definition: TimeSliderWidget.h:516
te::qt::widgets::TimeSliderWidget::m_dropBA
QByteArray m_dropBA
Layer animation with drag and drop.
Definition: TimeSliderWidget.h:532
te::qt::widgets::TimeSliderWidget::m_coverageItemList
QList< QPair< QString, QString > > m_coverageItemList
List of all animation items (title, path).
Definition: TimeSliderWidget.h:529
te::qt::widgets::TimeSliderWidget::createNewPixmap
void createNewPixmap()
create new pixmap.
te::qt::widgets::TimeSliderWidget::initProperty
void initProperty()
It initialize a property animation dialog.
te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated
void onAnimationComboBoxActivated(int i)
Opacity combo box activated.
te::qt::widgets::TimeSliderWidget::onSettingsToolButtonnClicked
void onSettingsToolButtonnClicked()
it opens the configuration window animation.
te::qt::widgets::TimeSliderWidget::trajectoryAlreadyExists
bool trajectoryAlreadyExists(QPair< QString, QString > &item)
te::qt::widgets::TimeSliderWidget::loadAnimation
void loadAnimation(const QString &title)
te::qt::widgets::TimeSliderWidget::m_comingBack
bool m_comingBack
Flag to indicate that the trend is coming back.
Definition: TimeSliderWidget.h:510
te::qt::widgets::TimeSliderWidget::m_panFactor
double m_panFactor
the range is between 0.002 and 0.5
Definition: TimeSliderWidget.h:535
te::qt::widgets::TimeSliderWidget::onResetFinalTimePushButtonClicked
void onResetFinalTimePushButtonClicked()
Reset final time button clicked.
te::qt::widgets::TimeSliderWidget::onRemoveAllPushButtonClicked
void onRemoveAllPushButtonClicked(bool)
Remove all animations.
te::qt::widgets::TimeSliderWidget::m_dropModifiers
Qt::KeyboardModifiers m_dropModifiers
Control pressed to add animation with drag and drop.
Definition: TimeSliderWidget.h:530
te::qt::widgets::InterfaceController
A virtual class for non modal interfaces.
Definition: InterfaceController.h:46
te::qt::widgets::TimeSliderWidget::putToBack
void putToBack(AnimationItem *item)
It puts graphic item to back.
te::qt::widgets::TimeSliderWidget::onDrawTrailCheckBoxClicked
void onDrawTrailCheckBoxClicked(bool b)
Draw track check box clicked.
te::qt::widgets::TimeSliderWidget::onTrajectoryPixmapSizeChanged
void onTrajectoryPixmapSizeChanged(int)
te::qt::widgets::TimeSliderWidget::m_erasePerfectly
bool m_erasePerfectly
flag to erase trajectory piece perfectly (default = false).
Definition: TimeSliderWidget.h:519
te::qt::widgets::TimeSliderWidget::fixDateTimeEdit
QDateTime fixDateTimeEdit(QDateTimeEdit *dte, const QDateTime &t)
It corrects the edited date time.
te::qt::widgets::TimeSliderWidget::m_temporalAnimationExtent
te::dt::TimePeriod m_temporalAnimationExtent
Animation temporal extent. It is used for show animation.
Definition: TimeSliderWidget.h:517
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::qt::widgets::TimeSliderWidget::onPlayToolButtonnClicked
void onPlayToolButtonnClicked()
Play or pause the animation.
te::qt::widgets::TimeSliderWidget::m_oldIQDateTime
QDateTime m_oldIQDateTime
The old initial Qt date time.
Definition: TimeSliderWidget.h:522
te::qt::widgets::TimeSliderWidget::onExtentChanged
void onExtentChanged()
It takes the necessary measures after the change of extent.
te::qt::widgets::TimeSliderWidget::m_spd
SliderPropertiesDialog * m_spd
Slider Properties Dialog.
Definition: TimeSliderWidget.h:533
te::qt::widgets::TimeSliderWidget::isSettingChanged
bool isSettingChanged()
Is Setting Changed.
te::qt::widgets::TimeSliderWidget::m_paused
bool m_paused
flag to signal animation pause.
Definition: TimeSliderWidget.h:527
te::qt::widgets::TimeSliderWidget::loadImageData
te::qt::widgets::ImageItem * loadImageData(const QString &path)
This method is used to load a temporal image data. NOTE: It should be edited to enter with new types ...
te::qt::widgets::TimeSliderWidget::onAutoPanCheckBoxClicked
void onAutoPanCheckBoxClicked(bool)
te::qt::widgets::AnimationScene
This class allows to add multiple trajectories and temporal image.
Definition: AnimationScene.h:51
te::qt::widgets::TimeSliderWidget::updateSliderPos
void updateSliderPos()
Updates the position of the slider with respect to time animation.
te::qt::widgets::TimeSliderWidget::addTemporalImages
void addTemporalImages(const QString &filePath)
te::qt::widgets::TimeSliderWidget::onApplyTimeIntervalPushButtonClicked
void onApplyTimeIntervalPushButtonClicked(bool b)
Apply time interval push button clicked.
te::qt::widgets::TimeSliderWidget::m_trajectoryItemList
QList< QPair< QString, te::st::TrajectoryDataSetLayer * > > m_trajectoryItemList
List of all trajectory items (title, layer).
Definition: TimeSliderWidget.h:528
te::qt::widgets::TimeSliderWidget::setDirection
void setDirection(const QAbstractAnimation::Direction &direction)
Sets the animation direction.
te::qt::widgets::TimeSliderWidget::calculateAllSpatialExtent
void calculateAllSpatialExtent()
It calculates the spatial extent.
te::qt::widgets::TimeSliderWidget::onDurationValueChanged
void onDurationValueChanged(int v)
It takes the necessary steps after changing the duration.
SliderPropertiesDialog.h
Ui
Definition: ConfigInputAddressDialog.h:44
te::qt::widgets::TimeSliderWidget::m_spatialExtent
te::gm::Envelope m_spatialExtent
Spatial extent.
Definition: TimeSliderWidget.h:515
te::qt::widgets::TimeSliderWidget::m_currentTime
int m_currentTime
Current animation time (relative to time duration).
Definition: TimeSliderWidget.h:518
te::qt::widgets::TimeSliderWidget::showWidget
void showWidget(const bool &b)
te::qt::widgets::TimeSliderWidget::onPanFactorValueChanged
void onPanFactorValueChanged(double)
te::qt::widgets::TimeSliderWidget::onIconRotateCheckBoxClicked
void onIconRotateCheckBoxClicked(bool)
te::qt::widgets::TimeSliderWidget::m_display
MapDisplay * m_display
The map display.
Definition: TimeSliderWidget.h:511
te::qt::widgets::TimeSliderWidget::setDuration
void setDuration(const unsigned int &duration)
Sets the animation duration.
te::qt::widgets::TimeSliderWidget::m_loop
bool m_loop
This property holds whether the slider's animation is on loop.
Definition: TimeSliderWidget.h:506
te::qt::widgets::TimeSliderWidget::onStopToolButtonnClicked
void onStopToolButtonnClicked()
Stop animation.
te::qt::widgets::TimeSliderWidget::m_parallelAnimation
QParallelAnimationGroup * m_parallelAnimation
The parallel animation.
Definition: TimeSliderWidget.h:514
te::qt::widgets::TimeSliderWidget::setGoAndBack
void setGoAndBack(bool t)
Sets the mode of animation.
te::qt::widgets::TimeSliderWidget::onBackPushButtonClicked
void onBackPushButtonClicked(bool b)
te::qt::widgets::TimeSliderWidget::m_dropUrls
QList< QUrl > m_dropUrls
Urls to animation with drag and drop.
Definition: TimeSliderWidget.h:531
slots
#define slots
Definition: VirtualMachine.h:48
te::qt::widgets::TimeSliderWidget::m_maxSliderValue
int m_maxSliderValue
The max slider value.
Definition: TimeSliderWidget.h:525
te::qt::widgets::TimeSliderWidget::onDateTimeEditChanged
void onDateTimeEditChanged(const QDateTime &t)
It takes the necessary steps after changing the current time of animation.
te::qt::widgets::TimeSliderWidget::getInitialTime
te::dt::TimeInstant getInitialTime()
It gets the initial time.
te::qt::widgets::TimeSliderWidget::onForwardRadioButtonClicked
void onForwardRadioButtonClicked(bool b)
Forward radio button clicked.
te::qt::widgets::TimeSliderWidget::onSridChanged
void onSridChanged()
It takes the necessary measures after the change of extent.
te::qt::widgets::TimeSliderWidget::onRemovePushButtonClicked
void onRemovePushButtonClicked(bool)
Remove item animation.
te::qt::widgets::TimeSliderWidget::getTemporalImageType
QString getTemporalImageType(const QString &path)
This method is used to find out the type of temporal image has the folder. NOTE: It should be edited ...
te::qt::widgets::TimeSliderWidget::calculateAllTemporalExtent
void calculateAllTemporalExtent()
It calculates the temporal extent.
te::qt::widgets::TimeSliderWidget::onAnimationDropEvent
void onAnimationDropEvent(QDropEvent *)
te::qt::widgets::TimeSliderWidget::m_ui
std::unique_ptr< Ui::TimeSliderWidgetForm > m_ui
The widget form.
Definition: TimeSliderWidget.h:520
te::qt::widgets::TimeSliderWidget::TimeSliderWidget
TimeSliderWidget(MapDisplay *d, QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
te::qt::widgets::TimeSliderWidget::dropAction
void dropAction()
te::qt::widgets::TimeSliderWidget::coverageAlreadyExists
bool coverageAlreadyExists(QPair< QString, QString > &item)
te::qt::widgets::TimeSliderWidget::m_direction
QAbstractAnimation::Direction m_direction
QAbstractAnimation::Forward or QAbstractAnimation::Backward.
Definition: TimeSliderWidget.h:508
te::qt::widgets::TimeSliderWidget::showPropertySection
void showPropertySection(bool b)
Show Property.
te::qt::widgets::TimeSliderWidget::addTrajectory
void addTrajectory(te::st::TrajectoryDataSetLayer *tl, const QString &pixmapFile)
Add trajectory to animation scene.
te::qt::widgets::TimeSliderWidget::m_dateTimeChanged
bool m_dateTimeChanged
flag to signal change in animation time.
Definition: TimeSliderWidget.h:524
te::qt::widgets::TimeSliderWidget::onSliderMoved
void onSliderMoved(int value)
It takes the necessary measures after slider move.
te::qt::widgets::TimeSliderWidget::eventFilter
bool eventFilter(QObject *, QEvent *)
it filters the events of interest.
te::qt::widgets::TimeSliderWidget::m_goAndBack
bool m_goAndBack
Forward and then backward direction.
Definition: TimeSliderWidget.h:509
te::qt::widgets::TimeSliderWidget::createAnimations
void createAnimations()
Create animations.
te::qt::widgets::TimeSliderWidget::m_animationScene
AnimationScene * m_animationScene
The animation scene.
Definition: TimeSliderWidget.h:513
te::qt::widgets::TimeSliderWidget::deleteTimeSliderWidget
void deleteTimeSliderWidget()
This sign warns that this widget must be destroyed.
te::qt::widgets::TimeSliderWidget::onBackwardRadioButtonClicked
void onBackwardRadioButtonClicked(bool b)
Backward radio button clicked.
te::qt::widgets::TimeSliderWidget::getAnimationTime
int getAnimationTime(const te::dt::TimeInstant &tinstant)
It it gets the animation time on a time instant. /param tinstant The time instant.
te::qt::widgets::TimeSliderWidget::onAnimationDragEnterEvent
void onAnimationDragEnterEvent(QDragEnterEvent *e)
Drag enter event on display.
te::qt::widgets::TimeSliderWidget::adjustPropertyDialog
void adjustPropertyDialog(te::qt::widgets::AnimationItem *)
te::qt::widgets::TimeSliderWidget::updateTimeTextEdit
void updateTimeTextEdit()
Update animation time.
te::qt::widgets::TimeSliderWidget::m_duration
int m_duration
The animation's duration time in miliseconds.
Definition: TimeSliderWidget.h:507
te::qt::widgets::SliderPropertiesDialog
A dialog used to configure the behaviour of the SliderSliderWidget.
Definition: SliderPropertiesDialog.h:61
te::qt::widgets::TimeSliderWidget::layerRemoved
virtual void layerRemoved(te::map::AbstractLayerPtr layer)
This method is used to remove a layer.
te::qt::widgets::TimeSliderWidget::m_oldFQDateTime
QDateTime m_oldFQDateTime
The old final Qt date time.
Definition: TimeSliderWidget.h:523
te::qt::widgets::TimeSliderWidget::onHelpPushButtonClicked
void onHelpPushButtonClicked()
Help button clicked.
te::qt::widgets::TimeSliderWidget::m_animationView
QGraphicsView * m_animationView
The animation graphics view.
Definition: TimeSliderWidget.h:512
te::qt::widgets::TimeSliderWidget::changeDirection
void changeDirection()
Change direction.
te::qt::widgets::TimeSliderWidget::onFinishAnimation
void onFinishAnimation()
It takes the necessary measures after the end of the trajectory.
te::dt::TimeInstant
A class to represent time instant.
Definition: TimeInstant.h:56
te::qt::widgets::TimeSliderWidget::onGoAndBackCheckBoxClicked
void onGoAndBackCheckBoxClicked(bool b)
Forward and then backward check box clicked.
te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent
void onDisplayPaintEvent(QPainter *p)
it draw on display.
te::qt::widgets::TimeSliderWidget::layerSelected
virtual void layerSelected(te::map::AbstractLayerPtr layer)
This method is used to set current layer.
te::qt::widgets::TimeSliderWidget::removeAnimation
void removeAnimation(const int &ind)
te::qt::widgets::TimeSliderWidget
A wdiget used to control the visualization of temporal data.
Definition: TimeSliderWidget.h:88
te::qt::widgets::TimeSliderWidget::~TimeSliderWidget
~TimeSliderWidget()
Destructor.
te::qt::widgets::TimeSliderWidget::getTimeInstant
te::dt::TimeInstant getTimeInstant()
It it gets the animation time instant.
te::qt::widgets::TimeSliderWidget::m_finished
bool m_finished
flag to signal animation finish.
Definition: TimeSliderWidget.h:526
te::qt::widgets::TimeSliderWidget::draw
void draw()
Set transformation matrix and draw current animation.
te::qt::widgets::TimeSliderWidget::onOpacityValueChanged
void onOpacityValueChanged(int v)
It takes the necessary steps after changing the duration.
te::qt::widgets::TimeSliderWidget::erase
void erase(const unsigned int &curTime)
It Erase trajectory piece.
te::qt::widgets::TimeSliderWidget::deleteMe
void deleteMe()
It emits, indirectly, a sign for this widget is destroyed.
te::qt::widgets::TimeSliderWidget::play
void play()
Play animation.
te::qt::widgets::ImageItem
Definition: ImageItem.h:63
te::st::TrajectoryDataSetLayer
A layer with reference to a dataset that contains trajectories.
Definition: TrajectoryDataSetLayer.h:55