KD Reports API Documentation  2.2
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 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef HLINETEXTOBJECT_H
12 #define HLINETEXTOBJECT_H
13 
14 #include <QTextObjectInterface>
15 
16 QT_BEGIN_NAMESPACE
17 class QTextDocument;
18 class QTextFormat;
19 class QPainter;
20 class QRectF;
21 QT_END_NAMESPACE
22 
23 namespace KDReports {
24 
25 class HLineTextObject : public QObject, public QTextObjectInterface
26 {
27  Q_OBJECT
28  Q_INTERFACES(QTextObjectInterface)
29 
30 public:
31  using QObject::QObject;
32 
33  enum
34  {
35  HLineTextFormat = QTextFormat::UserObject + 1
36  };
37  enum
38  {
39  Color = 1,
40  Thickness = 2,
41  Margin = 3,
42  };
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 */
QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override
static void registerHLineObjectHandler(QTextDocument *doc)
void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override

© 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