KD Reports API Documentation  2.2
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 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDREPORTSCHARTELEMENT_H
12 #define KDREPORTSCHARTELEMENT_H
13 
14 #include "KDReportsElement.h"
15 #include "KDReportsUnit.h"
16 #include <QSharedDataPointer>
17 #include <QSizeF>
18 #include <QtCore/QtGlobal> // qreal
19 
20 QT_BEGIN_NAMESPACE
21 class QAbstractItemModel;
22 QT_END_NAMESPACE
23 
24 namespace KDChart {
25 class Chart;
26 }
27 
28 namespace KDReports {
29 class ChartElementPrivate;
30 
36 {
37 public:
41  explicit ChartElement(QAbstractItemModel *tableModel);
42 
48  explicit ChartElement(const QString &modelKey);
49 
58  explicit ChartElement(KDChart::Chart *chart);
59 
63  ~ChartElement() override;
64 
68  ChartElement(const ChartElement &other);
72  ChartElement &operator=(const ChartElement &other);
73 
83  void setChart(KDChart::Chart *chart);
84 
95  void setSize(qreal width, qreal height, Unit unit = Millimeters);
96 
101  QSizeF size() const;
102 
107  Unit unit() const;
108 
113  void setTableModel(QAbstractItemModel *tableModel);
114 
119  void setModelKey(const QString &modelKey);
120 
125  void build(ReportBuilder &) const override;
130  Element *clone() const override;
131 
132 private:
133  QSharedDataPointer<ChartElementPrivate> d;
134 };
135 
136 }
137 
138 #endif /* KDREPORTSCHARTELEMENT_H */
#define KDREPORTS_EXPORT
@ Millimeters
Millimeters (the default)
Definition: KDReportsUnit.h:21

© 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 by doxygen 1.9.1