Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/maps/KReportMapsPlugin.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
51 | 51 | | |||
52 | QObject* KReportMapsPlugin::createDesignerInstance(KReportDesigner* designer, QGraphicsScene* scene, const QPointF& pos) | 52 | QObject* KReportMapsPlugin::createDesignerInstance(KReportDesigner* designer, QGraphicsScene* scene, const QPointF& pos) | ||
53 | { | 53 | { | ||
54 | //kreportpluginDebug() << "KReport maps init"; | 54 | //kreportpluginDebug() << "KReport maps init"; | ||
55 | return new KReportDesignerItemMaps(designer, scene, pos); | 55 | return new KReportDesignerItemMaps(designer, scene, pos); | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | #ifdef KREPORT_SCRIPTING | 58 | #ifdef KREPORT_SCRIPTING | ||
59 | QObject* KReportMapsPlugin::createScriptInstance(KReportItemBase* /*item*/) | 59 | QObject* KReportMapsPlugin::createScriptInstance(KReportItemBase* item) | ||
60 | { | 60 | { | ||
61 | /*KoReportItemMaps *image = dynamic_cast<KoReportItemMaps*>(item); | 61 | KReportItemMaps *map = qobject_cast<KReportItemMaps*>(item); | ||
62 | if (image) { | 62 | if (map) { | ||
63 | return new Scripting::Maps(image); | 63 | return new Scripting::Maps(map); | ||
64 | }*/ | 64 | } | ||
staniek: qobject_cast | |||||
65 | return nullptr; | 65 | return nullptr; | ||
66 | } | 66 | } | ||
67 | #endif | 67 | #endif | ||
68 | 68 | | |||
69 | #include "KReportMapsPlugin.moc" | 69 | #include "KReportMapsPlugin.moc" |
qobject_cast