StringScaleDraw.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/StringScaleDraw.h
22
23
\brief A class to represent a set of labels to be used on a histogram's chart.
24
*/
25
26
#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_STRINGSCALEDRAW_H
27
#define __TERRALIB_QT_WIDGETS_INTERNAL_STRINGSCALEDRAW_H
28
29
//TerraLib
30
#include "../Config.h"
31
32
//QWT
33
#include <qwt_scale_draw.h>
34
35
//STL
36
#include <set>
37
38
namespace
te
39
{
40
namespace
qt
41
{
42
namespace
widgets
43
{
44
class
TEQTWIDGETSEXPORT
StringScaleDraw
:
public
QwtScaleDraw
45
{
46
public
:
47
48
/*!
49
\brief Constructor
50
51
It constructs a StringScaleDraw.
52
53
\param labels the list of labels as a set of QStrings
54
55
\note It will not take the ownership of the pointers.
56
*/
57
StringScaleDraw
(std::set<QString>& labels);
58
59
/*!
60
\brief Constructor
61
62
It constructs a StringScaleDraw.
63
64
\param labels the list of labels as a set of Strings
65
66
\note It will not take the ownership of the pointers.
67
*/
68
StringScaleDraw
(std::set<std::string>& labels);
69
70
/*! \brief Destructor. */
71
~StringScaleDraw
();
72
73
/*!
74
\brief It returns the list containing the labels.
75
76
\return The list containing the labels.
77
78
*/
79
80
std::set<QString>&
getLabels
();
81
82
/*!
83
\brief It sets the list containing the labels.
84
85
\param new_labels The new list of labels.
86
*/
87
88
void
setLabels
( std::set<QString> new_labels);
89
90
/*!
91
\brief It returns the label at the given index
92
93
\param new_labels The new list of labels.
94
*/
95
96
virtual
QwtText
label
(
double
value )
const
;
97
98
private
:
99
100
std::set<QString>
m_labels
;
//!< A set of label values
101
};
102
}
// end namespace widgets
103
}
// end namespace qt
104
}
// end namespace te
105
106
#endif
// __TERRALIB_QT_WIDGETS_INTERNAL_STRINGSCALEDRAW_H
te::qt::widgets::StringScaleDraw
Definition:
StringScaleDraw.h:45
te::qt::widgets::StringScaleDraw::setLabels
void setLabels(std::set< QString > new_labels)
It sets the list containing the labels.
te::qt::widgets::StringScaleDraw::m_labels
std::set< QString > m_labels
A set of label values.
Definition:
StringScaleDraw.h:100
te::qt::widgets::StringScaleDraw::getLabels
std::set< QString > & getLabels()
It returns the list containing the labels.
te::qt::widgets::StringScaleDraw::StringScaleDraw
StringScaleDraw(std::set< QString > &labels)
Constructor.
te::qt::widgets::StringScaleDraw::~StringScaleDraw
~StringScaleDraw()
Destructor.
te::qt::widgets::StringScaleDraw::StringScaleDraw
StringScaleDraw(std::set< std::string > &labels)
Constructor.
te::qt::widgets::StringScaleDraw::label
virtual QwtText label(double value) const
It returns the label at the given index.
te
TerraLib.
Definition:
AddressGeocodingOp.h:52
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:63
git_release
src
terralib
qt
widgets
charts
StringScaleDraw.h
Generated on Mon Dec 19 2022 08:37:06 for TerraLib by
1.9.1