Main Page
Modules
Namespaces
Classes
Files
File List
File Members
ChartStyle.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/ChartStyle.cpp
22
23
\brief A class used to define a chart's style
24
*/
25
26
//Terralib
27
#include "../../../se/Fill.h"
28
#include "../../../se/Stroke.h"
29
#include "
ChartStyle.h
"
30
31
//QT
32
#include "qcolor.h"
33
34
te::qt::widgets::ChartStyle::ChartStyle
()
35
{
36
m_title
=
"Chart"
;
37
m_titleFont
= QFont(
"Arial"
, 16,
QFont::Bold
);
38
m_axisX
=
"Property X"
;
39
m_axisY
=
"Property Y"
;
40
m_axisFont
= QFont(
"Arial"
, 14);
41
m_fill
=
new
te::se::Fill
();
42
m_stroke
=
new
te::se::Stroke
();
43
m_gridChecked
=
false
;
44
m_backColor
= QColor( Qt::white);
45
}
46
47
te::qt::widgets::ChartStyle::ChartStyle
(QString title, QFont titleFont, QString axisX, QString axisY, QFont axisFont,
te::se::Fill
* fill,
te::se::Stroke
* stroke,
bool
gridChecked, QColor color)
48
:
m_title
(title),
49
m_titleFont
(titleFont),
50
m_axisX
(axisX),
51
m_axisY
(axisY),
52
m_axisFont
(axisFont),
53
m_gridChecked
(gridChecked),
54
m_fill
(fill),
55
m_stroke
(stroke),
56
m_backColor
(color)
57
{
58
}
59
60
te::qt::widgets::ChartStyle::~ChartStyle
()
61
{
62
delete
m_fill
;
63
delete
m_stroke
;
64
}
65
66
QString&
te::qt::widgets::ChartStyle::getTitle
()
67
{
68
return
m_title
;
69
}
70
71
void
te::qt::widgets::ChartStyle::setTitle
(QString newTitle)
72
{
73
m_title
= newTitle;
74
}
75
76
QFont&
te::qt::widgets::ChartStyle::getTitleFont
()
77
{
78
return
m_titleFont
;
79
}
80
81
void
te::qt::widgets::ChartStyle::setTitleFont
(QFont newTitleFont)
82
{
83
m_titleFont
= newTitleFont;
84
}
85
86
QString&
te::qt::widgets::ChartStyle::getAxisX
()
87
{
88
return
m_axisX
;
89
}
90
91
void
te::qt::widgets::ChartStyle::setAxisX
(QString newAxisX)
92
{
93
m_axisX
= newAxisX;
94
}
95
96
QString&
te::qt::widgets::ChartStyle::getAxisY
()
97
{
98
return
m_axisY
;
99
}
100
101
void
te::qt::widgets::ChartStyle::setAxisY
(QString newAxisY)
102
{
103
m_axisY
= newAxisY;
104
}
105
106
QFont&
te::qt::widgets::ChartStyle::getAxisFont
()
107
{
108
return
m_axisFont
;
109
}
110
111
void
te::qt::widgets::ChartStyle::setAxisFont
(QFont newAxisFont)
112
{
113
m_axisFont
= newAxisFont;
114
}
115
116
117
te::se::Fill
*
te::qt::widgets::ChartStyle::getFill
()
118
{
119
return
m_fill
;
120
}
121
122
123
void
te::qt::widgets::ChartStyle::setFill
(
te::se::Fill
* newFill)
124
{
125
delete
m_fill
;
126
m_fill
= newFill;
127
}
128
129
te::se::Stroke
*
te::qt::widgets::ChartStyle::getStroke
()
130
{
131
return
m_stroke
;
132
}
133
134
void
te::qt::widgets::ChartStyle::setStroke
(
te::se::Stroke
* newStroke)
135
{
136
delete
m_stroke
;
137
m_stroke
= newStroke;
138
}
139
140
QColor&
te::qt::widgets::ChartStyle::getColor
()
141
{
142
return
m_backColor
;
143
}
144
145
void
te::qt::widgets::ChartStyle::setColor
(QColor newColor)
146
{
147
m_backColor
= newColor;
148
}
149
150
bool
te::qt::widgets::ChartStyle::getGridChecked
()
151
{
152
return
m_gridChecked
;
153
}
154
155
void
te::qt::widgets::ChartStyle::setGridChecked
(
bool
newGridChecked)
156
{
157
m_gridChecked
= newGridChecked;
158
}
te::qt::widgets::ChartStyle::setFill
void setFill(te::se::Fill *newFill)
It sets the style's fill.
Definition:
ChartStyle.cpp:123
te::qt::widgets::ChartStyle::setAxisFont
void setAxisFont(QFont newAxisFont)
It sets the axis' font.
Definition:
ChartStyle.cpp:111
te::qt::widgets::ChartStyle::getAxisX
QString & getAxisX()
Returns a reference to the style's x axis label.
Definition:
ChartStyle.cpp:86
te::qt::widgets::ChartStyle::m_axisFont
QFont m_axisFont
The axis' font.
Definition:
ChartStyle.h:220
te::qt::widgets::ChartStyle::getAxisFont
QFont & getAxisFont()
Returns a reference to the axis' font.
Definition:
ChartStyle.cpp:106
te::qt::widgets::ChartStyle::getStroke
te::se::Stroke * getStroke()
Returns a pointer to the style's stroke.
Definition:
ChartStyle.cpp:129
te::qt::widgets::ChartStyle::setColor
void setColor(QColor newColor)
It sets the style's color.
Definition:
ChartStyle.cpp:145
te::qt::widgets::ChartStyle::getAxisY
QString & getAxisY()
Returns a reference to the style's y axis label.
Definition:
ChartStyle.cpp:96
te::qt::widgets::ChartStyle::ChartStyle
ChartStyle()
Constructor.
Definition:
ChartStyle.cpp:34
te::qt::widgets::ChartStyle::setGridChecked
void setGridChecked(bool newGridChecked)
It sets the boolean used to decided weather to display the grid or not.
Definition:
ChartStyle.cpp:155
te::qt::widgets::ChartStyle::setTitle
void setTitle(QString newTitle)
It sets the style's title.
Definition:
ChartStyle.cpp:71
te::qt::widgets::ChartStyle::getTitle
QString & getTitle()
Returns a reference to the style's Title.
Definition:
ChartStyle.cpp:66
te::qt::widgets::ChartStyle::m_fill
te::se::Fill * m_fill
The chart's fill.
Definition:
ChartStyle.h:222
te::qt::widgets::ChartStyle::m_axisY
QString m_axisY
The chart Y axis' label.
Definition:
ChartStyle.h:219
te::qt::widgets::ChartStyle::setStroke
void setStroke(te::se::Stroke *newStroke)
It sets the style's stroke.
Definition:
ChartStyle.cpp:134
te::at::Bold
Definition:
attic/src/annotationtext/Enums.h:55
te::qt::widgets::ChartStyle::m_title
QString m_title
The chart's title.
Definition:
ChartStyle.h:216
te::qt::widgets::ChartStyle::setAxisY
void setAxisY(QString newAxisY)
It sets the style's y axis label.
Definition:
ChartStyle.cpp:101
te::qt::widgets::ChartStyle::m_axisX
QString m_axisX
The chart X axis' label.
Definition:
ChartStyle.h:218
te::qt::widgets::ChartStyle::getFill
te::se::Fill * getFill()
Returns a pointer to the style's fill.
Definition:
ChartStyle.cpp:117
te::qt::widgets::ChartStyle::setAxisX
void setAxisX(QString newAxisX)
It sets the style's x axis label.
Definition:
ChartStyle.cpp:91
te::qt::widgets::ChartStyle::getColor
QColor & getColor()
Returns a reference to the style's color.
Definition:
ChartStyle.cpp:140
te::se::Fill
A Fill specifies the pattern for filling an area geometry.
Definition:
Fill.h:59
te::qt::widgets::ChartStyle::getTitleFont
QFont & getTitleFont()
Returns a reference to the title's font.
Definition:
ChartStyle.cpp:76
te::qt::widgets::ChartStyle::m_gridChecked
bool m_gridChecked
The boolean used to decide if the chart will have a background grid .
Definition:
ChartStyle.h:221
te::qt::widgets::ChartStyle::setTitleFont
void setTitleFont(QFont newTitleFont)
It sets the title's font.
Definition:
ChartStyle.cpp:81
te::qt::widgets::ChartStyle::m_titleFont
QFont m_titleFont
The title's font.
Definition:
ChartStyle.h:217
te::se::Stroke
A Stroke specifies the appearance of a linear geometry.
Definition:
Stroke.h:67
te::qt::widgets::ChartStyle::~ChartStyle
~ChartStyle()
Destructor.
Definition:
ChartStyle.cpp:60
te::qt::widgets::ChartStyle::getGridChecked
bool getGridChecked()
Returns true if the grid is to be displayed, otherwise returns false.
Definition:
ChartStyle.cpp:150
ChartStyle.h
A class used to define a chartDisplay's style.
te::qt::widgets::ChartStyle::m_backColor
QColor m_backColor
The chart's background color.
Definition:
ChartStyle.h:224
te::qt::widgets::ChartStyle::m_stroke
te::se::Stroke * m_stroke
The chart's stroke.
Definition:
ChartStyle.h:223
terralib5_src
src
terralib
qt
widgets
charts
ChartStyle.cpp
Generated on Wed Jun 6 2018 12:16:06 for TerraLib by
1.8.11