KD Reports API Documentation  2.0
KDReportsChartTextObject_p.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 CHARTTEXTOBJECT_H
18 #define CHARTTEXTOBJECT_H
19 
20 #ifdef HAVE_KDCHART
21 
22 #include <QTextObjectInterface>
23 
24 namespace KDReports {
25 
26 class ChartTextObject : public QObject, public QTextObjectInterface
27 {
28  Q_OBJECT
29  Q_INTERFACES(QTextObjectInterface)
30 
31 public:
32  enum { ChartObjectTextFormat = QTextFormat::UserObject + 2 };
33  enum { ChartObject = 1,
34  Size = 2,
35  Unit = 3 };
36 
37  static void registerChartTextObjectHandler(QTextDocument *doc);
38 
39  QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
40 
41  void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
42 };
43 
44 } // namespace
45 
46 #endif
47 
48 #endif /* CHARTTEXTOBJECT_H */
KDReports::Unit
Unit
Definition: KDReportsUnit.h:39
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