Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/chart/KReportItemChart.cpp
Show All 12 Lines | |||||
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 "KReportItemChart.h" | 18 | #include "KReportItemChart.h" | ||
19 | 19 | | |||
20 | #include "KReportRenderObjects.h" | 20 | #include "KReportRenderObjects.h" | ||
21 | #include "KReportUtils.h" | ||||
21 | 22 | | |||
22 | #include <KDChartBarDiagram> | 23 | #include <KDChartBarDiagram> | ||
23 | #include <KDChartThreeDBarAttributes> | 24 | #include <KDChartThreeDBarAttributes> | ||
24 | #include <KDChartLineDiagram> | 25 | #include <KDChartLineDiagram> | ||
25 | #include <KDChartThreeDLineAttributes> | 26 | #include <KDChartThreeDLineAttributes> | ||
26 | #include <KDChartPieDiagram> | 27 | #include <KDChartPieDiagram> | ||
27 | #include <KDChartThreeDPieAttributes> | 28 | #include <KDChartThreeDPieAttributes> | ||
28 | #include <KDChartLegend> | 29 | #include <KDChartLegend> | ||
Show All 17 Lines | |||||
46 | { | 47 | { | ||
47 | createProperties(); | 48 | createProperties(); | ||
48 | } | 49 | } | ||
49 | 50 | | |||
50 | KReportItemChart::KReportItemChart(QDomNode *element) | 51 | KReportItemChart::KReportItemChart(QDomNode *element) | ||
51 | : KReportItemChart() | 52 | : KReportItemChart() | ||
52 | { | 53 | { | ||
53 | QDomElement e = element->toElement(); | 54 | QDomElement e = element->toElement(); | ||
54 | m_name->setValue(e.attribute("report:name")); | 55 | m_name->setValue(KReportUtils::readNameAttribute(e)); | ||
55 | m_dataSource->setValue(e.attribute("report:data-source")); | 56 | m_dataSource->setValue(e.attribute("report:data-source")); | ||
56 | Z = e.attribute("report:z-index").toDouble(); | 57 | Z = e.attribute("report:z-index").toDouble(); | ||
57 | m_chartType->setValue(e.attribute("report:chart-type").toInt()); | 58 | m_chartType->setValue(e.attribute("report:chart-type").toInt()); | ||
58 | m_chartSubType->setValue(e.attribute("report:chart-sub-type").toInt()); | 59 | m_chartSubType->setValue(e.attribute("report:chart-sub-type").toInt()); | ||
59 | m_threeD->setValue(e.attribute("report:three-dimensions")); | 60 | m_threeD->setValue(e.attribute("report:three-dimensions")); | ||
60 | 61 | | |||
61 | m_colorScheme->setValue(e.attribute("report:chart-color-scheme")); | 62 | m_colorScheme->setValue(e.attribute("report:chart-color-scheme")); | ||
62 | m_aa->setValue(e.attribute("report:antialiased")); | 63 | m_aa->setValue(e.attribute("report:antialiased")); | ||
63 | m_xTitle->setValue(e.attribute("report:title-x-axis")); | 64 | m_xTitle->setValue(e.attribute("report:title-x-axis")); | ||
64 | m_yTitle->setValue(e.attribute("report:title-y-axis")); | 65 | m_yTitle->setValue(e.attribute("report:title-y-axis")); | ||
65 | m_backgroundColor->setValue(e.attribute("report:background-color")); | 66 | m_backgroundColor->setValue(e.attribute("report:background-color")); | ||
66 | m_displayLegend->setValue(e.attribute("report:display-legend")); | 67 | m_displayLegend->setValue(e.attribute("report:display-legend")); | ||
67 | m_legendPosition->setValue(e.attribute("report:legend-position")); | 68 | m_legendPosition->setValue(e.attribute("report:legend-position")); | ||
68 | m_legendOrientation->setValue(e.attribute("report:legend-orientation")); | 69 | m_legendOrientation->setValue(e.attribute("report:legend-orientation")); | ||
69 | m_linkMaster->setValue(e.attribute("report:link-master")); | 70 | m_linkMaster->setValue(e.attribute("report:link-master")); | ||
70 | m_linkChild->setValue(e.attribute("report:link-child")); | 71 | m_linkChild->setValue(e.attribute("report:link-child")); | ||
71 | 72 | | |||
72 | parseReportRect(e, &m_pos, &m_size); | 73 | parseReportRect(e, &m_pos, &m_size); | ||
73 | | ||||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | 76 | | |||
77 | KReportItemChart::~KReportItemChart() | 77 | KReportItemChart::~KReportItemChart() | ||
78 | { | 78 | { | ||
79 | delete m_set; | 79 | delete m_set; | ||
80 | } | 80 | } | ||
81 | 81 | | |||
▲ Show 20 Lines • Show All 348 Lines • Show Last 20 Lines |