~ubuntu-branches/ubuntu/oneiric/koffice/oneiric-updates

« back to all changes in this revision

Viewing changes to libs/koreport/renderer/scripting/krscriptchart.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Kexi Report Plugin
3
 
 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
4
 
 *
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.
9
 
 *
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.
14
 
 *
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/>.
17
 
 */
18
 
#include "krscriptchart.h"
19
 
 
20
 
#include <krchartdata.h>
21
 
 
22
 
namespace Scripting
23
 
{
24
 
 
25
 
Chart::Chart(KRChartData *c)
26
 
{
27
 
    m_chart = c;
28
 
}
29
 
 
30
 
 
31
 
Chart::~Chart()
32
 
{
33
 
}
34
 
 
35
 
QPointF Chart::position()
36
 
{
37
 
    return m_chart->m_pos.toPoint();
38
 
}
39
 
void Chart::setPosition(const QPointF& p)
40
 
{
41
 
    m_chart->m_pos.setPointPos(p);
42
 
}
43
 
 
44
 
QSizeF Chart::size()
45
 
{
46
 
    return m_chart->m_size.toPoint();
47
 
}
48
 
void Chart::setSize(const QSizeF& s)
49
 
{
50
 
    m_chart->m_size.setPointSize(s);
51
 
}
52
 
 
53
 
QString Chart::dataSource()
54
 
{
55
 
    return m_chart->m_dataSource->value().toString();
56
 
}
57
 
 
58
 
void Chart::setDataSource(const QString &ds)
59
 
{
60
 
    m_chart->m_dataSource->setValue(ds);
61
 
}
62
 
 
63
 
bool Chart::threeD()
64
 
{
65
 
    return m_chart->m_threeD->value().toBool();
66
 
}
67
 
 
68
 
void Chart::setThreeD(bool td)
69
 
{
70
 
    m_chart->m_threeD->setValue(td);
71
 
}
72
 
 
73
 
bool Chart::legendVisible()
74
 
{
75
 
    return m_chart->m_displayLegend->value().toBool();
76
 
}
77
 
 
78
 
void Chart::setLegendVisible(bool v)
79
 
{
80
 
    m_chart->m_displayLegend->setValue(v);
81
 
}
82
 
 
83
 
int Chart::colorScheme()
84
 
{
85
 
    return m_chart->m_colorScheme->value().toInt();
86
 
}
87
 
 
88
 
void Chart::setColorScheme(int cs)
89
 
{
90
 
    m_chart->m_colorScheme->setValue(cs);
91
 
}
92
 
 
93
 
QColor Chart::backgroundColor()
94
 
{
95
 
    return m_chart->m_backgroundColor->value().value<QColor>();
96
 
}
97
 
 
98
 
void Chart::setBackgroundColor(const QColor &bc)
99
 
{
100
 
    m_chart->m_backgroundColor->setValue(bc);
101
 
}
102
 
 
103
 
QString Chart::xAxisTitle()
104
 
{
105
 
    return m_chart->m_xTitle->value().toString();
106
 
}
107
 
 
108
 
void Chart::setXAxisTitle(const QString &t)
109
 
{
110
 
    m_chart->m_xTitle->setValue(t);
111
 
}
112
 
 
113
 
QString Chart::yAxisTitle()
114
 
{
115
 
    return m_chart->m_yTitle->value().toString();
116
 
}
117
 
 
118
 
void Chart::setYAxisTitle(const QString &t)
119
 
{
120
 
    m_chart->m_yTitle->setValue(t);
121
 
}
122
 
}