Changeset View
Changeset View
Standalone View
Standalone View
kexi/plugins/reports/kexisourceselector.cpp
Context not available. | |||||
17 | */ | 17 | */ | ||
---|---|---|---|---|---|
18 | 18 | | |||
19 | #include "kexisourceselector.h" | 19 | #include "kexisourceselector.h" | ||
20 | #include "kexireportview.h" | ||||
21 | #include <kexiproject.h> | ||||
22 | #include "KexiDataSourceComboBox.h" | ||||
23 | #include <core/KexiMainWindowIface.h> | ||||
24 | #include <core/KexiWindow.h> | ||||
20 | 25 | | |||
21 | #include <kpushbutton.h> | 26 | #include <kpushbutton.h> | ||
22 | #include <klineedit.h> | 27 | #include <klineedit.h> | ||
23 | | ||||
24 | #include <QLabel> | | |||
25 | #include <klocale.h> | 28 | #include <klocale.h> | ||
26 | #include <kdebug.h> | 29 | #include <kdebug.h> | ||
30 | | ||||
27 | #include <QDomElement> | 31 | #include <QDomElement> | ||
28 | #include "KexiDataSourceComboBox.h" | 32 | #include <QLabel> | ||
29 | #include <kexiproject.h> | | |||
30 | 33 | | |||
31 | //#define NO_EXTERNAL_SOURCES | 34 | //#define NO_EXTERNAL_SOURCES | ||
32 | 35 | | |||
Context not available. | |||||
178 | 181 | | |||
179 | //!@TODO Fix when enable external data | 182 | //!@TODO Fix when enable external data | ||
180 | #ifndef NO_EXTERNAL_SOURCES | 183 | #ifndef NO_EXTERNAL_SOURCES | ||
184 | KexiReportView *view = 0; | ||||
185 | if (KexiMainWindowIface::global()->currentWindow()) { | ||||
186 | view = qobject_cast<KexiReportView*>(KexiMainWindowIface::global()->currentWindow()->selectedView()); | ||||
187 | if (!view) { | ||||
188 | return 0; | ||||
189 | } | ||||
190 | } | ||||
181 | if (d->sourceType->itemData(d->sourceType->currentIndex()).toString() == "internal" && d->internalSource->isSelectionValid()) { | 191 | if (d->sourceType->itemData(d->sourceType->currentIndex()).toString() == "internal" && d->internalSource->isSelectionValid()) { | ||
182 | d->kexiDBData = new KexiDBReportData(d->internalSource->selectedName(), d->internalSource->selectedPartClass(), d->conn); | 192 | d->kexiDBData = new KexiDBReportData(d->internalSource->selectedName(), | ||
193 | d->internalSource->selectedPartClass(), | ||||
194 | d->conn, view); | ||||
183 | return d->kexiDBData; | 195 | return d->kexiDBData; | ||
184 | } | 196 | } | ||
185 | 197 | | |||
Context not available. |