Changeset View
Changeset View
Standalone View
Standalone View
src/items/check/KReportItemCheck.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | |||||
115 | QString KReportItemCheckBox::typeName() const | 115 | QString KReportItemCheckBox::typeName() const | ||
116 | { | 116 | { | ||
117 | return QLatin1String("check"); | 117 | return QLatin1String("check"); | ||
118 | } | 118 | } | ||
119 | 119 | | |||
120 | int KReportItemCheckBox::renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, | 120 | int KReportItemCheckBox::renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, | ||
121 | const QVariant &data, KReportScriptHandler *script) | 121 | const QVariant &data, KReportScriptHandler *script) | ||
122 | { | 122 | { | ||
123 | OROCheck *chk = new OROCheck(); | 123 | OROCheckBox *chk = new OROCheckBox(); | ||
124 | 124 | | |||
125 | chk->setPosition(scenePosition(position()) + offset); | 125 | chk->setPosition(scenePosition(position()) + offset); | ||
126 | chk->setSize(sceneSize(size())); | 126 | chk->setSize(sceneSize(size())); | ||
127 | 127 | | |||
128 | chk->setLineStyle(lineStyle()); | 128 | chk->setLineStyle(lineStyle()); | ||
129 | chk->setForegroundColor(m_foregroundColor->value().value<QColor>()); | 129 | chk->setForegroundColor(m_foregroundColor->value().value<QColor>()); | ||
130 | chk->setCheckType(m_checkStyle->value().toString()); | 130 | chk->setCheckType(m_checkStyle->value().toString()); | ||
131 | 131 | | |||
Show All 22 Lines | 144 | #endif | |||
154 | 154 | | |||
155 | } else { | 155 | } else { | ||
156 | v = value(); | 156 | v = value(); | ||
157 | } | 157 | } | ||
158 | 158 | | |||
159 | chk->setValue(v); | 159 | chk->setValue(v); | ||
160 | 160 | | |||
161 | if (page) { | 161 | if (page) { | ||
162 | page->addPrimitive(chk); | 162 | page->insertPrimitive(chk); | ||
163 | } | 163 | } | ||
164 | 164 | | |||
165 | if (section) { | 165 | if (section) { | ||
166 | OROCheck *chk2 = dynamic_cast<OROCheck*>(chk->clone()); | 166 | OROCheckBox *chk2 = dynamic_cast<OROCheckBox*>(chk->clone()); | ||
167 | chk2->setPosition(scenePosition(position())); | 167 | chk2->setPosition(scenePosition(position())); | ||
168 | section->addPrimitive(chk2); | 168 | section->addPrimitive(chk2); | ||
169 | } | 169 | } | ||
170 | 170 | | |||
171 | if (!page) { | 171 | if (!page) { | ||
172 | delete chk; | 172 | delete chk; | ||
173 | } | 173 | } | ||
174 | 174 | | |||
Show All 12 Lines |