Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportScreenRenderer_p.cpp
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 136 | else if (OROCheckBox *chk = dynamic_cast<OROCheckBox*>(prim)) { | |||
---|---|---|---|---|---|
150 | } else { | 150 | } else { | ||
151 | context.painter()->setPen(QPen(chk->lineStyle().color(), chk->lineStyle().weight(), chk->lineStyle().penStyle())); | 151 | context.painter()->setPen(QPen(chk->lineStyle().color(), chk->lineStyle().weight(), chk->lineStyle().penStyle())); | ||
152 | } | 152 | } | ||
153 | 153 | | |||
154 | qreal ox = sz.width() / 5; | 154 | qreal ox = sz.width() / 5; | ||
155 | qreal oy = sz.height() / 5; | 155 | qreal oy = sz.height() / 5; | ||
156 | 156 | | |||
157 | //Checkbox Style | 157 | //Checkbox Style | ||
158 | if (chk->checkType() == OROCheckBox::Cross) { | 158 | if (chk->checkType() == OROCheckBox::Type::Cross) { | ||
159 | context.painter()->drawRoundedRect(rc, sz.width() / 10 , sz.height() / 10); | 159 | context.painter()->drawRoundedRect(rc, sz.width() / 10 , sz.height() / 10); | ||
160 | 160 | | |||
161 | if (chk->value()) { | 161 | if (chk->value()) { | ||
162 | QPen lp; | 162 | QPen lp; | ||
163 | lp.setColor(chk->foregroundColor()); | 163 | lp.setColor(chk->foregroundColor()); | ||
164 | lp.setWidth(ox > oy ? oy : ox); | 164 | lp.setWidth(ox > oy ? oy : ox); | ||
165 | context.painter()->setPen(lp); | 165 | context.painter()->setPen(lp); | ||
166 | context.painter()->drawLine(QPointF(ox, oy) + ps, QPointF(sz.width() - ox, sz.height() - oy) + ps); | 166 | context.painter()->drawLine(QPointF(ox, oy) + ps, QPointF(sz.width() - ox, sz.height() - oy) + ps); | ||
167 | context.painter()->drawLine(QPointF(ox, sz.height() - oy) + ps, QPoint(sz.width() - ox, oy) + ps); | 167 | context.painter()->drawLine(QPointF(ox, sz.height() - oy) + ps, QPoint(sz.width() - ox, oy) + ps); | ||
168 | } | 168 | } | ||
169 | } | 169 | } | ||
170 | else if (chk->checkType() == OROCheckBox::Dot) { | 170 | else if (chk->checkType() == OROCheckBox::Type::Dot) { | ||
171 | //Radio Style | 171 | //Radio Style | ||
172 | context.painter()->drawEllipse(rc); | 172 | context.painter()->drawEllipse(rc); | ||
173 | 173 | | |||
174 | if (chk->value()) { | 174 | if (chk->value()) { | ||
175 | QBrush lb(chk->foregroundColor()); | 175 | QBrush lb(chk->foregroundColor()); | ||
176 | context.painter()->setBrush(lb); | 176 | context.painter()->setBrush(lb); | ||
177 | context.painter()->setPen(Qt::NoPen); | 177 | context.painter()->setPen(Qt::NoPen); | ||
178 | context.painter()->drawEllipse(rc.center(), sz.width() / 2 - ox, sz.height() / 2 - oy); | 178 | context.painter()->drawEllipse(rc.center(), sz.width() / 2 - ox, sz.height() / 2 - oy); | ||
Show All 31 Lines |