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  : te::qt::widgets::ImageItem()
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 {
25 }
26 
28 {
29  QString file(fileName);
30  int ind = file.indexOf("_");
31  if (file.indexOf("_", ind + 1) != -1)
32  ind = file.indexOf("_", ind + 1);
33  file.remove(0, ind + 1);
34  QString ano(file), mes(file), dia(file), hour(file), min(file);
35  ano.remove(4, ano.length() - 4);
36  mes.remove(0, 4);
37  mes.remove(2, mes.length() - 2);
38  dia.remove(0, 6);
39  dia.remove(2, dia.length() - 2);
40  hour.remove(0, 8);
41  hour.remove(2, hour.length() - 2);
42  min.remove(0, 10);
43  min.remove(2, min.length() - 2);
44 
45  te::dt::Date date(ano.toInt(), mes.toInt(), dia.toInt());
46  te::dt::TimeDuration dur(hour.toInt(), min.toInt(), 0);
47  return te::dt::TimeInstant(date, dur);
48 }
49 
A widget to control the display of a set of layers.
Definition: MapDisplay.h:66
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.
virtual ~GoesItem()
Destructor It destructs a Goes Item.
Definition: GoesItem.cpp:23
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:27