Changeset View
Changeset View
Standalone View
Standalone View
src/items/text/KReportItemText.cpp
Show First 20 Lines • Show All 259 Lines • ▼ Show 20 Line(s) | 248 | if (separator == QLatin1Char('\n')) { | |||
---|---|---|---|---|---|
260 | tb->setSize(rect.size()); | 260 | tb->setSize(rect.size()); | ||
261 | tb->setFont(font()); | 261 | tb->setFont(font()); | ||
262 | tb->setText(line); | 262 | tb->setText(line); | ||
263 | tb->setFlags(textFlags()); | 263 | tb->setFlags(textFlags()); | ||
264 | tb->setTextStyle(textStyle()); | 264 | tb->setTextStyle(textStyle()); | ||
265 | tb->setLineStyle(lineStyle()); | 265 | tb->setLineStyle(lineStyle()); | ||
266 | 266 | | |||
267 | if (page) { | 267 | if (page) { | ||
268 | page->addPrimitive(tb); | 268 | page->insertPrimitive(tb); | ||
269 | } | 269 | } | ||
270 | 270 | | |||
271 | if (section) { | 271 | if (section) { | ||
272 | OROTextBox *tb2 = dynamic_cast<OROTextBox*>(tb->clone()); | 272 | OROTextBox *tb2 = dynamic_cast<OROTextBox*>(tb->clone()); | ||
273 | tb2->setPosition(scenePosition(position())); | 273 | tb2->setPosition(scenePosition(position())); | ||
274 | section->addPrimitive(tb2); | 274 | section->addPrimitive(tb2); | ||
275 | } | 275 | } | ||
276 | 276 | | |||
Show All 16 Lines | 284 | } else { | |||
293 | tb->setPosition(rect.topLeft()); | 293 | tb->setPosition(rect.topLeft()); | ||
294 | tb->setSize(rect.size()); | 294 | tb->setSize(rect.size()); | ||
295 | tb->setFont(font()); | 295 | tb->setFont(font()); | ||
296 | tb->setText(line); | 296 | tb->setText(line); | ||
297 | tb->setFlags(textFlags()); | 297 | tb->setFlags(textFlags()); | ||
298 | tb->setTextStyle(textStyle()); | 298 | tb->setTextStyle(textStyle()); | ||
299 | tb->setLineStyle(lineStyle()); | 299 | tb->setLineStyle(lineStyle()); | ||
300 | if (page) { | 300 | if (page) { | ||
301 | page->addPrimitive(tb); | 301 | page->insertPrimitive(tb); | ||
302 | } else { | 302 | } else { | ||
303 | delete tb; | 303 | delete tb; | ||
304 | } | 304 | } | ||
305 | 305 | | |||
306 | intStretch += intRectHeight; | 306 | intStretch += intRectHeight; | ||
307 | intLineCounter++; | 307 | intLineCounter++; | ||
308 | } | 308 | } | ||
309 | } | 309 | } | ||
310 | 310 | | |||
311 | intStretch += (m_bottomPadding / 100.0); | 311 | intStretch += (m_bottomPadding / 100.0); | ||
312 | } | 312 | } | ||
313 | 313 | | |||
314 | return intStretch; //Item returns its required section height | 314 | return intStretch; //Item returns its required section height | ||
315 | } | 315 | } |