Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportSectionData.cpp
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | |||||
97 | } | 97 | } | ||
98 | 98 | | |||
99 | void KReportSectionData::createProperties(const QDomElement & elemSource) | 99 | void KReportSectionData::createProperties(const QDomElement & elemSource) | ||
100 | { | 100 | { | ||
101 | m_set = new KPropertySet(this); | 101 | m_set = new KPropertySet(this); | ||
102 | KReportDesigner::addMetaProperties(m_set, | 102 | KReportDesigner::addMetaProperties(m_set, | ||
103 | tr("Section", "Report section"), QLatin1String("kreport-section-element")); | 103 | tr("Section", "Report section"), QLatin1String("kreport-section-element")); | ||
104 | 104 | | |||
105 | m_height = new KProperty("height", KReportUnit(KReportUnit::Centimeter).fromUserValue(2.0), tr("Height")); | 105 | m_height = new KProperty("height", KReportUnit(KReportUnit::Type::Centimeter).fromUserValue(2.0), tr("Height")); | ||
106 | m_backgroundColor = new KProperty("background-color", QColor(Qt::white), tr("Background Color")); | 106 | m_backgroundColor = new KProperty("background-color", QColor(Qt::white), tr("Background Color")); | ||
107 | m_height->setOption("unit", QLatin1String("cm")); | 107 | m_height->setOption("unit", QLatin1String("cm")); | ||
108 | if (!elemSource.isNull()) | 108 | if (!elemSource.isNull()) | ||
109 | m_height->setValue(KReportUnit::parseValue(elemSource.attribute(QLatin1String("svg:height"), QLatin1String("2.0cm")))); | 109 | m_height->setValue(KReportUnit::parseValue(elemSource.attribute(QLatin1String("svg:height"), QLatin1String("2.0cm")))); | ||
110 | 110 | | |||
111 | m_set->addProperty(m_height); | 111 | m_set->addProperty(m_height); | ||
112 | m_set->addProperty(m_backgroundColor); | 112 | m_set->addProperty(m_backgroundColor); | ||
113 | } | 113 | } | ||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |