Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/reports/KexiDBReportDataSource.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Kexi Report Plugin | 2 | * Kexi Report Plugin | ||
3 | * Copyright (C) 2007-2017 by Adam Pigg <adam@piggz.co.uk> | 3 | * Copyright (C) 2007-2017 by Adam Pigg <adam@piggz.co.uk> | ||
4 | * Copyright (C) 2017 Jarosław Staniek <staniek@kde.org> | ||||
4 | * | 5 | * | ||
5 | * This library is free software; you can redistribute it and/or | 6 | * This library is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU Lesser General Public | 7 | * modify it under the terms of the GNU Lesser General Public | ||
7 | * License as published by the Free Software Foundation; either | 8 | * License as published by the Free Software Foundation; either | ||
8 | * version 2.1 of the License, or (at your option) any later version. | 9 | * version 2.1 of the License, or (at your option) any later version. | ||
9 | * | 10 | * | ||
10 | * This library is distributed in the hope that it will be useful, | 11 | * This library is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * Lesser General Public License for more details. | 14 | * Lesser General Public License for more details. | ||
14 | * | 15 | * | ||
15 | * You should have received a copy of the GNU Lesser General Public | 16 | * 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 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 18 | */ | ||
18 | 19 | | |||
19 | #ifndef __KEXIDBREPORTDATA_H__ | 20 | #ifndef __KEXIDBREPORTDATA_H__ | ||
20 | #define __KEXIDBREPORTDATA_H__ | 21 | #define __KEXIDBREPORTDATA_H__ | ||
21 | 22 | | |||
22 | #include <QString> | 23 | #include <QString> | ||
23 | #include <QStringList> | 24 | #include <QStringList> | ||
24 | 25 | | |||
25 | #include <KDbCursor> | | |||
26 | #include <KReportDataSource> | 26 | #include <KReportDataSource> | ||
27 | 27 | | |||
28 | class KexiReportPartTempData; | ||||
29 | | ||||
28 | //! @brief Implementation of database report data source | 30 | //! @brief Implementation of database report data source | ||
29 | class KexiDBReportDataSource : public KReportDataSource | 31 | class KexiDBReportDataSource : public KReportDataSource | ||
30 | { | 32 | { | ||
31 | public: | 33 | public: | ||
32 | /*! | 34 | /*! | ||
33 | * @a pluginId specifies type of @a objectName, a table or query. | 35 | * @a pluginId specifies type of @a objectName, a table or query. | ||
34 | * Types accepted: | 36 | * Types accepted: | ||
35 | * -"org.kexi-project.table" | 37 | * -"org.kexi-project.table" | ||
36 | * -"org.kexi-project.query" | 38 | * -"org.kexi-project.query" | ||
37 | * -empty QString() - attempt to resolve @a objectName | 39 | * -empty QString() - attempt to resolve @a objectName | ||
38 | */ | 40 | */ | ||
39 | KexiDBReportDataSource(const QString &objectName, const QString& pluginId, KDbConnection *conn); | 41 | KexiDBReportDataSource(const QString &objectName, const QString &pluginId, | ||
42 | KexiReportPartTempData *data); | ||||
40 | virtual ~KexiDBReportDataSource(); | 43 | virtual ~KexiDBReportDataSource(); | ||
41 | 44 | | |||
42 | virtual QStringList fieldNames() const; | 45 | virtual QStringList fieldNames() const; | ||
43 | virtual void setSorting(const QList<SortedField>& sorting); | 46 | virtual void setSorting(const QList<SortedField>& sorting); | ||
44 | 47 | | |||
45 | //! Adds a condition <field> <relation> <value> to the data source. | 48 | //! Adds a condition <field> <relation> <value> to the data source. | ||
46 | //! @note Only single-character relation operators such as "=" or ">" are supported now. | 49 | //! @note Only single-character relation operators such as "=" or ">" are supported now. | ||
47 | //! @todo Use KDb parser to support all relation operators such as ">=". | 50 | //! @todo Use KDb parser to support all relation operators such as ">=". | ||
Show All 31 Lines |