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