Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportPrintRenderer_p.cpp
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Line(s) | 179 | } else if (OROCheckBox *chk = dynamic_cast<OROCheckBox*>(prim)) { | |||
---|---|---|---|---|---|
193 | } else { | 193 | } else { | ||
194 | context.painter()->setPen(QPen(chk->lineStyle().color(), chk->lineStyle().weight() * scaleX, chk->lineStyle().penStyle())); | 194 | context.painter()->setPen(QPen(chk->lineStyle().color(), chk->lineStyle().weight() * scaleX, chk->lineStyle().penStyle())); | ||
195 | } | 195 | } | ||
196 | 196 | | |||
197 | qreal ox = sz.width() / 5; | 197 | qreal ox = sz.width() / 5; | ||
198 | qreal oy = sz.height() / 5; | 198 | qreal oy = sz.height() / 5; | ||
199 | 199 | | |||
200 | //Checkbox Style | 200 | //Checkbox Style | ||
201 | if (chk->checkType() == OROCheckBox::Cross) { | 201 | if (chk->checkType() == OROCheckBox::Type::Cross) { | ||
202 | context.painter()->drawRoundedRect(rc, sz.width() / 10 , sz.height() / 10); | 202 | context.painter()->drawRoundedRect(rc, sz.width() / 10 , sz.height() / 10); | ||
203 | 203 | | |||
204 | if (chk->value()) { | 204 | if (chk->value()) { | ||
205 | QPen lp; | 205 | QPen lp; | ||
206 | lp.setColor(chk->foregroundColor()); | 206 | lp.setColor(chk->foregroundColor()); | ||
207 | lp.setWidth(ox > oy ? oy : ox); | 207 | lp.setWidth(ox > oy ? oy : ox); | ||
208 | context.painter()->setPen(lp); | 208 | context.painter()->setPen(lp); | ||
209 | context.painter()->drawLine(QPointF(ox, oy) + ps, QPointF(sz.width() - ox, sz.height() - oy) + ps); | 209 | context.painter()->drawLine(QPointF(ox, oy) + ps, QPointF(sz.width() - ox, sz.height() - oy) + ps); | ||
210 | context.painter()->drawLine(QPointF(ox, sz.height() - oy) + ps, QPoint(sz.width() - ox, oy) + ps); | 210 | context.painter()->drawLine(QPointF(ox, sz.height() - oy) + ps, QPoint(sz.width() - ox, oy) + ps); | ||
211 | } | 211 | } | ||
212 | } else if (chk->checkType() == OROCheckBox::Dot) { | 212 | } else if (chk->checkType() == OROCheckBox::Type::Dot) { | ||
213 | //Radio Style | 213 | //Radio Style | ||
214 | context.painter()->drawEllipse(rc); | 214 | context.painter()->drawEllipse(rc); | ||
215 | 215 | | |||
216 | if (chk->value()) { | 216 | if (chk->value()) { | ||
217 | QBrush lb(chk->foregroundColor()); | 217 | QBrush lb(chk->foregroundColor()); | ||
218 | context.painter()->setBrush(lb); | 218 | context.painter()->setBrush(lb); | ||
219 | context.painter()->setPen(Qt::NoPen); | 219 | context.painter()->setPen(Qt::NoPen); | ||
220 | context.painter()->drawEllipse(rc.center(), sz.width() / 2 - ox, sz.height() / 2 - oy); | 220 | context.painter()->drawEllipse(rc.center(), sz.width() / 2 - ox, sz.height() / 2 - oy); | ||
Show All 27 Lines |