Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerSection.cpp
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | 151 | { | |||
---|---|---|---|---|---|
152 | delete d; | 152 | delete d; | ||
153 | } | 153 | } | ||
154 | 154 | | |||
155 | void KReportDesignerSection::setTitle(const QString & s) | 155 | void KReportDesignerSection::setTitle(const QString & s) | ||
156 | { | 156 | { | ||
157 | d->title->setText(s); | 157 | d->title->setText(s); | ||
158 | } | 158 | } | ||
159 | 159 | | |||
160 | void KReportDesignerSection::slotResizeBarDragged(int delta) | 160 | void KReportDesignerSection::slotResizeBarDragged(int delta, bool changeSet) | ||
161 | { | 161 | { | ||
162 | if (d->sceneView->designer() && d->sceneView->designer()->propertySet()->property("page-size").value().toString() == QLatin1String("Labels")) { | 162 | if (d->sceneView->designer() && d->sceneView->designer()->propertySet()->property("page-size").value().toString() == QLatin1String("Labels")) { | ||
163 | return; // we don't want to allow this on reports that are for labels | 163 | return; // we don't want to allow this on reports that are for labels | ||
164 | } | 164 | } | ||
165 | | ||||
166 | if (changeSet) { | ||||
165 | slotSceneClicked(); // switches property set to this section | 167 | slotSceneClicked(); // switches property set to this section | ||
168 | } | ||||
166 | 169 | | |||
167 | qreal h = d->scene->height() + delta; | 170 | qreal h = d->scene->height() + delta; | ||
168 | 171 | | |||
169 | if (h < 1) h = 1; | 172 | if (h < 1) h = 1; | ||
170 | 173 | | |||
171 | h = d->scene->gridPoint(QPointF(0, h)).y(); | 174 | h = d->scene->gridPoint(QPointF(0, h)).y(); | ||
172 | d->sectionData->m_height->setValue(INCH_TO_POINT(h/d->dpiY)); | 175 | d->sectionData->m_height->setValue(INCH_TO_POINT(h/d->dpiY)); | ||
173 | d->sectionRuler->setRulerLength(h); | 176 | d->sectionRuler->setRulerLength(h); | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 247 | { | |||
262 | d->sectionRuler->setUnit(d->reportDesigner->pageUnit()); | 265 | d->sectionRuler->setUnit(d->reportDesigner->pageUnit()); | ||
263 | 266 | | |||
264 | //Trigger a redraw of the background | 267 | //Trigger a redraw of the background | ||
265 | d->sceneView->resetCachedContent(); | 268 | d->sceneView->resetCachedContent(); | ||
266 | 269 | | |||
267 | d->reportDesigner->adjustSize(); | 270 | d->reportDesigner->adjustSize(); | ||
268 | d->reportDesigner->repaint(); | 271 | d->reportDesigner->repaint(); | ||
269 | 272 | | |||
270 | slotResizeBarDragged(0); | 273 | slotResizeBarDragged(0, false); | ||
staniek: Do we want this to prevent calling KReportDesigner::changeSet() and emitting the… | |||||
271 | } | 274 | } | ||
272 | 275 | | |||
273 | void KReportDesignerSection::slotSceneClicked() | 276 | void KReportDesignerSection::slotSceneClicked() | ||
274 | { | 277 | { | ||
275 | d->reportDesigner->setActiveScene(d->scene); | 278 | d->reportDesigner->setActiveScene(d->scene); | ||
276 | d->reportDesigner->changeSet(d->sectionData->propertySet()); | 279 | d->reportDesigner->changeSet(d->sectionData->propertySet()); | ||
277 | } | 280 | } | ||
278 | 281 | | |||
▲ Show 20 Lines • Show All 138 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?