Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qtextdocument.cpp File Reference
#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 <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

Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt (unsigned int n)
 \inmodule QtCore \title Global Qt Declarations
 
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 2320 of file qtextdocument.cpp.

References QString::arg(), QString::at(), QString::chop(), QString::fromLatin1(), QString::number(), and QString::size().

+ 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 1305 of file qtextdocument.cpp.

References QString::at(), Qt::CaseInsensitive, Qt::CaseSensitive, cursor, QTextDocument::FindBackward, QTextDocument::FindCaseSensitively, QTextDocument::FindWholeWords, QTextCursorPrivate::fromPosition(), QTextDocumentPrivate::get(), QString::indexOf(), QChar::isLetterOrNumber(), QTextCursor::KeepAnchor, QString::lastIndexOf(), QChar::Nbsp, 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 2307 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()

◆ printPage()

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

Definition at line 1876 of file qtextdocument.cpp.

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

Referenced by QTextDocument::print().

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

◆ qHasPixmapTexture()

bool qHasPixmapTexture ( const QBrush brush)

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 113 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 2350 of file qtextdocument.cpp.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the caller graph for this function:

◆ richtextBorderStyleToHtmlBorderStyle()