Loading...
Searching...
No Matches
HistogramDataWidget.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/charts/HistogramDataWidget.h
22
23 \brief A widget used to adjust a histogram's input data.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_HISTOGRAMDATAWIDGET_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_HISTOGRAMDATAWIDGET_H
28
29//TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../maptools/AbstractLayer.h"
32#endif
33#include "../Config.h"
34
35// Qt
36#include <QWidget>
37
38//STL
39#include <memory>
40
41namespace Ui { class HistogramDataWidgetForm; }
42
43namespace te
44{
45
46 namespace qt
47 {
48 namespace widgets
49 {
50
51 //forward declarations
52 class Histogram;
53 class ChartDisplay;
54
55 /*!
56 \class HistogramDataWidget
57
58 \brief A widget used to adjust a histogram's input data.
59 */
61 {
62
63 Q_OBJECT
64
65 public:
66
67 /*!
68 \brief Constructor
69
70 \param layer The layer that will be used to generate a histogram.
71 \param parent this widget's parent
72 \param f Window flags used to configure this widget
73 */
74 HistogramDataWidget(te::map::AbstractLayerPtr layer, QWidget* parent = 0, Qt::WindowFlags f = 0);
75
76 /*!
77 \brief Destructor
78 */
80
81 /*!
82 \brief Returns a pointer to the widget's form
83
84 \return A HistogramDataWidgetForm type pointer to the widget's form.
85 \note The caller will not take ownership of the returned pointer.
86 */
87 Ui::HistogramDataWidgetForm* getForm();
88
89 /*!
90 \brief Returns a pointer to the widget's form
91
92 \return A HistogramDataWidgetForm type pointer to the widget's form.
93 \note The caller will take ownership of the returned pointer.
94 */
96
97 /*!
98 \brief Sets the property to be used in order to generate the histogram
99
100 \note This function is intented to prevent the user from selecting a property through this widget in special cases,
101 if that is not the intended behaviour, do not call this function.
102 */
103 void setHistogramProperty(int propId);
104
105 /*!
106 \brief Returns the name of the chosen summary function. Default is None
107
108 \return The name of the chosen summary function.
109 */
110 std::string getSummaryFunction();
111
112 protected slots:
113
115
117
118 private:
119
120 std::unique_ptr<Ui::HistogramDataWidgetForm> m_ui; //!< The widget's form.
121 te::map::AbstractLayerPtr m_layer; //!< The layer that will be used to generate the histogram chart.
122 };
123 } // end namespace widgets
124 } // end namespace qt
125} // end namespace te
126
127#endif // __TERRALIB_QT_WIDGETS_INTERNAL_HISTOGRAMDATAWIDGET_H
A widget used to adjust a histogram's input data.
void onReadAllCheckBoxStateChanged(int state)
Ui::HistogramDataWidgetForm * getForm()
Returns a pointer to the widget's form.
void onPropertyComboBoxIndexChanged(QString text)
HistogramDataWidget(te::map::AbstractLayerPtr layer, QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
te::map::AbstractLayerPtr m_layer
The layer that will be used to generate the histogram chart.
std::unique_ptr< Ui::HistogramDataWidgetForm > m_ui
The widget's form.
std::string getSummaryFunction()
Returns the name of the chosen summary function. Default is None.
te::qt::widgets::Histogram * getHistogram()
Returns a pointer to the widget's form.
void setHistogramProperty(int propId)
Sets the property to be used in order to generate the histogram.
A class to represent a Histogram.
Definition: Histogram.h:57
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