ImageGenerationDialog.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/mnt/qt/ImageGenerationDialog.h
22 
23 \brief A dialog Shadow image generation
24 */
25 
26 #ifndef __TERRALIB_MNT_INTERNAL_IMAGEGENERATIONDIALOG_H
27 #define __TERRALIB_MNT_INTERNAL_IMAGEGENERATIONDIALOG_H
28 
29 // Terralib
30 #ifndef Q_MOC_RUN
31 #include "../../dataaccess/datasource/DataSource.h"
32 #include "../../dataaccess/datasource/DataSourceInfo.h"
33 #include "../../maptools/AbstractLayer.h"
34 #endif
35 #include "../../qt/widgets/canvas/MapDisplay.h"
36 #include "../core/Config.h"
37 
38 // STL
39 #include <list>
40 #include <map>
41 
42 // Qt
43 #include <QDialog>
44 
45 namespace Ui { class ImageGenerationDialogForm; }
46 
47 namespace te
48 {
49  namespace qt
50  {
51  namespace widgets
52  {
53  class RasterNavigatorWidget;
54  }
55  }
56 
57  namespace mnt
58  {
59  class TEMNTEXPORT ImageGenerationDialog : public QDialog
60  {
61  Q_OBJECT
62 
63  public:
64  ImageGenerationDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
65 
67 
68  /*!
69  \brief Set the layer that can be used
70  \param layers List of AbstractLayerPtr
71  */
72  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
73 
74  te::map::AbstractLayerPtr getLayer();
75 
76  void setSRID(int newSRID);
77 
78  void setMapDisplay(te::qt::widgets::MapDisplay* mapDisplay);
79  void getRaster();
80 
81  void drawPreview(std::unique_ptr<te::rst::Raster>& raster);
82 
83  void resetDraw();
84 
85  protected slots:
86 
87  void onInputComboBoxChanged(int index);
88  void onlayerSearchToolButtonClicked();
89  void onPreviewPushButtonClicked();
90 
91  void onResXLineEditEditingFinished();
92  void onResYLineEditEditingFinished();
93  void onTargetDatasourceToolButtonPressed();
94  void onTargetFileToolButtonPressed();
95  void onOkPushButtonClicked();
96  void onCancelPushButtonClicked();
97  void onSrsToolButtonClicked();
98 
99  void onMapDisplayExtentChanged();
100 
101  private:
102 
103  std::unique_ptr<Ui::ImageGenerationDialogForm> m_ui;
104 
105  te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
106  std::string m_outputArchive; //!< Archive information.
107  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
111  std::unique_ptr<te::rst::Raster> m_previewRaster;
113  te::da::DataSourcePtr m_inDataSource; //!< input DataSourcePtr
114  std::string m_inSetName; //!< input DataSetLayer name
115 
116  double m_min;
117  double m_max;
118  double m_dummy;
120  }; //class ImageGenerationDialog
121  } //mnt
122 } //te
123 
124 #endif
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1440
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
A widget to control the display of a set of layers.
Definition: MapDisplay.h:69
te::da::DataSourcePtr m_inDataSource
input DataSourcePtr
std::unique_ptr< Ui::ImageGenerationDialogForm > m_ui
std::string m_inSetName
input DataSetLayer name
te::map::AbstractLayerPtr m_outputLayer
Generated Layer.
URI C++ Library.
te::qt::widgets::Canvas * m_canvas
std::string m_outputArchive
Archive information.
A canvas built on top of Qt.
Definition: Canvas.h:54
std::unique_ptr< te::rst::Raster > m_previewRaster
te::qt::widgets::MapDisplay * m_mapDisplay
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
te::map::AbstractLayerPtr m_inputLayer
Input layer.