Changeset View
Changeset View
Standalone View
Standalone View
src/items/check/KReportItemCheck.cpp
Show All 11 Lines | |||||
12 | * Lesser General Public License for more details. | 12 | * Lesser General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Lesser General Public | 14 | * You should have received a copy of the GNU Lesser General Public | ||
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include "KReportItemCheck.h" | 18 | #include "KReportItemCheck.h" | ||
19 | #include "KReportRenderObjects.h" | 19 | #include "KReportRenderObjects.h" | ||
20 | #include "KReportUtils.h" | ||||
21 | #include "KReportUtils_p.h" | ||||
20 | #include "kreportplugin_debug.h" | 22 | #include "kreportplugin_debug.h" | ||
21 | #ifdef KREPORT_SCRIPTING | 23 | #ifdef KREPORT_SCRIPTING | ||
22 | #include "renderer/scripting/KReportScriptHandler.h" | 24 | #include "renderer/scripting/KReportScriptHandler.h" | ||
23 | #endif | 25 | #endif | ||
24 | 26 | | |||
25 | #include <KPropertySet> | 27 | #include <KPropertySet> | ||
26 | 28 | | |||
27 | #include <QPalette> | 29 | #include <QPalette> | ||
28 | #include <QDomNodeList> | 30 | #include <QDomNodeList> | ||
29 | 31 | | |||
30 | KReportItemCheckBox::KReportItemCheckBox() | 32 | KReportItemCheckBox::KReportItemCheckBox() | ||
31 | { | 33 | { | ||
32 | createProperties(); | 34 | createProperties(); | ||
33 | } | 35 | } | ||
34 | 36 | | |||
35 | KReportItemCheckBox::KReportItemCheckBox(const QDomNode &element) | 37 | KReportItemCheckBox::KReportItemCheckBox(const QDomNode &element) | ||
36 | : KReportItemCheckBox() | 38 | : KReportItemCheckBox() | ||
37 | { | 39 | { | ||
38 | nameProperty()->setValue(element.toElement().attribute(QLatin1String("report:name"))); | 40 | nameProperty()->setValue(KReportUtils::readNameAttribute(element.toElement())); | ||
39 | m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source"))); | 41 | m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source"))); | ||
40 | setZ(element.toElement().attribute(QLatin1String("report:z-index")).toDouble()); | 42 | setZ(KReportUtils::readZAttribute(element.toElement())); | ||
41 | m_foregroundColor->setValue(QColor(element.toElement().attribute(QLatin1String("fo:foreground-color")))); | 43 | m_foregroundColor->setValue(QColor(element.toElement().attribute(QLatin1String("fo:foreground-color")))); | ||
42 | m_checkStyle->setValue(element.toElement().attribute(QLatin1String("report:check-style"))); | 44 | m_checkStyle->setValue(element.toElement().attribute(QLatin1String("report:check-style"))); | ||
43 | m_staticValue->setValue(QVariant(element.toElement().attribute(QLatin1String("report:value"))).toBool()); | 45 | m_staticValue->setValue(QVariant(element.toElement().attribute(QLatin1String("report:value"))).toBool()); | ||
44 | 46 | | |||
45 | parseReportRect(element.toElement()); | 47 | parseReportRect(element.toElement()); | ||
46 | 48 | | |||
47 | QDomNodeList nl = element.childNodes(); | 49 | QDomNodeList nl = element.childNodes(); | ||
48 | QString n; | 50 | QString n; | ||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |