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