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
#ifndef KRSCRIPTFUNCTIONS_H
19
#define KRSCRIPTFUNCTIONS_H
20
#include <QScriptEngine>
23
#include <kexidb/connection.h>
24
#include <kexidb/cursor.h>
25
#include <KoReportData.h>
30
class KRScriptFunctions : public QObject
34
KRScriptFunctions(const KoReportData *, KexiDB::Connection*);
39
KexiDB::Connection *m_connection;
40
const KoReportData *m_cursor;
42
qreal math(const QString &, const QString &);
46
void setWhere(const QString&);
48
qreal sum(const QString &);
49
qreal avg(const QString &);
50
qreal min(const QString &);
51
qreal max(const QString &);
52
qreal count(const QString &);
53
QVariant value(const QString &);