Changeset View
Changeset View
Standalone View
Standalone View
examples/KReportExampleDataSource.h
- This file was moved from examples/KReportExampleData.h.
Show All 14 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KREPORTEXAMPLEDATA_H | 20 | #ifndef KREPORTEXAMPLEDATA_H | ||
21 | #define KREPORTEXAMPLEDATA_H | 21 | #define KREPORTEXAMPLEDATA_H | ||
22 | 22 | | |||
23 | #include <KReportData> | 23 | #include <KReportDataSource> | ||
24 | #include <QVariant> | 24 | #include <QVariant> | ||
25 | #include <QStringList> | 25 | #include <QStringList> | ||
26 | #include <QList> | 26 | #include <QList> | ||
27 | 27 | | |||
28 | class KReportExampleData : public KReportData | 28 | class KReportExampleDataSource : public KReportDataSource | ||
staniekUnsubmitted Done
staniek: [ ] For completeness: KReportExampleData -> KReportExampleDataSource
[ ] And the files rename | |||||
29 | { | 29 | { | ||
30 | public: | 30 | public: | ||
31 | KReportExampleData(); | 31 | KReportExampleDataSource(); | ||
32 | ~KReportExampleData(); | 32 | ~KReportExampleDataSource(); | ||
33 | virtual QVariant value(const QString& field) const; | 33 | virtual QVariant value(const QString& field) const; | ||
34 | virtual QVariant value(unsigned int) const; | 34 | virtual QVariant value(int) const; | ||
35 | virtual QStringList fieldNames() const; | 35 | virtual QStringList fieldNames() const; | ||
36 | virtual QStringList fieldKeys() const; | 36 | virtual QStringList fieldKeys() const; | ||
37 | virtual int fieldNumber(const QString& field) const; | 37 | virtual int fieldNumber(const QString& field) const; | ||
38 | virtual qint64 recordCount() const; | 38 | virtual qint64 recordCount() const; | ||
39 | virtual qint64 at() const; | 39 | virtual qint64 at() const; | ||
40 | virtual bool moveLast(); | 40 | virtual bool moveLast(); | ||
41 | virtual bool moveFirst(); | 41 | virtual bool moveFirst(); | ||
42 | virtual bool movePrevious(); | 42 | virtual bool movePrevious(); | ||
43 | virtual bool moveNext(); | 43 | virtual bool moveNext(); | ||
44 | virtual bool close(); | 44 | virtual bool close(); | ||
45 | virtual bool open(); | 45 | virtual bool open(); | ||
46 | 46 | | |||
47 | virtual QStringList scriptList() const; | 47 | virtual QStringList scriptList() const; | ||
48 | virtual QString scriptCode(const QString &script) const; | 48 | virtual QString scriptCode(const QString &script) const; | ||
49 | 49 | | |||
50 | virtual QStringList dataSourceNames() const; | ||||
51 | | ||||
50 | private: | 52 | private: | ||
51 | struct Data | 53 | struct Data | ||
52 | { | 54 | { | ||
53 | int id; | 55 | int id; | ||
54 | QString devName; | 56 | QString devName; | ||
55 | QString project; | 57 | QString project; | ||
56 | QString country; | 58 | QString country; | ||
57 | QString mobile; | 59 | QString mobile; | ||
Show All 12 Lines |