VectorToRasterDialog.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/vp/qt/VectorToRasterDialog.h
22 
23  \brief A dialog vector to raster operation
24 */
25 
26 #ifndef __TERRALIB_ATTRIBUTEFILL_INTERNAL_VECTORTORASTERDIALOG_H
27 #define __TERRALIB_ATTRIBUTEFILL_INTERNAL_VECTORTORASTERDIALOG_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../dataaccess/datasource/DataSourceInfo.h"
32 #include "../../datatype/Property.h"
33 #include "../../maptools/AbstractLayer.h"
34 #endif
35 #include "../../qt/widgets/utils/DoubleListWidget.h"
36 #include "../../statistics/core/Enums.h"
37 #include "../Config.h"
38 
39 // STL
40 #include <list>
41 #include <map>
42 #include <memory>
43 
44 // Qt
45 #include <QDialog>
46 
47 namespace Ui { class VectorToRasterDialogForm; }
48 
49 namespace te
50 {
51  namespace attributefill
52  {
54  {
55  Q_OBJECT
56 
57  public:
58 
59  VectorToRasterDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
60 
62 
63  /*!
64  \brief Set the layer that can be used
65 
66  \param layers List of AbstractLayerPtr
67  */
68  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
69 
70  /*!
71  \brief Get the generated layer.
72 
73  \return the generated layer.
74  */
76 
77  private:
78 
79  void showSRS();
80 
81  protected slots:
82 
83  void onVectorComboBoxChanged(int index);
84 
86 
88 
90 
92 
94 
95  private:
96 
97  std::unique_ptr<Ui::VectorToRasterDialogForm> m_ui;
98  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
99  int m_srid; //!< SRID of selected layer.
100  std::unique_ptr<te::qt::widgets::DoubleListWidget> m_widget; //!< Double list widget.
101  te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
102  std::vector<te::dt::Property*> m_properties; //!< Properties related to the selected Layer
104  te::map::AbstractLayerPtr m_outLayer; //!< Generated Layer.
105  std::string m_path; //!< Output layer path;
106  bool m_toFile;
107  };
108  } // end namespace attributefill
109 } // end namespace te
110 
111 #endif // __TERRALIB_ATTRIBUTEFILL_INTERNAL_VECTORTORASTERDIALOG_H
te::attributefill::VectorToRasterDialog::m_srid
int m_srid
SRID of selected layer.
Definition: VectorToRasterDialog.h:99
te::attributefill::VectorToRasterDialog::onCancelPushButtonClicked
void onCancelPushButtonClicked()
te::attributefill::VectorToRasterDialog::m_properties
std::vector< te::dt::Property * > m_properties
Properties related to the selected Layer.
Definition: VectorToRasterDialog.h:102
te::attributefill::VectorToRasterDialog::getLayer
te::map::AbstractLayerPtr getLayer()
Get the generated layer.
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::attributefill::VectorToRasterDialog::onResYLineEditEditingFinished
void onResYLineEditEditingFinished()
te::attributefill::VectorToRasterDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
te::attributefill::VectorToRasterDialog::m_outputDatasource
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
Definition: VectorToRasterDialog.h:101
te::attributefill::VectorToRasterDialog::m_path
std::string m_path
Output layer path;.
Definition: VectorToRasterDialog.h:105
TEATTRIBUTEFILLEXPORT
#define TEATTRIBUTEFILLEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::attributefill::VectorToRasterDialog::~VectorToRasterDialog
~VectorToRasterDialog()
Ui
Definition: ConfigInputAddressDialog.h:44
te::attributefill::VectorToRasterDialog::m_selectedLayer
te::map::AbstractLayerPtr m_selectedLayer
Selected layer.
Definition: VectorToRasterDialog.h:103
te::attributefill::VectorToRasterDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te::attributefill::VectorToRasterDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
Definition: VectorToRasterDialog.h:98
te::attributefill::VectorToRasterDialog::m_toFile
bool m_toFile
Definition: VectorToRasterDialog.h:106
te::attributefill::VectorToRasterDialog::onResXLineEditEditingFinished
void onResXLineEditEditingFinished()
slots
#define slots
Definition: VirtualMachine.h:48
te::attributefill::VectorToRasterDialog::showSRS
void showSRS()
te::attributefill::VectorToRasterDialog::m_outLayer
te::map::AbstractLayerPtr m_outLayer
Generated Layer.
Definition: VectorToRasterDialog.h:104
te::attributefill::VectorToRasterDialog::onVectorComboBoxChanged
void onVectorComboBoxChanged(int index)
te::attributefill::VectorToRasterDialog::VectorToRasterDialog
VectorToRasterDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::attributefill::VectorToRasterDialog
Definition: VectorToRasterDialog.h:54
te::attributefill::VectorToRasterDialog::onTargetFileToolButtonPressed
void onTargetFileToolButtonPressed()
te::attributefill::VectorToRasterDialog::m_widget
std::unique_ptr< te::qt::widgets::DoubleListWidget > m_widget
Double list widget.
Definition: VectorToRasterDialog.h:100
te::attributefill::VectorToRasterDialog::m_ui
std::unique_ptr< Ui::VectorToRasterDialogForm > m_ui
Definition: VectorToRasterDialog.h:97