ClippingWizardPage.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/qt/widgets/rp/ClippingWizardPage.h
22 
23  \brief This file defines a class for a Clipping Wizard page.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLIPPINGWIZARDPAGE_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLIPPINGWIZARDPAGE_H
28 
29 // TerraLib
30 #include "../../../geometry/Envelope.h"
31 #ifndef Q_MOC_RUN
32 #include "../../../maptools/AbstractLayer.h"
33 #include "../../../qt/widgets/canvas/MapDisplay.h"
34 #endif
35 #include "../Config.h"
36 
37 // STL
38 #include <memory>
39 
40 // Qt
41 #include <QWizardPage>
42 #include <QActionGroup>
43 
44 // Forward declaration
45 namespace Ui { class ClippingWizardPageForm; }
46 
47 namespace te
48 {
49  namespace qt
50  {
51  namespace widgets
52  {
53  class RpToolsWidget;
54 
55  /*!
56  \class ClippingWizardPage
57 
58  \brief This class is GUI used to define the clipping parameters for the RP constast operation.
59  */
60  class TEQTWIDGETSEXPORT ClippingWizardPage : public QWizardPage
61  {
62  Q_OBJECT
63 
65  {
69  CLIPPING_LAYER
70  };
71 
72  public:
73 
74  ClippingWizardPage(QWidget* parent = 0);
75 
77 
78  bool isComplete() const;
79 
80  public:
81 
82  /*!
83  \brief This method is used to set the selected layer for clipping operation
84 
85  \param layer The layer ptr
86 
87  \note This layer MUST HAVE a valid raster object.
88  */
90 
91  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
92 
94 
95  void setActionGroup(QActionGroup* actionGroup);
96 
97  void getDimensionClipping(int& x, int& y, int& width, int& height);
98 
100 
102 
104 
106 
108 
110 
112 
113  std::vector<te::gm::Geometry*> getExtentClipping();
114 
116 
117  std::vector<te::gm::Geometry*> getLayerClipping();
118 
119  std::map<std::string, te::gm::Geometry*> getLayerClippingAttribute();
120 
121  void clearCanvas();
122 
123  void drawGeom();
124 
125  public slots:
126 
128 
130 
131  void onLayerComboBoxActivated(int index);
132 
134 
136 
138 
140 
142 
144 
146 
148 
149  protected:
150 
152 
153  private:
154 
155  void addRoiItem();
156 
157  private:
158 
159  std::unique_ptr<Ui::ClippingWizardPageForm> m_ui;
160  std::unique_ptr<te::qt::widgets::RpToolsWidget> m_navigator;
161 
163 
164  std::list<te::map::AbstractLayerPtr> m_layerList;
165 
167 
169 
170  std::vector<te::gm::Geometry*> m_geomVec;
171 
173 
174  int m_count;
175  };
176 
177  } // end namespace widgets
178  } // end namespace qt
179 } // end namespace te
180 
181 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLIPPINGWIZARDPAGE_H
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:51
This class is GUI used to define the clipping parameters for the RP constast operation.
void onStrategyTypeComboBoxActivated(int index)
te::gm::Envelope getLayerExtentClipping()
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
void setMapDisplay(te::qt::widgets::MapDisplay *mapDisplay)
std::vector< te::gm::Geometry * > getLayerClipping()
std::vector< te::gm::Geometry * > m_geomVec
std::unique_ptr< te::qt::widgets::RpToolsWidget > m_navigator
std::map< std::string, te::gm::Geometry * > getLayerClippingAttribute()
void onGeomAquired(te::gm::Polygon *poly)
std::vector< te::gm::Geometry * > getExtentClipping()
void setActionGroup(QActionGroup *actionGroup)
std::list< te::map::AbstractLayerPtr > m_layerList
void getDimensionClipping(int &x, int &y, int &width, int &height)
ClippingWizardPage(QWidget *parent=0)
void onEnvelopeAcquired(te::gm::Envelope env)
void onStrategyTypeComboBoxChanged(int index)
std::unique_ptr< Ui::ClippingWizardPageForm > m_ui
te::map::AbstractLayerPtr get()
void onExtentLayerComboBoxChanged(int index)
te::qt::widgets::MapDisplay * m_mapDisplay
void set(te::map::AbstractLayerPtr layer)
This method is used to set the selected layer for clipping operation.
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
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