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 "../core/Config.h"
31 #include "../core/Enums.h"
32 
33 // STL
34 #include <list>
35 #include <map>
36 #include <memory>
37 
38 // Qt
39 #include <QDialog>
40 
41 namespace Ui { class StatisticsDialogForm; }
42 
43 // Forward declarations
44 class QTableView;
45 
46 namespace te
47 {
48  namespace da
49  {
50  class DataSet;
51  }
52 }
53 
54 namespace te
55 {
56  namespace stat
57  {
58  class TESTATEXPORT StatisticsDialog : public QDialog
59  {
60  Q_OBJECT
61 
62  public:
63 
64  StatisticsDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
65 
67 
68  void setStatistics(te::da::DataSet* dataSet, const std::string prop);
69 
70  std::size_t getPropertyIndex();
71 
72  std::vector<std::string> getStringData(const int propType);
73 
74  std::vector<double> getNumericData(const int proType);
75 
76  private:
77 
78  protected slots:
79 
80  void onSavePushButtonClicked();
81 
82  void onCancelPushButtonClicked();
83 
84  private:
85 
86  typedef std::map<te::stat::StatisticalSummary, std::string> StaticalSummaryMap;
87 
88  std::auto_ptr<Ui::StatisticsDialogForm> m_ui;
90  std::string m_prop;
91  };
92  } // end namespace stat
93 } // end namespace te
94 
95 #endif // __TERRALIB_STATISTICAL_INTERNAL_STATISTICSDIALOG_H
std::map< te::stat::StatisticalSummary, std::string > StaticalSummaryMap
URI C++ Library.
#define TESTATEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
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