Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerSection.cpp
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | 156 | { | |||
---|---|---|---|---|---|
157 | delete d; | 157 | delete d; | ||
158 | } | 158 | } | ||
159 | 159 | | |||
160 | void KReportDesignerSection::setTitle(const QString & s) | 160 | void KReportDesignerSection::setTitle(const QString & s) | ||
161 | { | 161 | { | ||
162 | d->title->setText(s); | 162 | d->title->setText(s); | ||
163 | } | 163 | } | ||
164 | 164 | | |||
165 | void KReportDesignerSection::slotResizeBarDragged(int delta) | 165 | void KReportDesignerSection::slotResizeBarDragged(int delta, bool changeSet) | ||
166 | { | 166 | { | ||
167 | if (d->sceneView->designer() && d->sceneView->designer()->propertySet()->property("page-size").value().toString() == QLatin1String("Labels")) { | 167 | if (d->sceneView->designer() && d->sceneView->designer()->propertySet()->property("page-size").value().toString() == QLatin1String("Labels")) { | ||
168 | return; // we don't want to allow this on reports that are for labels | 168 | return; // we don't want to allow this on reports that are for labels | ||
169 | } | 169 | } | ||
170 | | ||||
171 | if (changeSet) { | ||||
170 | slotSceneClicked(); // switches property set to this section | 172 | slotSceneClicked(); // switches property set to this section | ||
173 | } | ||||
171 | 174 | | |||
172 | qreal h = d->scene->height() + delta; | 175 | qreal h = d->scene->height() + delta; | ||
173 | 176 | | |||
174 | if (h < 1) h = 1; | 177 | if (h < 1) h = 1; | ||
175 | 178 | | |||
176 | h = d->scene->gridPoint(QPointF(0, h)).y(); | 179 | h = d->scene->gridPoint(QPointF(0, h)).y(); | ||
177 | d->sectionData->m_height->setValue(INCH_TO_POINT(h/d->dpiY)); | 180 | d->sectionData->m_height->setValue(INCH_TO_POINT(h/d->dpiY)); | ||
178 | d->sectionRuler->setRulerLength(h); | 181 | d->sectionRuler->setRulerLength(h); | ||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 259 | { | |||
274 | d->sectionRuler->setUnit(d->reportDesigner->pageUnit()); | 277 | d->sectionRuler->setUnit(d->reportDesigner->pageUnit()); | ||
275 | 278 | | |||
276 | //Trigger a redraw of the background | 279 | //Trigger a redraw of the background | ||
277 | d->sceneView->resetCachedContent(); | 280 | d->sceneView->resetCachedContent(); | ||
278 | 281 | | |||
279 | d->reportDesigner->adjustSize(); | 282 | d->reportDesigner->adjustSize(); | ||
280 | d->reportDesigner->repaint(); | 283 | d->reportDesigner->repaint(); | ||
281 | 284 | | |||
282 | slotResizeBarDragged(0); | 285 | slotResizeBarDragged(0, false); | ||
staniek: Do we want this to prevent calling KReportDesigner::changeSet() and emitting the… | |||||
283 | } | 286 | } | ||
284 | 287 | | |||
285 | void KReportDesignerSection::slotSceneClicked() | 288 | void KReportDesignerSection::slotSceneClicked() | ||
286 | { | 289 | { | ||
287 | d->reportDesigner->setActiveScene(d->scene); | 290 | d->reportDesigner->setActiveScene(d->scene); | ||
288 | d->reportDesigner->changeSet(d->sectionData->propertySet()); | 291 | d->reportDesigner->changeSet(d->sectionData->propertySet()); | ||
289 | } | 292 | } | ||
290 | 293 | | |||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |
Do we want this to prevent calling KReportDesigner::changeSet() and emitting the propertySetChanged() signal? If so can't we change:
to
And we're done?