PostClassificationDialogForm.cpp
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/PostClassificationDialogForm.h
22 
23  \brief This file has the PostClassificationDialogForm class.
24 */
25 
26 // TerraLib
27 #include "../../../common/progress/ProgressManager.h"
28 #include "../../../common/StringUtils.h"
29 #include "../../../dataaccess/dataset/DataSet.h"
30 #include "../../../dataaccess/dataset/DataSetType.h"
31 #include "../../../dataaccess/utils/Utils.h"
32 #include "../../../geometry/Utils.h"
33 #include "../../../maptools/Utils.h"
34 #include "../../../raster/RasterProperty.h"
35 #include "../../../se/CoverageStyle.h"
36 #include "../../../se/Utils.h"
37 #include "../progress/ProgressViewerDialog.h"
39 #include "Utils.h"
40 #include "ui_PostClassificationDialogForm.h"
41 
42 //QT
43 #include <QApplication>
44 #include <QGridLayout>
45 #include <QMessageBox>
46 #include <QCheckBox>
47 
49  : QDialog(parent),
51 {
52 //build form
53  m_ui->setupUi(this);
54 
55  //build input layer
56  QGridLayout* postClassLayout = new QGridLayout(m_ui->m_postClassWidget);
57  postClassLayout->setContentsMargins(0, 0, 0, 0);
59  postClassLayout->addWidget(m_postClassWidget);
60 
61  m_ui->m_helpPushButton->setNameSpace("dpi.inpe.br.plugins");
62  m_ui->m_helpPushButton->setPageReference("plugins/rp/rp_postClassification.html");
63 
64  //connects
65  connect(m_ui->m_okPushButton, SIGNAL(clicked()), SLOT(onOkPushButtonClicked()));
67 }
68 
70  default;
71 
72 void te::qt::widgets::PostClassificationDialogForm::setList(std::list<te::map::AbstractLayerPtr>& layerList)
73 {
74  m_postClassWidget->setList(layerList);
75 }
76 
78 {
79  if (!m_postClassWidget->execute())
80  return;
81 
82  accept();
83 }
84 
86 {
87  emit addLayer(layer);
88 }
89 
91  QCloseEvent* /*e*/)
92 {
93  delete m_postClassWidget;
94 
95  emit closeTool();
96 }
void addLayer(te::map::AbstractLayerPtr layer)
void addOuputLayer(te::map::AbstractLayerPtr outputLayer)
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
te::qt::widgets::PostClassificationWidget * m_postClassWidget
std::unique_ptr< Ui::PostClassificationDialogForm > m_ui
This class is used to make post classification.
Utility functions for the data access module.
This file has the PostClassificationDialogForm class.
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr