Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/maps/KReportDesignerItemMaps.cpp
Show All 23 Lines | |||||
24 | #include <KPropertySet> | 24 | #include <KPropertySet> | ||
25 | 25 | | |||
26 | #include <QGraphicsScene> | 26 | #include <QGraphicsScene> | ||
27 | #include <QGraphicsSceneMouseEvent> | 27 | #include <QGraphicsSceneMouseEvent> | ||
28 | #include <QDomDocument> | 28 | #include <QDomDocument> | ||
29 | #include <QPainter> | 29 | #include <QPainter> | ||
30 | #include "kreportplugin_debug.h" | 30 | #include "kreportplugin_debug.h" | ||
31 | 31 | | |||
32 | void KReportDesignerItemMaps::init(QGraphicsScene *scene, KReportDesigner *d) | 32 | void KReportDesignerItemMaps::init(QGraphicsScene *scene) | ||
33 | { | 33 | { | ||
34 | if (scene) | 34 | if (scene) | ||
35 | scene->addItem(this); | 35 | scene->addItem(this); | ||
36 | 36 | | |||
37 | connect(propertySet(), SIGNAL(propertyChanged(KPropertySet&,KProperty&)), | 37 | connect(propertySet(), SIGNAL(propertyChanged(KPropertySet&,KProperty&)), | ||
38 | this, SLOT(slotPropertyChanged(KPropertySet&,KProperty&))); | 38 | this, SLOT(slotPropertyChanged(KPropertySet&,KProperty&))); | ||
39 | 39 | | |||
40 | m_controlSource->setListData(designer()->fieldKeys(), designer()->fieldNames()); | 40 | m_controlSource->setListData(designer()->fieldKeys(), designer()->fieldNames()); | ||
41 | setZValue(z()); | 41 | setZValue(z()); | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | KReportDesignerItemMaps::KReportDesignerItemMaps(KReportDesigner * rw, QGraphicsScene* scene, const QPointF &pos) | 44 | KReportDesignerItemMaps::KReportDesignerItemMaps(KReportDesigner *rw, QGraphicsScene *scene, const QPointF &pos) | ||
45 | : KReportDesignerItemRectBase(rw, this) | 45 | : KReportDesignerItemRectBase(rw, this) | ||
46 | { | 46 | { | ||
47 | Q_UNUSED(pos); | 47 | Q_UNUSED(pos); | ||
48 | init(scene, rw); | 48 | init(scene); | ||
49 | setSceneRect(properRect(*rw, KREPORT_ITEM_RECT_DEFAULT_WIDTH, KREPORT_ITEM_RECT_DEFAULT_WIDTH)); | 49 | setSceneRect(properRect(*rw, KREPORT_ITEM_RECT_DEFAULT_WIDTH, KREPORT_ITEM_RECT_DEFAULT_WIDTH)); | ||
50 | nameProperty()->setValue(designer()->suggestEntityName(typeName())); | 50 | nameProperty()->setValue(designer()->suggestEntityName(typeName())); | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | KReportDesignerItemMaps::KReportDesignerItemMaps(const QDomNode &element, KReportDesigner * rw, QGraphicsScene* scene) | 53 | KReportDesignerItemMaps::KReportDesignerItemMaps(const QDomNode &element, KReportDesigner *rw, QGraphicsScene* scene) | ||
54 | : KReportItemMaps(element), KReportDesignerItemRectBase(rw, this) | 54 | : KReportItemMaps(element), KReportDesignerItemRectBase(rw, this) | ||
55 | { | 55 | { | ||
56 | init(scene, rw); | 56 | init(scene); | ||
57 | setSceneRect(KReportItemBase::scenePosition(item()->position()), KReportItemBase::sceneSize(item()->size())); | 57 | setSceneRect(KReportItemBase::scenePosition(item()->position()), KReportItemBase::sceneSize(item()->size())); | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | KReportDesignerItemMaps* KReportDesignerItemMaps::clone() | 60 | KReportDesignerItemMaps* KReportDesignerItemMaps::clone() | ||
61 | { | 61 | { | ||
62 | QDomDocument d; | 62 | QDomDocument d; | ||
63 | QDomElement e = d.createElement(QLatin1String("clone")); | 63 | QDomElement e = d.createElement(QLatin1String("clone")); | ||
64 | QDomNode n; | 64 | QDomNode n; | ||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |