Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/barcode/KReportItemBarcode.cpp
Show All 31 Lines | 31 | KReportItemBarcode::KReportItemBarcode() | |||
---|---|---|---|---|---|
32 | : m_minWidthData(0), m_minWidthTotal(0), m_minHeight(0) | 32 | : m_minWidthData(0), m_minWidthTotal(0), m_minHeight(0) | ||
33 | { | 33 | { | ||
34 | createProperties(); | 34 | createProperties(); | ||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | KReportItemBarcode::KReportItemBarcode(const QDomNode & element) | 37 | KReportItemBarcode::KReportItemBarcode(const QDomNode & element) | ||
38 | : KReportItemBarcode() | 38 | : KReportItemBarcode() | ||
39 | { | 39 | { | ||
40 | nameProperty()->setValue(element.toElement().attribute(QLatin1String("report:name"))); | 40 | nameProperty()->setValue(KReportUtils::readNameAttribute(element.toElement())); | ||
41 | m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source"))); | 41 | m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source"))); | ||
42 | m_itemValue->setValue(element.toElement().attribute(QLatin1String("report:value"))); | 42 | m_itemValue->setValue(element.toElement().attribute(QLatin1String("report:value"))); | ||
43 | setZ(element.toElement().attribute(QLatin1String("report:z-index")).toDouble()); | 43 | setZ(element.toElement().attribute(QLatin1String("report:z-index")).toDouble()); | ||
44 | m_horizontalAlignment->setValue(element.toElement().attribute(QLatin1String("report:horizontal-align"))); | 44 | m_horizontalAlignment->setValue(element.toElement().attribute(QLatin1String("report:horizontal-align"))); | ||
45 | m_maxLength->setValue(element.toElement().attribute(QLatin1String("report:barcode-max-length")).toInt()); | 45 | m_maxLength->setValue(element.toElement().attribute(QLatin1String("report:barcode-max-length")).toInt()); | ||
46 | m_format->setValue(element.toElement().attribute(QLatin1String("report:barcode-format"))); | 46 | m_format->setValue(element.toElement().attribute(QLatin1String("report:barcode-format"))); | ||
47 | parseReportRect(element.toElement()); | 47 | parseReportRect(element.toElement()); | ||
48 | | ||||
49 | } | 48 | } | ||
50 | 49 | | |||
51 | void KReportItemBarcode::setMaxLength(int i) | 50 | void KReportItemBarcode::setMaxLength(int i) | ||
52 | { | 51 | { | ||
53 | if (i > 0) { | 52 | if (i > 0) { | ||
54 | if (m_maxLength->value().toInt() != i) { | 53 | if (m_maxLength->value().toInt() != i) { | ||
55 | m_maxLength->setValue(i); | 54 | m_maxLength->setValue(i); | ||
56 | } | 55 | } | ||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |