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 #endif
34 #include "../Config.h"
35 
36 // STL
37 #include <memory>
38 
39 // Qt
40 #include <QWizardPage>
41 
42 // Forward declaration
43 namespace Ui { class ClippingWizardPageForm; }
44 
45 namespace te
46 {
47  namespace qt
48  {
49  namespace widgets
50  {
51  class RasterNavigatorWidget;
52 
53  /*!
54  \class ClippingWizardPage
55 
56  \brief This class is GUI used to define the clipping parameters for the RP constast operation.
57  */
58  class TEQTWIDGETSEXPORT ClippingWizardPage : public QWizardPage
59  {
60  Q_OBJECT
61 
63  {
66  CLIPPING_LAYER
67  };
68 
69  public:
70 
71  ClippingWizardPage(QWidget* parent = 0);
72 
74 
75  bool isComplete() const;
76 
77  public:
78 
79  /*!
80  \brief This method is used to set the selected layer for clipping operation
81 
82  \param layer The layer ptr
83 
84  \note This layer MUST HAVE a valid raster object.
85  */
86  void set(te::map::AbstractLayerPtr layer);
87 
88  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
89 
91 
92  bool isExtentClipping();
93 
94  bool isDimensionClipping();
95 
96  bool isLayerClipping();
97 
98  bool isSingleRasterResult();
99 
100  void getExtentClipping(te::gm::Envelope& env);
101 
102  void getDimensionClipping(int& x, int& y, int& width, int& height);
103 
104  void getLayerClipping( std::auto_ptr< te::gm::GeometryCollection >& geomColl);
105 
106  public slots:
107 
108  void onStrategyTypeComboBoxActivated(int index);
109 
110  void onStrategyTypeComboBoxChanged(int index);
111 
112  void onLayerComboBoxActivated(int index);
113 
114  void onLayerComboBoxChanged(int index);
115 
116  void onEnvelopeAcquired(te::gm::Envelope env);
117 
118  void drawGeom();
119 
120  protected:
121 
122  void fillClippingTypes();
123 
124  private:
125 
126  std::auto_ptr<Ui::ClippingWizardPageForm> m_ui;
127  std::auto_ptr<te::qt::widgets::RasterNavigatorWidget> m_navigator;
128 
130 
133  };
134 
135  } // end namespace widgets
136  } // end namespace qt
137 } // end namespace te
138 
139 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLIPPINGWIZARDPAGE_H
std::auto_ptr< Ui::ClippingWizardPageForm > m_ui
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
URI C++ Library.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::auto_ptr< te::qt::widgets::RasterNavigatorWidget > m_navigator
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
This class is GUI used to define the clipping parameters for the RP constast operation.