Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qabstracttextdocumentlayout_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QABSTRACTTEXTDOCUMENTLAYOUT_P_H
5#define QABSTRACTTEXTDOCUMENTLAYOUT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
19#include "private/qobject_p.h"
20#include "qtextdocument_p.h"
22#include "QtCore/qhash.h"
23
25
27{
31};
33
35{
36public:
37 Q_DECLARE_PUBLIC(QAbstractTextDocumentLayout)
38
40 : paintDevice(nullptr) {}
42
43 inline void setDocument(QTextDocument *doc) {
44 document = doc;
45 docPrivate = nullptr;
46 if (doc)
47 docPrivate = QTextDocumentPrivate::get(doc);
48 }
49
51 {
52 return layout->d_func();
53 }
54
55 bool hasHandlers() const
56 {
57 return !handlers.isEmpty();
58 }
59
60 inline int _q_dynamicPageCountSlot() const
61 { return q_func()->pageCount(); }
63 { return q_func()->documentSize(); }
64
66
67 void _q_handlerDestroyed(QObject *obj);
69
72};
73
75
76#endif // QABSTRACTTEXTDOCUMENTLAYOUT_P_H
static QAbstractTextDocumentLayoutPrivate * get(QAbstractTextDocumentLayout *layout)
\inmodule QtCore
Definition qhash.h:818
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore
Definition qpointer.h:18
\inmodule QtCore
Definition qsize.h:207
static const QTextDocumentPrivate * get(const QTextDocument *document)
\reentrant \inmodule QtGui
The QTextObjectInterface class allows drawing of custom text objects in \l{QTextDocument}s.
Combined button and popup list for selecting options.
QHash< int, QTextObjectHandler > HandlerHash
GLhandleARB obj
[2]
QObject::connect nullptr
QVBoxLayout * layout