Main Page
Modules
Namespaces
Classes
Files
File List
File Members
HistogramStyle.cpp
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/HistogramStyle.cpp
22
23
\brief A class used to define the style of a histogram's chart
24
*/
25
26
//Terralib
27
#include "../../../se/Fill.h"
28
#include "../../../se/Stroke.h"
29
#include "
HistogramStyle.h
"
30
31
te::qt::widgets::HistogramStyle::HistogramStyle
()
32
{
33
m_fill
=
new
te::se::Fill
();
34
m_stroke
=
new
te::se::Stroke
();
35
}
36
37
te::qt::widgets::HistogramStyle::HistogramStyle
(
te::se::Fill
* fill,
te::se::Stroke
* stroke)
38
:
m_fill
(fill),
39
m_stroke
(stroke)
40
{
41
}
42
43
te::qt::widgets::HistogramStyle::~HistogramStyle
()
44
{
45
delete
m_fill
;
46
delete
m_stroke
;
47
}
48
49
te::qt::widgets::HistogramStyle
*
te::qt::widgets::HistogramStyle::clone
()
50
{
51
te::qt::widgets::HistogramStyle
* style =
new
te::qt::widgets::HistogramStyle
();
52
style->
setFill
(this->
getFill
()->
clone
());
53
style->
setStroke
(this->
getStroke
()->
clone
());
54
return
style;
55
}
56
57
te::se::Fill
*
te::qt::widgets::HistogramStyle::getFill
()
58
{
59
return
m_fill
;
60
}
61
62
void
te::qt::widgets::HistogramStyle::setFill
(
te::se::Fill
* newFill)
63
{
64
delete
m_fill
;
65
m_fill
= newFill;
66
}
67
68
te::se::Stroke
*
te::qt::widgets::HistogramStyle::getStroke
()
69
{
70
return
m_stroke
;
71
}
72
73
void
te::qt::widgets::HistogramStyle::setStroke
(
te::se::Stroke
* newStroke)
74
{
75
delete
m_stroke
;
76
m_stroke
= newStroke;
77
}
78
te::qt::widgets::HistogramStyle::getFill
te::se::Fill * getFill()
Returns a pointer to the histogram bar's fill.
Definition:
HistogramStyle.cpp:57
te::qt::widgets::HistogramStyle::m_fill
te::se::Fill * m_fill
The bar's fill .
Definition:
HistogramStyle.h:118
te::qt::widgets::HistogramStyle::getStroke
te::se::Stroke * getStroke()
Returns a pointer to the histogram bar's stroke.
Definition:
HistogramStyle.cpp:68
te::qt::widgets::HistogramStyle::m_stroke
te::se::Stroke * m_stroke
The bar's stroke.
Definition:
HistogramStyle.h:119
HistogramStyle.h
A class used to define the style of a histogram's chart.
te::qt::widgets::HistogramStyle::clone
HistogramStyle * clone()
Returns a pointer to a clone of this HistogramStyle.
Definition:
HistogramStyle.cpp:49
te::qt::widgets::HistogramStyle::HistogramStyle
HistogramStyle()
Constructor.
Definition:
HistogramStyle.cpp:31
te::se::Fill
A Fill specifies the pattern for filling an area geometry.
Definition:
Fill.h:59
te::qt::widgets::HistogramStyle::setFill
void setFill(te::se::Fill *newFill)
It sets the histogram bar's fill.
Definition:
HistogramStyle.cpp:62
te::se::Stroke
A Stroke specifies the appearance of a linear geometry.
Definition:
Stroke.h:67
te::qt::widgets::HistogramStyle
Definition:
HistogramStyle.h:49
te::qt::widgets::HistogramStyle::~HistogramStyle
~HistogramStyle()
Destructor.
Definition:
HistogramStyle.cpp:43
te::qt::widgets::HistogramStyle::setStroke
void setStroke(te::se::Stroke *newStroke)
It sets the histogram bar's stroke.
Definition:
HistogramStyle.cpp:73
terralib5_src
src
terralib
qt
widgets
charts
HistogramStyle.cpp
Generated on Wed Jun 6 2018 12:16:09 for TerraLib by
1.8.11