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
te::qt::widgets::ArithmeticOpDialogForm::onAddPushButtonClicked
void onAddPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onN4PushButtonClicked
void onN4PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::m_bandsVec
std::vector< std::string > m_bandsVec
Definition: ArithmeticOpDialogForm.h:168
te::qt::widgets::ArithmeticOpDialogForm::m_ui
std::unique_ptr< Ui::ArithmeticOpDialogForm > m_ui
Definition: ArithmeticOpDialogForm.h:158
te::qt::widgets::ArithmeticOpDialogForm::onN9PushButtonClicked
void onN9PushButtonClicked()
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::qt::widgets::ArithmeticOpDialogForm::onLnPushButtonClicked
void onLnPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onSubPushButtonClicked
void onSubPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onMultPushButtonClicked
void onMultPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::paramsFromOpUserdDef
te::rp::ArithmeticOperations::InputParameters paramsFromOpUserdDef()
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::qt::widgets::ArithmeticOpDialogForm::getBandsVec
std::vector< std::string > getBandsVec()
te::qt::widgets::ArithmeticOpDialogForm::m_expressionHistoryCounter
int m_expressionHistoryCounter
Definition: ArithmeticOpDialogForm.h:156
te::qt::widgets::ArithmeticOpDialogForm::onN5PushButtonClicked
void onN5PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::closeEvent
void closeEvent(QCloseEvent *e)
te::qt::widgets::ArithmeticOpDialogForm::onN7PushButtonClicked
void onN7PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::execute
bool execute()
te::qt::widgets::ArithmeticOpDialogForm::getMapLayer
std::map< std::string, te::map::AbstractLayer * > getMapLayer()
te::qt::widgets::ArithmeticOpDialogForm::updateExpressionHistory
void updateExpressionHistory()
te::qt::widgets::ArithmeticOpDialogForm::onSqrtPushButtonClicked
void onSqrtPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onN1PushButtonClicked
void onN1PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::m_layer
te::map::AbstractLayer * m_layer
Definition: ArithmeticOpDialogForm.h:162
OutputRasterWidget.h
This file has the OutputRasterWidget class.
te::qt::widgets::ArithmeticOpDialogForm::loadDefaultOperations
void loadDefaultOperations()
te::qt::widgets::ArithmeticOpDialogForm::isComplete
bool isComplete() const
te::qt::widgets::ArithmeticOpDialogForm::onACosPushButtonClicked
void onACosPushButtonClicked()
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::qt::widgets::ArithmeticOpDialogForm::onCePushButtonClicked
void onCePushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onN6PushButtonClicked
void onN6PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::m_outputWidget
te::qt::widgets::OutputRasterWidget * m_outputWidget
Definition: ArithmeticOpDialogForm.h:152
te::qt::widgets::ArithmeticOpDialogForm::onN3PushButtonClicked
void onN3PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::getUserDefinedExpression
std::string getUserDefinedExpression()
te::qt::widgets::ArithmeticOpDialogForm::addLayer
void addLayer(te::map::AbstractLayerPtr layer)
te::qt::widgets::ArithmeticOpDialogForm::onAddLayerPushButtonClicked
void onAddLayerPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::m_outputLayer
te::map::AbstractLayerPtr m_outputLayer
Definition: ArithmeticOpDialogForm.h:164
te::qt::widgets::ArithmeticOpDialogForm::onTanPushButtonClicked
void onTanPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::m_nLayer
int m_nLayer
Definition: ArithmeticOpDialogForm.h:174
Ui
Definition: ConfigInputAddressDialog.h:44
te::qt::widgets::ArithmeticOpDialogForm::onDivPushButtonClicked
void onDivPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onExpPushButtonClicked
void onExpPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onCPushButtonClicked
void onCPushButtonClicked()
te::map::AbstractLayer
This is the base class for layers.
Definition: AbstractLayer.h:78
te::qt::widgets::ArithmeticOpDialogForm::onSearchLayerToolButtonPressed
void onSearchLayerToolButtonPressed()
slots
#define slots
Definition: VirtualMachine.h:48
te::qt::widgets::ArithmeticOpDialogForm::ArithmeticOpDialogForm
ArithmeticOpDialogForm(QWidget *parent=0)
te::rp::ArithmeticOperations::InputParameters
ArithmeticOperations input parameters.
Definition: ArithmeticOperations.h:88
te::qt::widgets::ArithmeticOpDialogForm::m_operation
std::string m_operation
Definition: ArithmeticOpDialogForm.h:170
te::qt::widgets::ArithmeticOpDialogForm::m_userPath
std::string m_userPath
Definition: ArithmeticOpDialogForm.h:172
te::qt::widgets::ArithmeticOpDialogForm::m_layerList
std::list< te::map::AbstractLayerPtr > m_layerList
Definition: ArithmeticOpDialogForm.h:160
te::qt::widgets::ArithmeticOpDialogForm::onLoadPushButtonClicked
void onLoadPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onParRightPushButtonClicked
void onParRightPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onN2PushButtonClicked
void onN2PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onSavePushButtonClicked
void onSavePushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onDotPushButtonClicked
void onDotPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onCosPushButtonClicked
void onCosPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::setUserPath
void setUserPath(std::string path)
te::qt::widgets::ArithmeticOpDialogForm::onSinPushButtonClicked
void onSinPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::closeTool
void closeTool()
te::qt::widgets::ArithmeticOpDialogForm::onSignalPushButtonClicked
void onSignalPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::~ArithmeticOpDialogForm
~ArithmeticOpDialogForm()
te::qt::widgets::OutputRasterWidget
This class is used to set output layer.
Definition: OutputRasterWidget.h:57
te::qt::widgets::ArithmeticOpDialogForm::getOutputLayer
te::map::AbstractLayerPtr getOutputLayer()
te::qt::widgets::ArithmeticOpDialogForm::onN0PushButtonClicked
void onN0PushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::getRasterBands
void getRasterBands(QComboBox *layer, int index, QComboBox *band)
te::qt::widgets::ArithmeticOpDialogForm::setList
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
te::qt::widgets::ArithmeticOpDialogForm::onParLeftPushButtonClicked
void onParLeftPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm
This class is GUI used to define the arithmeticOp parameters for the RP arithmeticOp operation.
Definition: ArithmeticOpDialogForm.h:61
te::qt::widgets::ArithmeticOpDialogForm::m_mapLayer
std::map< std::string, te::map::AbstractLayer * > m_mapLayer
Definition: ArithmeticOpDialogForm.h:166
te::qt::widgets::ArithmeticOpDialogForm::getExpression
std::string getExpression()
te::qt::widgets::ArithmeticOpDialogForm::onASinPushButtonClicked
void onASinPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onLogPushButtonClicked
void onLogPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onATanPushButtonClicked
void onATanPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::onOkPushButtonClicked
void onOkPushButtonClicked()
te::qt::widgets::ArithmeticOpDialogForm::m_expressionHistory
std::vector< std::string > m_expressionHistory
Definition: ArithmeticOpDialogForm.h:154
te::qt::widgets::ArithmeticOpDialogForm::onN8PushButtonClicked
void onN8PushButtonClicked()