Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtextimagehandler_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 QTEXTIMAGEHANDLER_P_H
5#define QTEXTIMAGEHANDLER_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 "QtCore/qobject.h"
20#include "QtGui/qabstracttextdocumentlayout.h"
21
22QT_BEGIN_NAMESPACE
23
24class QTextImageFormat;
25
26class Q_GUI_EXPORT QTextImageHandler : public QObject,
27 public QTextObjectInterface
28{
29 Q_OBJECT
30 Q_INTERFACES(QTextObjectInterface)
31public:
32 explicit QTextImageHandler(QObject *parent = nullptr);
33
34 virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
35 virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
36 QImage image(QTextDocument *doc, const QTextImageFormat &imageFormat);
37};
38
39QT_END_NAMESPACE
40
41#endif // QTEXTIMAGEHANDLER_P_H
void invalidate() const
virtual void fragmentRemoved(QChar type, uint fragment)
QTextFrame * parentFrame
QTextFrameLayoutData * layoutData
QList< QTextFrame * > childFrames
bool tryMerge(const QTextUndoCommand &other)
#define QTextBeginningOfFrame
#define QTextEndOfFrame
#define PMDEBUG
static bool isValidBlockSeparator(QChar ch)
static bool isAncestorFrame(QTextFrame *possibleAncestor, QTextFrame *child)
static bool noBlockInString(QStringView str)
#define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8)
static QTextFrame * findChildFrame(QTextFrame *f, int pos)
signed int length