Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
23#include "QtCore/qhash.h"
24#include <QtCore/qpointer.h>
25
27
34typedef QHash<int, QTextObjectHandler> HandlerHash;
35
37{
38public:
39 Q_DECLARE_PUBLIC(QAbstractTextDocumentLayout)
40
42 : paintDevice(nullptr) {}
44
45 inline void setDocument(QTextDocument *doc) {
46 document = doc;
47 docPrivate = nullptr;
48 if (doc)
49 docPrivate = QTextDocumentPrivate::get(doc);
50 }
51
56
57 bool hasHandlers() const
58 {
59 return !handlers.isEmpty();
60 }
61
62 inline int _q_dynamicPageCountSlot() const
63 { return q_func()->pageCount(); }
65 { return q_func()->documentSize(); }
66
68
69 void _q_handlerDestroyed(QObject *obj);
71
74};
75
77
78#endif // QABSTRACTTEXTDOCUMENTLAYOUT_P_H
static QAbstractTextDocumentLayoutPrivate * get(QAbstractTextDocumentLayout *layout)
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
Definition qsize.h:208
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