Loading...
Searching...
No Matches
ChartStyleWidget.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/chartStyleWidget.h
22
23 \brief A widget used to customize the style parameters of a chart
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_CHARTSTYLEWIDGET_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_CHARTSTYLEWIDGET_H
28
29//TerraLib
30#include "../Config.h"
31
32// Qt
33#include <QDialog>
34
35//STL
36#include <memory>
37
38namespace Ui { class chartStyleWidgetForm; }
39
40namespace te
41{
42 namespace qt
43 {
44 namespace widgets
45 {
46
47 class ColorPickerToolButton;
48 class ChartStyle;
49 class ChartDisplay;
50
51 /*!
52 \class Chart Style
53
54 \brief A wdiget used to customize a chart's style parameters.
55 */
56 class TEQTWIDGETSEXPORT ChartStyleWidget : public QWidget
57 {
58
59 Q_OBJECT
60
61 public:
62
63 /*!
64 \brief Constructor
65
66 It constructs a ChartStyleWidget.
67
68 \param parent this widget's parent
69 \param f Window flags used to configure this widget
70 \param title The title to be configured, defaults to an empty title.
71 \param PropertyX The label of the x axis to be configured, defaults to an empty label.
72 \param PropertyY The label of the y axis to be configured, defaults to an empty label.
73 */
74 ChartStyleWidget(QWidget* parent = 0, Qt::WindowFlags f = 0, QString title = "", QString PropertyX = "", QString PropertyY = "");
75
76 /*!
77 \brief Destructor
78 */
80
81 /*!
82 \brief Returns a pointer to the ChartStyle being configured
83
84 \return A ChartStyle type pointer to the style being configured
85 \note The caller will take ownership of the returned pointer.
86 */
88
89 /*!
90 \brief It sets the ChartStyle being configured
91
92 \param newStyle The new ChartStyle.
93 \note It will not take ownership of the given pointer
94 */
96
97 protected slots:
98
104 void onGridCheckBoxToggled(int state);
105 void onColorChanged(const QColor& color);
106
107 private:
108
109 std::unique_ptr<Ui::chartStyleWidgetForm> m_ui; //!< The widget form.
110 ColorPickerToolButton* m_colorPicker; //!< The color picker used to customise the color of several chart parameters.
111 ChartStyle* m_chartStyle; //!< The display's style that will be configured by this dialog.
112 };
113 } // end namespace widgets
114 } // end namespace qt
115} // end namespace te
116
117#endif // __TERRALIB_QT_WIDGETS_INTERNAL_CHARTSTYLEWIDGET_H
ChartStyleWidget(QWidget *parent=0, Qt::WindowFlags f=0, QString title="", QString PropertyX="", QString PropertyY="")
Constructor.
void setStyle(te::qt::widgets::ChartStyle *newStyle)
It sets the ChartStyle being configured.
void onColorChanged(const QColor &color)
te::qt::widgets::ChartStyle * getStyle()
Returns a pointer to the ChartStyle being configured.
ColorPickerToolButton * m_colorPicker
The color picker used to customise the color of several chart parameters.
ChartStyle * m_chartStyle
The display's style that will be configured by this dialog.
std::unique_ptr< Ui::chartStyleWidgetForm > m_ui
The widget form.
Custom tool button used to pick a color.
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