Loading...
Searching...
No Matches
TimeViewerDockWidget.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3
4 This file is part of the TerraLib - a Framework for building GIS enabled
5 applications.
6
7 TerraLib is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation, either version 3 of the License,
10 or (at your option) any later version.
11
12 TerraLib is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with TerraLib. See COPYING. If not, write to
19 TerraLib Team at <terralib-team@terralib.org>.
20*/
21
22/*!
23 \file terralib/qt/plugins/timeviewer/Plugin.h
24
25 \brief Add a plugin interface for dynamic loading of the TimeViewer plugin.
26
27 \author Carolina Galvão dos Santos
28 \author Matheus Cavassan Zaglia
29 \author Fabiana Zioti
30
31 */
32
33#ifndef __TERRALIB_QT_PLUGINS_TIMEVIEWERDOCKWIDGET_H__
34#define __TERRALIB_QT_PLUGINS_TIMEVIEWERDOCKWIDGET_H__
35
36// TerraLib
37#include "../../../color/RGBAColor.h"
38#include "../../../dataaccess/datasource/DataSource.h"
39#include "../../../maptools/QueryLayer.h"
40#include "../../af/BaseApplication.h"
41#include "../../widgets/colorbar/ColorCatalogWidget.h"
42#include "Config.h"
45
46// QT
47#include <QtConcurrent/qtconcurrentrun.h>
48#include <QAction>
49#include <QDockWidget>
50#include <QEventLoop>
51#include <QList>
52#include <QTimer>
53
54// STL
55#include <future>
56
57namespace Ui
58{
59 class TimeViewerWidget;
60}
61
62class QWidget;
63class QDateTime;
64
65namespace te
66{
67 // Forward declarations
68 namespace color
69 {
70 class ColorBar;
71 }
72
73 namespace se
74 {
75 class Rule;
76 class Style;
77 }
78
79 namespace map
80 {
81 class Grouping;
82 class GroupingItem;
83 }
84
85 namespace qt
86 {
87 namespace af
88 {
89 namespace evt
90 {
91 struct Event;
92 }
93 class BaseApplication;
94 }
95
96 namespace plugins
97 {
98 namespace tv
99 {
100 class TimeViewerDockWidget : public QDockWidget
101 {
102 Q_OBJECT
103
104 public:
105 TimeViewerDockWidget(QWidget* parent = nullptr);
106
108
109 protected slots:
110
111 void onLayerCBoxSelected(int index);
124
126
127 private:
132 void drawLayer();
134 void buildSymbolizer(std::string date);
135 void getDataAsString(std::vector<std::string>& vec, const std::string& attrName, int& nullValues);
136
137 Q_SIGNALS:
138
140
141 private:
142 Ui::TimeViewerWidget* m_ui;
143
144 std::string m_dsId;
145 std::string m_start;
146 std::string m_end;
147 std::string m_datasetName;
148 std::string m_class;
149 std::string m_label;
150 QString m_accumColor = "#dddddd";
151
154
155 QFuture<void> m_future;
156
157 QEventLoop* m_drawingLoop;
158 std::atomic<bool> m_drawing;
159
161 std::list<te::map::AbstractLayerPtr> m_layerList;
163
164 std::vector<te::se::Rule*> m_rules;
165
166 std::unique_ptr<te::qt::plugins::tv::TimeViewerEditLegendDialog> m_editLegendDialog;
167 std::unique_ptr<te::qt::plugins::tv::TimeViewerEditAccumulateDialog> m_editAccumulateDialog;
168
170 std::vector<std::string> m_dates;
171 std::vector<std::string> vec;
172 QWidget* m_mainWidget;
173 };
174
175 } // end namespace tv
176 } // end namespace plugins
177 } // end namespace qt
178} // end namespace te
179
180#endif //__TERRALIB_QT_PLUGINS_TIMEVIEWERDOCKWIDGET_H__
A dialog used to edit Accumulate Legend.
A dialog used to edit legend.
void triggered(te::qt::af::evt::Event *e)
void onApplicationTriggered(te::qt::af::evt::Event *e)
TimeViewerDockWidget(QWidget *parent=nullptr)
std::unique_ptr< te::qt::plugins::tv::TimeViewerEditAccumulateDialog > m_editAccumulateDialog
std::unique_ptr< te::qt::plugins::tv::TimeViewerEditLegendDialog > m_editLegendDialog
void getDataAsString(std::vector< std::string > &vec, const std::string &attrName, int &nullValues)
std::list< te::map::AbstractLayerPtr > m_layerList
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
boost::intrusive_ptr< QueryLayer > QueryLayerPtr
Definition: QueryLayer.h:186
TerraLib.
#define slots
A base class for application events.
Definition: Event.h:60
Proxy configuration file for TerraView (see terraview_config.h).