3
* Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library 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 GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
18
#include "krscriptchart.h"
20
#include <krchartdata.h>
25
Chart::Chart(KRChartData *c)
35
QPointF Chart::position()
37
return m_chart->m_pos.toPoint();
39
void Chart::setPosition(const QPointF& p)
41
m_chart->m_pos.setPointPos(p);
46
return m_chart->m_size.toPoint();
48
void Chart::setSize(const QSizeF& s)
50
m_chart->m_size.setPointSize(s);
53
QString Chart::dataSource()
55
return m_chart->m_dataSource->value().toString();
58
void Chart::setDataSource(const QString &ds)
60
m_chart->m_dataSource->setValue(ds);
65
return m_chart->m_threeD->value().toBool();
68
void Chart::setThreeD(bool td)
70
m_chart->m_threeD->setValue(td);
73
bool Chart::legendVisible()
75
return m_chart->m_displayLegend->value().toBool();
78
void Chart::setLegendVisible(bool v)
80
m_chart->m_displayLegend->setValue(v);
83
int Chart::colorScheme()
85
return m_chart->m_colorScheme->value().toInt();
88
void Chart::setColorScheme(int cs)
90
m_chart->m_colorScheme->setValue(cs);
93
QColor Chart::backgroundColor()
95
return m_chart->m_backgroundColor->value().value<QColor>();
98
void Chart::setBackgroundColor(const QColor &bc)
100
m_chart->m_backgroundColor->setValue(bc);
103
QString Chart::xAxisTitle()
105
return m_chart->m_xTitle->value().toString();
108
void Chart::setXAxisTitle(const QString &t)
110
m_chart->m_xTitle->setValue(t);
113
QString Chart::yAxisTitle()
115
return m_chart->m_yTitle->value().toString();
118
void Chart::setYAxisTitle(const QString &t)
120
m_chart->m_yTitle->setValue(t);