Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/reports/kexireportview.cpp
Show All 16 Lines | |||||
17 | * 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/>. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "kexireportview.h" | 20 | #include "kexireportview.h" | ||
21 | #include <KReportView> | 21 | #include <KReportView> | ||
22 | #include "KexiDBReportDataSource.h" | 22 | #include "KexiDBReportDataSource.h" | ||
23 | #ifndef KEXI_MOBILE | 23 | #ifndef KEXI_MOBILE | ||
24 | #include <widget/utils/kexirecordnavigator.h> | 24 | #include <widget/utils/kexirecordnavigator.h> | ||
25 | //! @todo KEXI3 | | |||
26 | #if 0 | | |||
27 | #include "keximigratereportdata.h" | | |||
28 | #endif | | |||
29 | #endif | 25 | #endif | ||
30 | #include <core/KexiWindow.h> | 26 | #include <core/KexiWindow.h> | ||
31 | #include <core/KexiMainWindowIface.h> | 27 | #include <core/KexiMainWindowIface.h> | ||
32 | #include <KexiIcon.h> | 28 | #include <KexiIcon.h> | ||
33 | 29 | | |||
34 | //! @todo KEXI3 #include "../scripting/kexiscripting/kexiscriptadaptor.h" | 30 | //! @todo KEXI3 #include "../scripting/kexiscripting/kexiscriptadaptor.h" | ||
35 | 31 | | |||
36 | #include <KReportPage> | 32 | #include <KReportPage> | ||
▲ Show 20 Lines • Show All 363 Lines • ▼ Show 20 Line(s) | 395 | } else { | |||
400 | KMessageBox::error(this, xi18n("Report schema appears to be invalid or corrupt"), xi18n("Opening failed")); | 396 | KMessageBox::error(this, xi18n("Report schema appears to be invalid or corrupt"), xi18n("Opening failed")); | ||
401 | } | 397 | } | ||
402 | } | 398 | } | ||
403 | return true; | 399 | return true; | ||
404 | } | 400 | } | ||
405 | 401 | | |||
406 | KReportDataSource* KexiReportView::createDataSource(const QDomElement &e) | 402 | KReportDataSource* KexiReportView::createDataSource(const QDomElement &e) | ||
407 | { | 403 | { | ||
408 | KReportDataSource *kodata = 0; | | |||
409 | | ||||
410 | if (e.attribute("type") == "internal" && !e.attribute("source").isEmpty()) { | 404 | if (e.attribute("type") == "internal" && !e.attribute("source").isEmpty()) { | ||
411 | kodata | 405 | return new KexiDBReportDataSource(e.attribute("source"), e.attribute("class"), tempData()); | ||
412 | = new KexiDBReportDataSource(e.attribute("source"), e.attribute("class"), | | |||
413 | KexiMainWindowIface::global()->project()->dbConnection()); | | |||
414 | } | | |||
415 | #ifndef KEXI_MOBILE | | |||
416 | //! @todo KEXI3 | | |||
417 | #if 0 | | |||
418 | if (e.attribute("type") == "external") { | | |||
419 | kodata = new KexiMigrateReportData(e.attribute("source")); | | |||
420 | } | 406 | } | ||
421 | #endif | 407 | return nullptr; | ||
422 | #endif | | |||
423 | return kodata; | | |||
424 | } | 408 | } | ||
425 | 409 | | |||
426 | KexiReportPartTempData* KexiReportView::tempData() const | 410 | KexiReportPartTempData* KexiReportView::tempData() const | ||
427 | { | 411 | { | ||
428 | return static_cast<KexiReportPartTempData*>(window()->data()); | 412 | return static_cast<KexiReportPartTempData*>(window()->data()); | ||
429 | } | 413 | } | ||
430 | 414 | | |||
431 | void KexiReportView::addNewRecordRequested() | 415 | void KexiReportView::addNewRecordRequested() | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |