Changeset View
Changeset View
Standalone View
Standalone View
src/items/field/KReportItemField.cpp
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 38 | { | |||
---|---|---|---|---|---|
53 | 53 | | |||
54 | parseReportRect(element.toElement()); | 54 | parseReportRect(element.toElement()); | ||
55 | 55 | | |||
56 | for (int i = 0; i < nl.count(); i++) { | 56 | for (int i = 0; i < nl.count(); i++) { | ||
57 | node = nl.item(i); | 57 | node = nl.item(i); | ||
58 | n = node.nodeName(); | 58 | n = node.nodeName(); | ||
59 | 59 | | |||
60 | if (n == QLatin1String("report:text-style")) { | 60 | if (n == QLatin1String("report:text-style")) { | ||
61 | KRTextStyleData ts; | 61 | KReportTextStyleData ts; | ||
62 | if (parseReportTextStyleData(node.toElement(), &ts)) { | 62 | if (parseReportTextStyleData(node.toElement(), &ts)) { | ||
63 | m_backgroundColor->setValue(ts.backgroundColor); | 63 | m_backgroundColor->setValue(ts.backgroundColor); | ||
64 | m_foregroundColor->setValue(ts.foregroundColor); | 64 | m_foregroundColor->setValue(ts.foregroundColor); | ||
65 | m_backgroundOpacity->setValue(ts.backgroundOpacity); | 65 | m_backgroundOpacity->setValue(ts.backgroundOpacity); | ||
66 | m_font->setValue(ts.font); | 66 | m_font->setValue(ts.font); | ||
67 | 67 | | |||
68 | } | 68 | } | ||
69 | } else if (n == QLatin1String("report:line-style")) { | 69 | } else if (n == QLatin1String("report:line-style")) { | ||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Line(s) | 168 | else | |||
169 | flags |= Qt::AlignTop; | 169 | flags |= Qt::AlignTop; | ||
170 | 170 | | |||
171 | if (m_wordWrap->value().toBool() == true) { | 171 | if (m_wordWrap->value().toBool() == true) { | ||
172 | flags |= Qt::TextWordWrap; | 172 | flags |= Qt::TextWordWrap; | ||
173 | } | 173 | } | ||
174 | return flags; | 174 | return flags; | ||
175 | } | 175 | } | ||
176 | 176 | | |||
177 | KRTextStyleData KReportItemField::textStyle() const | 177 | KReportTextStyleData KReportItemField::textStyle() const | ||
178 | { | 178 | { | ||
179 | KRTextStyleData d; | 179 | KReportTextStyleData d; | ||
180 | d.backgroundColor = m_backgroundColor->value().value<QColor>(); | 180 | d.backgroundColor = m_backgroundColor->value().value<QColor>(); | ||
181 | d.foregroundColor = m_foregroundColor->value().value<QColor>(); | 181 | d.foregroundColor = m_foregroundColor->value().value<QColor>(); | ||
182 | d.font = m_font->value().value<QFont>(); | 182 | d.font = m_font->value().value<QFont>(); | ||
183 | d.backgroundOpacity = m_backgroundOpacity->value().toInt(); | 183 | d.backgroundOpacity = m_backgroundOpacity->value().toInt(); | ||
184 | 184 | | |||
185 | return d; | 185 | return d; | ||
186 | } | 186 | } | ||
187 | 187 | | |||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |