Loading...
Searching...
No Matches
RasterizationWizardPage.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#ifndef TE_QT_WIDGETS_RASTERIZATIONWIZARDPAGE_H
22#define TE_QT_WIDGETS_RASTERIZATIONWIZARDPAGE_H
23
24//Terralib
25#ifndef Q_MOC_RUN
26#include "../../../dataaccess/datasource/DataSourceInfo.h"
27#include "../../../maptools/AbstractLayer.h"
28#endif
29#include "../Config.h"
30
31//Qt
32// QT
33#include <QTableWidgetItem>
34#include <QWizardPage>
35
36//STL
37#include <memory>
38
39//Forward declarations
40namespace Ui
41{
42 class GroupingWidgetForm;
43 class RasterizationWizardPageForm;
44}
45
46namespace te
47{
48 namespace color { class ColorBar; }
49
50 namespace rst { class Raster; }
51
52 namespace se { class Rule; }
53
54 namespace qt
55 {
56 namespace widgets
57 {
58
59 // Forward declarations
60 class ColorCatalogWidget;
61
62 class TEQTWIDGETSEXPORT RasterizationWizardPage : public QWizardPage
63 {
64 Q_OBJECT
65
66 public:
67
68 RasterizationWizardPage(QWidget* parent=0);
69
71
73
74 double getResX();
75
76 double getResY();
77
79
80 int getSrid();
81
83
85
86 std::string getRepositoryName();
87
88 std::string getAttributeName();
89
90 std::map<std::string, std::vector<int> > getInformations();
91
92 void validate();
93
94 QTableWidget* getTableWidget();
95
96 void saveLegend(const std::string& path);
97
98 private:
99
100 /*! \brief Updates the widget form based on internal fill element. */
101 void updateUi(bool loadColorBar = false);
102
103 std::vector<std::string> getDistinctClasses(const std::string& attrName);
104
105 void getDataAsString(std::vector<std::string>& vec, const std::string& attrName, int& nullValues);
106
107 void buildSymbolizer(std::string meanTitle = "");
108
110
112
114
115 protected slots:
116
118
120
122
124
126
127 void onTableWidgetItemChanged(QTableWidgetItem* item);
128
129 void onTableWidgetItemDoubleClicked(QTableWidgetItem* item);
130
132
134
136
138
140
141 signals:
142
144
145 private:
146
147 std::unique_ptr<Ui::RasterizationWizardPageForm> m_ui;
148
149 te::map::AbstractLayerPtr m_layer; //!< TerraLib layer auto ptr
150
151 te::color::ColorBar* m_cb; //!< Terralib color bar objetc
152 te::qt::widgets::ColorCatalogWidget* m_colorBar; //!< Widget used to pick a color.
153
154 std::vector<te::se::Rule*> m_legend; //!< Rule items
155
156 te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
157
159
161 };
162
163 } // namespace widgets
164 } // namespace qt
165} // namespace te
166
167#endif // TE_QT_WIDGETS_RASTERIZATIONWIZARDPAGE_H
It models the concept of color bar.
Definition: ColorBar.h:50
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
void saveLegend(const std::string &path)
std::unique_ptr< Ui::RasterizationWizardPageForm > m_ui
te::da::DataSourceInfoPtr getDataSourceInfo()
void setLayer(te::map::AbstractLayerPtr layer)
void updateUi(bool loadColorBar=false)
Updates the widget form based on internal fill element.
std::vector< te::se::Rule * > m_legend
Rule items.
te::qt::widgets::ColorCatalogWidget * m_colorBar
Widget used to pick a color.
te::map::AbstractLayerPtr m_layer
TerraLib layer auto ptr.
std::map< std::string, std::vector< int > > getInformations()
void onTableWidgetItemDoubleClicked(QTableWidgetItem *item)
void getDataAsString(std::vector< std::string > &vec, const std::string &attrName, int &nullValues)
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
void buildSymbolizer(std::string meanTitle="")
te::color::ColorBar * m_cb
Terralib color bar objetc.
std::vector< std::string > getDistinctClasses(const std::string &attrName)
void onTableWidgetItemChanged(QTableWidgetItem *item)
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63