ArithmeticOpDialogForm.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/ArithmeticOpDialogForm.h
22 
23  \brief This file defines a class for a ArithmeticOp Dialog.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_ARITHMETICOPDIALOGFORM_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_ARITHMETICOPDIALOGFORM_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../../maptools/AbstractLayer.h"
32 #include "../../../rp/ArithmeticOperations.h"
33 #endif
34 #include "../Config.h"
35 
36 #include "OutputRasterWidget.h"
37 
38 // STL
39 #include <memory>
40 
41 // Qt
42 #include <QComboBox>
43 #include <QDialog>
44 
45 
46 // Forward declaration
47 namespace Ui { class ArithmeticOpDialogForm; }
48 
49 namespace te
50 {
51  namespace qt
52  {
53  namespace widgets
54  {
55  /*!
56  \class ArithmeticOpDialogForm
57 
58  \brief This class is GUI used to define the arithmeticOp parameters for the RP arithmeticOp operation.
59  */
61  {
62  Q_OBJECT
63 
64  public:
65 
66  ArithmeticOpDialogForm(QWidget* parent = 0);
67 
69 
70  bool isComplete() const;
71 
72  public:
73 
74  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
75 
76  void setUserPath(std::string path);
77 
78  std::string getUserDefinedExpression();
79 
80  std::string getExpression();
81 
83 
84  std::map<std::string, te::map::AbstractLayer*> getMapLayer();
85 
86  std::vector<std::string> getBandsVec();
87 
89 
90  void closeEvent(QCloseEvent* e);
91 
92  public slots:
93 
96 
109 
122 
131 
133 
134  signals:
135 
137 
138  void closeTool();
139 
140  protected:
141 
142  void getRasterBands(QComboBox* layer, int index, QComboBox* band);
143 
145 
147 
148  bool execute();
149 
150  private:
151 
153 
154  std::vector<std::string> m_expressionHistory;
155 
157 
158  std::unique_ptr<Ui::ArithmeticOpDialogForm> m_ui;
159 
160  std::list<te::map::AbstractLayerPtr> m_layerList;
161 
163 
165 
166  std::map<std::string, te::map::AbstractLayer*> m_mapLayer;
167 
168  std::vector<std::string> m_bandsVec;
169 
170  std::string m_operation;
171 
172  std::string m_userPath;
173 
174  int m_nLayer;
175  };
176 
177  } // end namespace widgets
178  } // end namespace qt
179 } // end namespace te
180 
181 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_ARITHMETICOPDIALOGFORM_H
This file has the OutputRasterWidget class.
This is the base class for layers.
Definition: AbstractLayer.h:78
This class is GUI used to define the arithmeticOp parameters for the RP arithmeticOp operation.
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
te::map::AbstractLayerPtr getOutputLayer()
te::qt::widgets::OutputRasterWidget * m_outputWidget
std::list< te::map::AbstractLayerPtr > m_layerList
std::vector< std::string > getBandsVec()
std::map< std::string, te::map::AbstractLayer * > getMapLayer()
void getRasterBands(QComboBox *layer, int index, QComboBox *band)
void addLayer(te::map::AbstractLayerPtr layer)
te::rp::ArithmeticOperations::InputParameters paramsFromOpUserdDef()
std::map< std::string, te::map::AbstractLayer * > m_mapLayer
std::unique_ptr< Ui::ArithmeticOpDialogForm > m_ui
This class is used to set output layer.
ArithmeticOperations input parameters.
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