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 <KPropertyListData> | 27 | #include <KPropertyListData> | ||
26 | #include <KPropertySet> | 28 | #include <KPropertySet> | ||
27 | 29 | | |||
28 | #include <QPalette> | 30 | #include <QPalette> | ||
29 | #include <QDomNodeList> | 31 | #include <QDomNodeList> | ||
30 | 32 | | |||
31 | KReportItemCheckBox::KReportItemCheckBox() | 33 | KReportItemCheckBox::KReportItemCheckBox() | ||
32 | { | 34 | { | ||
33 | createProperties(); | 35 | createProperties(); | ||
34 | } | 36 | } | ||
35 | 37 | | |||
36 | KReportItemCheckBox::KReportItemCheckBox(const QDomNode &element) | 38 | KReportItemCheckBox::KReportItemCheckBox(const QDomNode &element) | ||
37 | : KReportItemCheckBox() | 39 | : KReportItemCheckBox() | ||
38 | { | 40 | { | ||
39 | nameProperty()->setValue(element.toElement().attribute(QLatin1String("report:name"))); | 41 | nameProperty()->setValue(KReportUtils::readNameAttribute(element.toElement())); | ||
40 | m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source"))); | 42 | m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source"))); | ||
41 | setZ(element.toElement().attribute(QLatin1String("report:z-index")).toDouble()); | 43 | setZ(KReportUtils::readZAttribute(element.toElement())); | ||
42 | m_foregroundColor->setValue(QColor(element.toElement().attribute(QLatin1String("fo:foreground-color")))); | 44 | m_foregroundColor->setValue(QColor(element.toElement().attribute(QLatin1String("fo:foreground-color")))); | ||
43 | m_checkStyle->setValue(element.toElement().attribute(QLatin1String("report:check-style"))); | 45 | m_checkStyle->setValue(element.toElement().attribute(QLatin1String("report:check-style"))); | ||
44 | m_staticValue->setValue(QVariant(element.toElement().attribute(QLatin1String("report:value"))).toBool()); | 46 | m_staticValue->setValue(QVariant(element.toElement().attribute(QLatin1String("report:value"))).toBool()); | ||
45 | 47 | | |||
46 | parseReportRect(element.toElement()); | 48 | parseReportRect(element.toElement()); | ||
47 | 49 | | |||
48 | QDomNodeList nl = element.childNodes(); | 50 | QDomNodeList nl = element.childNodes(); | ||
49 | QString n; | 51 | QString n; | ||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |