All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StatisticsDialog.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/statistics/qt/StatisticsDialog.h
22 
23  \brief A dialog statistics
24 */
25 
26 #ifndef __TERRALIB_STATISTICAL_INTERNAL_STATISTICSDIALOG_H
27 #define __TERRALIB_STATISTICAL_INTERNAL_STATISTICSDIALOG_H
28 
29 // TerraLib
30 #include "../../dataaccess/dataset/DataSet.h"
31 #include "../../maptools/AbstractLayer.h"
32 #include "../core/Config.h"
33 #include "../core/Enums.h"
34 
35 // STL
36 #include <list>
37 #include <map>
38 #include <memory>
39 
40 // Qt
41 #include <QDialog>
42 
43 namespace Ui { class StatisticsDialogForm; }
44 
45 // Forward declarations
46 class QTableView;
47 
48 namespace te
49 {
50  namespace stat
51  {
52  class TESTATEXPORT StatisticsDialog : public QDialog
53  {
54  Q_OBJECT
55 
56  public:
57 
58  StatisticsDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
59 
61 
62  void setStatistics(te::da::DataSet* dataSet, const std::string prop);
63 
64  std::size_t getPropertyIndex();
65 
66  std::vector<std::string> getStringData(const int propType);
67 
68  std::vector<double> getNumericData(const int proType);
69 
70  private:
71 
72  protected slots:
73 
74  void onSavePushButtonClicked();
75 
76  void onCancelPushButtonClicked();
77 
78  private:
79 
80  typedef std::map<te::stat::StatisticalSummary, std::string> StaticalSummaryMap;
81 
82  std::auto_ptr<Ui::StatisticsDialogForm> m_ui;
84  std::string m_prop;
85  };
86  } // end namespace stat
87 } // end namespace te
88 
89 #endif // __TERRALIB_STATISTICAL_INTERNAL_STATISTICSDIALOG_H
std::map< te::stat::StatisticalSummary, std::string > StaticalSummaryMap
#define TESTATEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:64
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
std::auto_ptr< Ui::StatisticsDialogForm > m_ui