KD Reports API Documentation  2.0
KDReportsHLineTextObject_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 HLINETEXTOBJECT_H
18 #define HLINETEXTOBJECT_H
19 
20 #include <QTextObjectInterface>
21 
22 QT_BEGIN_NAMESPACE
23 class QTextDocument;
24 class QTextFormat;
25 class QPainter;
26 class QRectF;
27 QT_END_NAMESPACE
28 
29 namespace KDReports {
30 
31 class HLineTextObject : public QObject, public QTextObjectInterface
32 {
33  Q_OBJECT
34  Q_INTERFACES(QTextObjectInterface)
35 
36 public:
37  using QObject::QObject;
38 
39  enum { HLineTextFormat = QTextFormat::UserObject + 1 };
40  enum { Color = 1 };
41  enum { Thickness = 2 };
42  enum { Margin = 3 };
43 
49  static void registerHLineObjectHandler(QTextDocument *doc);
50 
51  QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
52 
53  void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
54 };
55 
56 }
57 
58 #endif /* HLINETEXTOBJECT_H */
KDReports::HLineTextObject::registerHLineObjectHandler
static void registerHLineObjectHandler(QTextDocument *doc)
Definition: KDReportsHLineTextObject.cpp:46
KDReports::HLineTextObject
Definition: KDReportsHLineTextObject_p.h:31
KDReports::HLineTextObject::Color
@ Color
Definition: KDReportsHLineTextObject_p.h:40
KDReports::HLineTextObject::Thickness
@ Thickness
Definition: KDReportsHLineTextObject_p.h:41
KDReports::HLineTextObject::intrinsicSize
QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override
KDReports::HLineTextObject::Margin
@ Margin
Definition: KDReportsHLineTextObject_p.h:42
KDReports::HLineTextObject::HLineTextFormat
@ HLineTextFormat
Definition: KDReportsHLineTextObject_p.h:39
KDReports::HLineTextObject::drawObject
void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override
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