KD Reports API Documentation  2.0
KDReportsChartElement.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDReports OR LicenseRef-KDAB-KDReports-US
8 **
9 ** Licensees holding valid commercial KD Reports licenses may use this file in
10 ** accordance with the KD Reports Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 
17 #ifndef KDREPORTSCHARTELEMENT_H
18 #define KDREPORTSCHARTELEMENT_H
19 
20 #include "KDReportsElement.h"
21 #include "KDReportsUnit.h"
22 #include <QSharedDataPointer>
23 #include <QSizeF>
24 #include <QtCore/QtGlobal> // qreal
25 
26 QT_BEGIN_NAMESPACE
27 class QAbstractItemModel;
28 QT_END_NAMESPACE
29 
30 namespace KDChart {
31 class Chart;
32 }
33 
34 namespace KDReports {
35 class ChartElementPrivate;
36 
42 {
43 public:
47  explicit ChartElement(QAbstractItemModel *tableModel);
48 
54  explicit ChartElement(const QString &modelKey);
55 
64  explicit ChartElement(KDChart::Chart *chart);
65 
69  ~ChartElement() override;
70 
74  ChartElement(const ChartElement &other);
78  ChartElement &operator=(const ChartElement &other);
79 
89  void setChart(KDChart::Chart *chart);
90 
101  void setSize(qreal width, qreal height, Unit unit = Millimeters);
102 
107  QSizeF size() const;
108 
113  Unit unit() const;
114 
119  void setTableModel(QAbstractItemModel *tableModel);
120 
125  void setModelKey(const QString &modelKey);
126 
131  void build(ReportBuilder &) const override;
136  Element *clone() const override;
137 
138 private:
139  QSharedDataPointer<ChartElementPrivate> d;
140 };
141 
142 }
143 
144 #endif /* KDREPORTSCHARTELEMENT_H */
KDReports::ReportBuilder
Definition: KDReportsReportBuilder_p.h:41
KDReports::Millimeters
@ Millimeters
Millimeters (the default)
Definition: KDReportsUnit.h:54
KDReports::Element
Definition: KDReportsElement.h:39
KDChart
Definition: KDReportsChartElement.h:30
KDReportsElement.h
KDReports::Unit
Unit
Definition: KDReportsUnit.h:39
KDReports::ChartElement
Definition: KDReportsChartElement.h:41
KDReportsUnit.h
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
KDReports
Definition: KDReportsAbstractReportLayout_p.h:30

© 2007-2021 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17