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  */
75  te::map::AbstractLayerPtr getLayer();
76 
77  private:
78 
79  void showSRS();
80 
81  protected slots:
82 
83  void onVectorComboBoxChanged(int index);
84 
85  void onResXLineEditEditingFinished();
86 
87  void onResYLineEditEditingFinished();
88 
89  void onTargetFileToolButtonPressed();
90 
91  void onOkPushButtonClicked();
92 
93  void onCancelPushButtonClicked();
94 
95  private:
96 
97  std::auto_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::auto_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
#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