ArithmeticOpWizard.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/ArithmeticOpWizard.h
22 
23  \brief A Qt dialog that allows users to run a arithmeticOp operation defined by RP module.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_ARITHMETICOPWIZARD_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_ARITHMETICOPWIZARD_H
28 
29 // TerraLib
30 #include "../../../maptools/AbstractLayer.h"
31 #include "../../../raster/Raster.h"
32 #include "../../../rp/ArithmeticOperations.h"
33 #include "../Config.h"
34 
35 // STL
36 #include <memory>
37 
38 // Qt
39 #include <QWizard>
40 
41 namespace te
42 {
43  namespace qt
44  {
45  namespace widgets
46  {
47  class ArithmeticOpWizardPage;
48  class LayerSearchWizardPage;
49  class RasterInfoWizardPage;
50 
51  /*!
52  \class ArithmeticOpWizard
53 
54  \brief This class is GUI used to define the arithmeticOp wizard for the RP arithmeticOp operation.
55  */
56  class TEQTWIDGETSEXPORT ArithmeticOpWizard : public QWizard
57  {
58  public:
60  {
61  ARITH_OP_TYPE_1, /* GAIN * A + OFFSET */
62  ARITH_OP_TYPE_2, /* GAIN * (A + B ) + OFFSET */
63  ARITH_OP_TYPE_3, /* GAIN * (A - B ) + OFFSET */
64  ARITH_OP_TYPE_4, /* GAIN * (A * B ) + OFFSET*/
65  ARITH_OP_TYPE_5, /* GAIN * (A / B ) + OFFSET */
66  ARITH_OP_TYPE_6, /* (GAIN * (A - B ) / ( A + B )) + OFFSET */
67  ARITH_OP_TYPE_USER_DEFINED
68  };
69 
70  public:
71 
72  ArithmeticOpWizard(QWidget* parent);
73 
75 
76  public:
77 
78  virtual bool validateCurrentPage();
79 
80  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
81 
82  te::map::AbstractLayerPtr getOutputLayer();
83 
84  protected:
85 
86  void addPages();
87 
88  bool execute();
89 
91 
93 
95 
97 
99 
101 
102  te::rp::ArithmeticOperations::InputParameters paramsFromOpUserdDef();
103 
104  private:
105 
106  std::auto_ptr<te::qt::widgets::ArithmeticOpWizardPage> m_arithmeticOpPage;
107  std::auto_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage;
108  std::auto_ptr<te::qt::widgets::RasterInfoWizardPage> m_rasterInfoPage;
109 
111  };
112  } // end namespace widgets
113  } // end namespace qt
114 } // end namespace te
115 
116 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_ARITHMETICOPWIZARD_H
std::auto_ptr< te::qt::widgets::RasterInfoWizardPage > m_rasterInfoPage
This class is GUI used to define the arithmeticOp wizard for the RP arithmeticOp operation.
URI C++ Library.
std::auto_ptr< te::qt::widgets::ArithmeticOpWizardPage > m_arithmeticOpPage
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::map::AbstractLayerPtr m_outputLayer
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
ArithmeticOperations input parameters.
std::auto_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage