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