Changeset View
Changeset View
Standalone View
Standalone View
examples/KReportExampleData.cpp
Show All 35 Lines | |||||
36 | 36 | | |||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | QVariant KReportExampleData::value(const QString& field) const | 39 | QVariant KReportExampleData::value(const QString& field) const | ||
40 | { | 40 | { | ||
41 | return value(fieldNumber(field)); | 41 | return value(fieldNumber(field)); | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | QVariant KReportExampleData::value(unsigned int f) const | 44 | QVariant KReportExampleData::value(int f) const | ||
45 | { | 45 | { | ||
46 | switch(f) { | 46 | switch(f) { | ||
47 | case 0: | 47 | case 0: | ||
48 | return m_testData[m_currentRecord].id; | 48 | return m_testData[m_currentRecord].id; | ||
49 | break; | 49 | break; | ||
50 | case 1: | 50 | case 1: | ||
51 | return m_testData[m_currentRecord].devName; | 51 | return m_testData[m_currentRecord].devName; | ||
52 | break; | 52 | break; | ||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | 168 | scriptcode = "" | |||
185 | " debug.print(\"report on-open event\");\n" | 185 | " debug.print(\"report on-open event\");\n" | ||
186 | " }\n" | 186 | " }\n" | ||
187 | "}\n" | 187 | "}\n" | ||
188 | "example_report.section_detail.initialize(new detail());\n" | 188 | "example_report.section_detail.initialize(new detail());\n" | ||
189 | "example_report.initialize(new report());\n"; | 189 | "example_report.initialize(new report());\n"; | ||
190 | 190 | | |||
191 | return scriptcode; | 191 | return scriptcode; | ||
192 | } | 192 | } | ||
193 | | ||||
194 | QStringList KReportExampleData::dataSourceNames() const | ||||
195 | { | ||||
196 | return QStringList(); | ||||
197 | } |