Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerSection.cpp
Show All 23 Lines | |||||
24 | #include "KReportDesigner.h" | 24 | #include "KReportDesigner.h" | ||
25 | #include "KReportDesignerItemBase.h" | 25 | #include "KReportDesignerItemBase.h" | ||
26 | #include "KReportUtils.h" | 26 | #include "KReportUtils.h" | ||
27 | #include "KReportPluginInterface.h" | 27 | #include "KReportPluginInterface.h" | ||
28 | #include "KReportPluginManager.h" | 28 | #include "KReportPluginManager.h" | ||
29 | #include "KReportDesignerItemRectBase.h" | 29 | #include "KReportDesignerItemRectBase.h" | ||
30 | #include "KReportDesignerItemLine.h" | 30 | #include "KReportDesignerItemLine.h" | ||
31 | #include "KReportRuler_p.h" | 31 | #include "KReportRuler_p.h" | ||
32 | #include "KReportZoomHandler.h" | 32 | #include "KReportZoomHandler_p.h" | ||
33 | #include "KReportUtils_p.h" | 33 | #include "KReportUtils_p.h" | ||
34 | #include "KReportPluginMetaData.h" | 34 | #include "KReportPluginMetaData.h" | ||
35 | #include "kreport_debug.h" | 35 | #include "kreport_debug.h" | ||
36 | 36 | | |||
37 | #include <QLabel> | 37 | #include <QLabel> | ||
38 | #include <QFrame> | 38 | #include <QFrame> | ||
39 | #include <QDomDocument> | 39 | #include <QDomDocument> | ||
40 | #include <QLayout> | 40 | #include <QLayout> | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 81 | public: | |||
92 | KReportDesigner*reportDesigner; | 92 | KReportDesigner*reportDesigner; | ||
93 | KReportRuler *sectionRuler; | 93 | KReportRuler *sectionRuler; | ||
94 | 94 | | |||
95 | KReportSectionData *sectionData; | 95 | KReportSectionData *sectionData; | ||
96 | int dpiY; | 96 | int dpiY; | ||
97 | }; | 97 | }; | ||
98 | 98 | | |||
99 | 99 | | |||
100 | KReportDesignerSection::KReportDesignerSection(KReportDesigner * rptdes) | 100 | KReportDesignerSection::KReportDesignerSection(KReportDesigner * rptdes, | ||
101 | const KReportZoomHandler &zoomHandler) | ||||
101 | : QWidget(rptdes) | 102 | : QWidget(rptdes) | ||
102 | , d(new Private()) | 103 | , d(new Private()) | ||
103 | { | 104 | { | ||
104 | Q_ASSERT(rptdes); | 105 | Q_ASSERT(rptdes); | ||
105 | d->sectionData = new KReportSectionData(this); | 106 | d->sectionData = new KReportSectionData(this); | ||
106 | connect(d->sectionData->propertySet(), SIGNAL(propertyChanged(KPropertySet&,KProperty&)), | 107 | connect(d->sectionData->propertySet(), SIGNAL(propertyChanged(KPropertySet&,KProperty&)), | ||
107 | this, SLOT(slotPropertyChanged(KPropertySet&,KProperty&))); | 108 | this, SLOT(slotPropertyChanged(KPropertySet&,KProperty&))); | ||
108 | 109 | | |||
Show All 9 Lines | |||||
118 | glayout->setRowStretch(1, 1); | 119 | glayout->setRowStretch(1, 1); | ||
119 | glayout->setSizeConstraint(QLayout::SetFixedSize); | 120 | glayout->setSizeConstraint(QLayout::SetFixedSize); | ||
120 | 121 | | |||
121 | // ok create the base interface | 122 | // ok create the base interface | ||
122 | d->title = new KReportDesignerSectionTitle(this); | 123 | d->title = new KReportDesignerSectionTitle(this); | ||
123 | d->title->setObjectName(QLatin1String("detail")); | 124 | d->title->setObjectName(QLatin1String("detail")); | ||
124 | d->title->setText(tr("Detail")); | 125 | d->title->setText(tr("Detail")); | ||
125 | 126 | | |||
126 | d->sectionRuler = new KReportRuler(this, Qt::Vertical, d->reportDesigner->zoomHandler()); | 127 | d->sectionRuler = new KReportRuler(this, Qt::Vertical, zoomHandler); | ||
127 | d->sectionRuler->setUnit(d->reportDesigner->pageUnit()); | 128 | d->sectionRuler->setUnit(d->reportDesigner->pageUnit()); | ||
128 | d->scene = new KReportDesignerSectionScene(d->reportDesigner->pageWidthPx(), d->dpiY, rptdes); | 129 | d->scene = new KReportDesignerSectionScene(d->reportDesigner->pageWidthPx(), d->dpiY, rptdes); | ||
129 | d->scene->setBackgroundBrush(d->sectionData->backgroundColor()); | 130 | d->scene->setBackgroundBrush(d->sectionData->backgroundColor()); | ||
130 | 131 | | |||
131 | d->sceneView = new KReportDesignerSectionView(rptdes, d->scene, this); | 132 | d->sceneView = new KReportDesignerSectionView(rptdes, d->scene, this); | ||
132 | d->sceneView->setObjectName(QLatin1String("scene view")); | 133 | d->sceneView->setObjectName(QLatin1String("scene view")); | ||
133 | d->sceneView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | 134 | d->sceneView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
134 | 135 | | |||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |