All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
32 {
33  m_fill = new te::se::Fill();
34  m_stroke = new te::se::Stroke();
35 }
36 
38 : m_fill(fill),
39  m_stroke(stroke)
40 {
41 }
42 
44 {
45  delete m_fill;
46  delete m_stroke;
47 }
48 
50 {
52  style->setFill(this->getFill()->clone());
53  style->setStroke(this->getStroke()->clone());
54  return style;
55 }
56 
58 {
59  return m_fill;
60 }
61 
63 {
64  delete m_fill;
65  m_fill = newFill;
66 }
67 
69 {
70  return m_stroke;
71 }
72 
74 {
75  delete m_stroke;
76  m_stroke = newStroke;
77 }
78 
te::se::Fill * getFill()
Returns a pointer to the histogram bar's fill.
te::se::Fill * m_fill
The bar's fill .
te::se::Stroke * getStroke()
Returns a pointer to the histogram bar's stroke.
te::se::Stroke * m_stroke
The bar's stroke.
A class used to define the style of a histogram's chart.
HistogramStyle * clone()
Returns a pointer to a clone of this HistogramStyle.
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:59
void setFill(te::se::Fill *newFill)
It sets the histogram bar's fill.
A Stroke specifies the appearance of a linear geometry.
Definition: Stroke.h:67
void setStroke(te::se::Stroke *newStroke)
It sets the histogram bar's stroke.