Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportSection.cpp
Show All 34 Lines | |||||
35 | { | 35 | { | ||
36 | setObjectName(elemSource.tagName()); | 36 | setObjectName(elemSource.tagName()); | ||
37 | 37 | | |||
38 | if (objectName() != QLatin1String("report:section")) { | 38 | if (objectName() != QLatin1String("report:section")) { | ||
39 | m_valid = false; | 39 | m_valid = false; | ||
40 | return; | 40 | return; | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | m_type = sectionTypeFromString(elemSource.attribute(QLatin1String("report:section-type"))); | 43 | m_type = sectionTypeFromString(KReportUtils::readSectionTypeNameAttribute(elemSource)); | ||
44 | if (m_type == KReportSection::None) { | 44 | if (m_type == KReportSection::None) { | ||
45 | m_valid = false; | 45 | m_valid = false; | ||
46 | return; | 46 | return; | ||
47 | } | 47 | } | ||
48 | createProperties(elemSource); | 48 | createProperties(elemSource); | ||
49 | 49 | | |||
50 | m_backgroundColor->setValue(QColor(elemSource.attribute(QLatin1String("fo:background-color")))); | 50 | m_backgroundColor->setValue(QColor(elemSource.attribute(QLatin1String("fo:background-color")))); | ||
51 | 51 | | |||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | |||||
178 | 178 | | |||
179 | //static | 179 | //static | ||
180 | qreal KReportSection::defaultHeight() | 180 | qreal KReportSection::defaultHeight() | ||
181 | { | 181 | { | ||
182 | return KReportDesignGlobal::self()->defaultSectionHeight; | 182 | return KReportDesignGlobal::self()->defaultSectionHeight; | ||
183 | } | 183 | } | ||
184 | 184 | | |||
185 | //static | 185 | //static | ||
186 | void KReportSection::setDefaultHeight(qreal height) | 186 | void KReportSection::setDefaultHeight(qreal ptHeight) | ||
187 | { | 187 | { | ||
188 | KReportDesignGlobal::self()->defaultSectionHeight = height; | 188 | KReportDesignGlobal::self()->defaultSectionHeight = ptHeight; | ||
189 | } | 189 | } | ||
190 | 190 | | |||
191 | //static | 191 | //static | ||
192 | QColor KReportSection::defaultBackgroundColor() | 192 | QColor KReportSection::defaultBackgroundColor() | ||
193 | { | 193 | { | ||
194 | return KReportDesignGlobal::self()->defaultSectionBackgroundColor; | 194 | return KReportDesignGlobal::self()->defaultSectionBackgroundColor; | ||
195 | } | 195 | } | ||
196 | 196 | | |||
197 | //static | 197 | //static | ||
198 | void KReportSection::setDefaultBackgroundColor(const QColor &color) | 198 | void KReportSection::setDefaultBackgroundColor(const QColor &color) | ||
199 | { | 199 | { | ||
200 | KReportDesignGlobal::self()->defaultSectionBackgroundColor = color; | 200 | KReportDesignGlobal::self()->defaultSectionBackgroundColor = color; | ||
201 | } | 201 | } |