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
qtextdocument.cpp File Reference

(20521c31634b81543af68dc3166f9804c804f911)

#include "qtextdocument.h"
#include <qtextformat.h>
#include "qtextcursor_p.h"
#include "qtextdocument_p.h"
#include "qtextdocumentlayout_p.h"
#include "qtextdocumentfragment.h"
#include "qtextdocumentfragment_p.h"
#include "qtexttable.h"
#include "qtextlist.h"
#include <qdebug.h>
#include <qloggingcategory.h>
#include <qvarlengtharray.h>
#include <qthread.h>
#include <qcoreapplication.h>
#include <qmetaobject.h>
#include "qtexthtmlparser_p.h"
#include "qpainter.h"
#include <qfile.h>
#include <qfileinfo.h>
#include <qdir.h>
#include "qfont_p.h"
#include "private/qdataurl_p.h"
#include <private/qabstracttextdocumentlayout_p.h>
#include "qpagedpaintdevice.h"
#include "private/qpagedpaintdevice_p.h"
#include <limits.h>
#include "moc_qtextdocument.cpp"
+ Include dependency graph for qtextdocument.cpp:

Go to the source code of this file.

Functions

QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY (lcLayout)
 
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt (unsigned int n)
 \inmodule QtCore \title Global Qt Declarations
 
template<typename T >
static bool mightBeRichTextImpl (T text)
 
static bool mightBeRichTextImpl (QUtf8StringView text)
 
static bool findInBlock (const QTextBlock &block, const QString &expression, int offset, QTextDocument::FindFlags options, QTextCursor *cursor)
 
static void printPage (int index, QPainter *painter, const QTextDocument *doc, const QRectF &body, const QPointF &pageNumberPos)
 
static QTextFormat formatDifference (const QTextFormat &from, const QTextFormat &to)
 
static QString colorValue (QColor color)
 
static QStringList resolvedFontFamilies (const QTextCharFormat &format)
 
static QLatin1StringView richtextBorderStyleToHtmlBorderStyle (QTextFrameFormat::BorderStyle style)
 
static bool isOrderedList (int style)
 
bool qHasPixmapTexture (const QBrush &brush)
 

Function Documentation

◆ colorValue()

static QString colorValue ( QColor color)
static

Definition at line 2364 of file qtextdocument.cpp.

References QString::fromLatin1(), and QString::number().

+ Here is the call graph for this function:

◆ findInBlock()

static bool findInBlock ( const QTextBlock & block,
const QString & expression,
int offset,
QTextDocument::FindFlags options,
QTextCursor * cursor )
static

Definition at line 1345 of file qtextdocument.cpp.

References QString::at(), Qt::CaseInsensitive, Qt::CaseSensitive, cursor, QTextDocument::FindBackward, QTextDocument::FindCaseSensitively, QTextDocument::FindWholeWords, QTextCursorPrivate::fromPosition(), QTextDocumentPrivate::get(), QString::indexOf(), QTextCursor::KeepAnchor, QString::lastIndexOf(), QTextBlock::position(), QString::replace(), QString::size(), text, and QTextBlock::text().

Referenced by QTextDocument::find().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatDifference()

static QTextFormat formatDifference ( const QTextFormat & from,
const QTextFormat & to )
static

Definition at line 2351 of file qtextdocument.cpp.

References QSet< T >::begin(), QTextFormat::clearProperty(), it, QTextFormat::properties(), and QTextFormat::property().

+ Here is the call graph for this function:

◆ isOrderedList()

◆ mightBeRichTextImpl() [1/2]

static bool mightBeRichTextImpl ( QUtf8StringView text)
static

Definition at line 131 of file qtextdocument.cpp.

References mightBeRichTextImpl(), and text.

+ Here is the call graph for this function:

◆ mightBeRichTextImpl() [2/2]

template<typename T >
static bool mightBeRichTextImpl ( T text)
static

Definition at line 72 of file qtextdocument.cpp.

References QString::at(), Qt::CaseInsensitive, QString::compare(), i, QString::indexOf(), QString::isEmpty(), QTextHtmlParser::lookupElement(), QString::mid(), open(), QString::size(), tag, and text.

Referenced by Qt::mightBeRichText(), and mightBeRichTextImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printPage()

static void printPage ( int index,
QPainter * painter,
const QTextDocument * doc,
const QRectF & body,
const QPointF & pageNumberPos )
static

Definition at line 1920 of file qtextdocument.cpp.

References Qt::black, QTextDocument::defaultFont, QTextDocument::documentLayout(), QPainter::drawText(), QPainter::fontMetrics(), QRectF::height(), QFontMetrics::horizontalAdvance(), layout, QRectF::left(), QString::number(), painter, qRound(), QPainter::restore(), QPainter::save(), QPainter::setClipping(), QPainter::setClipRect(), QPainter::setFont(), QPalette::Text, QRectF::top(), QPainter::translate(), view, and QRectF::width().

Referenced by QTextDocument::print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_DECLARE_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY ( lcLayout )

◆ qHasPixmapTexture()

bool qHasPixmapTexture ( const QBrush & brush)
extern

Definition at line 84 of file qbrush.cpp.

Referenced by QTextHtmlParserNode::applyForegroundImage(), QQC2::QWindowsStyle::drawControl(), QEmulationPaintEngine::fill(), QOpenGL2PaintEngineExPrivate::setBrush(), QSpanData::setup(), QOpenGL2PaintEngineExPrivate::updateBrushUniforms(), and QPainterPrivate::updateEmulationSpecifier().

+ Here is the caller graph for this function:

◆ qt_int_sqrt()

Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt ( unsigned int n)

\inmodule QtCore \title Global Qt Declarations

The <QtGlobal> header file includes an assortment of other headers.

Up to Qt 6.5, most Qt header files included <QtGlobal>. Before Qt 6.5, <QtGlobal> defined an assortment of global declarations. Most of these have moved, at Qt 6.5, to separate headers, so that source code can include only what it needs, rather than the whole assortment. For now, <QtGlobal> includes those other headers (see next section), but future releases of Qt may remove some of these headers from <QtGlobal> or condition their inclusion on a version check. Likewise, in future releases, some Qt headers that currently include <QtGlobal> may stop doing so. The hope is that this will improve compilation times by avoiding global declarations when they are not used.

Definition at line 98 of file qglobal.cpp.

References qt_int_sqrt(), and r2.

Referenced by QTextDocument::adjustSize(), and qt_int_sqrt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolvedFontFamilies()

static QStringList resolvedFontFamilies ( const QTextCharFormat & format)
static

Definition at line 2394 of file qtextdocument.cpp.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the caller graph for this function:

◆ richtextBorderStyleToHtmlBorderStyle()