GoesItem.cpp
Go to the documentation of this file.
1 // TerraLib
2 #include "GoesItem.h"
3 #include "AnimationScene.h"
4 #include "Animation.h"
5 #include "../canvas/MapDisplay.h"
6 #include "../canvas/Canvas.h"
7 
8 // Qt
9 #include <QtCore/QPropertyAnimation>
10 #include <QtGui/QPainter>
11 #include <QtCore/QVector>
12 
14 
15 {
16 }
17 
18 te::qt::widgets::GoesItem::GoesItem(const QString& title, const QString& folder, te::qt::widgets::MapDisplay* display)
19  : te::qt::widgets::ImageItem(title, folder, display)
20 {
21 }
22 
24 
26 {
27  QString file(fileName);
28  int ind = file.indexOf("_");
29  if (file.indexOf("_", ind + 1) != -1)
30  ind = file.indexOf("_", ind + 1);
31  file.remove(0, ind + 1);
32  QString ano(file), mes(file), dia(file), hour(file), min(file);
33  ano.remove(4, ano.length() - 4);
34  mes.remove(0, 4);
35  mes.remove(2, mes.length() - 2);
36  dia.remove(0, 6);
37  dia.remove(2, dia.length() - 2);
38  hour.remove(0, 8);
39  hour.remove(2, hour.length() - 2);
40  min.remove(0, 10);
41  min.remove(2, min.length() - 2);
42 
43  te::dt::Date date(ano.toInt(), mes.toInt(), dia.toInt());
44  te::dt::TimeDuration dur(hour.toInt(), min.toInt(), 0);
45  return te::dt::TimeInstant(date, dur);
46 }
47 
A widget to control the display of a set of layers.
A class to represent time instant.
Definition: TimeInstant.h:55
This file defines a class for a Animation Scene.
A base class for date data types.
Definition: Date.h:53
URI C++ Library.
Definition: Attributes.h:37
virtual ~GoesItem()
Destructor It destructs a Goes Item.
This file defines a class for a Trajectory Animation.
A class to represent time duration with nano-second/micro-second resolution.
Definition: TimeDuration.h:51
GoesItem()
Empty Constructor.
Definition: GoesItem.cpp:13
te::dt::TimeInstant getTime(QString file)
Get time of the raster data.
Definition: GoesItem.cpp:25
file(WRITE ${CMAKE_BINARY_DIR}/config_qhelp.cmake"configure_file (${TERRALIB_ABSOLUTE_ROOT_DIR}/doc/qhelp/help.qhcp.in ${CMAKE_BINARY_DIR}/share/terraview/help/help.qhcp @ONLY)") add_custom_command(OUTPUT del_dir COMMAND $