HistogramDialog.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/HistogramDialog.h
22 
23  \brief A dialog used to define the basic parameters of a new histogram.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_HISTOGRAMDIALOG_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_HISTOGRAMDIALOG_H
28 
29 //TerraLib
30 #include "../Config.h"
31 
32 // Qt
33 #include <QDialog>
34 
35 //STL
36 #include <memory>
37 
38 namespace Ui { class ChartDialogForm; }
39 
40 namespace te
41 {
42  //forward declarations
43  namespace map { class AbstractLayer; }
44 
45  namespace qt
46  {
47  namespace widgets
48  {
49 
50  //forward declarations
51  class ChartDisplayWidget;
52  class HistogramDataWidget;
53 
54  /*!
55  \class HistogramDialog
56 
57  \brief A Dialog used to customize a Histogram parameters and generate it's ChartDisplayWidget.
58  */
59  class TEQTWIDGETSEXPORT HistogramDialog : public QDialog
60  {
61 
62  Q_OBJECT
63 
64  public:
65 
66  /*!
67  \brief Constructor
68 
69  \param layer The layer that will be used to generate a histogram.
70  \param parent this widget's parent
71  \param f Window flags used to configure this dialog
72  */
73  HistogramDialog(te::map::AbstractLayerPtr layer, QWidget* parent = 0, Qt::WindowFlags f = 0);
74 
75  /*!
76  \brief Destructor
77  */
78  ~HistogramDialog();
79 
80  /*!
81  \brief Returns a pointer to the generated ChartDisplayWidget
82 
83  \return A ChartDisplayWidget type pointer to the generated chart.
84  \note The caller will take ownership of the returned pointer.
85  */
86  te::qt::widgets::ChartDisplayWidget* getDisplayWidget();
87 
88  protected slots:
89 
90  void onOkPushButtonClicked();
91 
92  private:
93 
94  std::unique_ptr<Ui::ChartDialogForm> m_ui; //!< The dialog form.
95  HistogramDataWidget* m_histogramDataWidget; //!< The histogram's data widget used to configure the basic parameters of the new histogram.
96  ChartDisplayWidget* m_displayWidget; //!< The display's widget that will be populated by this widget.
97  };
98  } // end namespace widgets
99  } // end namespace qt
100 } // end namespace te
101 
102 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_HISTOGRAMDIALOG_H
A widget used to adjust a histogram&#39;s input data.
#define slots
ChartDisplayWidget * m_displayWidget
The display&#39;s widget that will be populated by this widget.
HistogramDataWidget * m_histogramDataWidget
The histogram&#39;s data widget used to configure the basic parameters of the new histogram.
URI C++ Library.
std::unique_ptr< Ui::ChartDialogForm > m_ui
The dialog form.
A wdiget used to display a chart.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
A Dialog used to customize a Histogram parameters and generate it&#39;s ChartDisplayWidget.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr