Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QTextDocumentLayoutPrivate Class Reference
+ Inheritance diagram for QTextDocumentLayoutPrivate:
+ Collaboration diagram for QTextDocumentLayoutPrivate:

Public Types

enum  HitPoint { PointBefore , PointAfter , PointInside , PointExact }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData >
 

Public Member Functions

 QTextDocumentLayoutPrivate ()
 
QFixed blockIndent (const QTextBlockFormat &blockFormat) const
 
void drawFrame (const QPointF &offset, QPainter *painter, const QAbstractTextDocumentLayout::PaintContext &context, QTextFrame *f) const
 
void drawFlow (const QPointF &offset, QPainter *painter, const QAbstractTextDocumentLayout::PaintContext &context, QTextFrame::Iterator it, const QList< QTextFrame * > &floats, QTextBlock *cursorBlockNeedingRepaint) const
 
void drawBlock (const QPointF &offset, QPainter *painter, const QAbstractTextDocumentLayout::PaintContext &context, const QTextBlock &bl, bool inRootFrame) const
 
void drawListItem (const QPointF &offset, QPainter *painter, const QAbstractTextDocumentLayout::PaintContext &context, const QTextBlock &bl, const QTextCharFormat *selectionFormat) const
 
void drawTableCellBorder (const QRectF &cellRect, QPainter *painter, QTextTable *table, QTextTableData *td, const QTextTableCell &cell) const
 
void drawTableCell (const QRectF &cellRect, QPainter *painter, const QAbstractTextDocumentLayout::PaintContext &cell_context, QTextTable *table, QTextTableData *td, int r, int c, QTextBlock *cursorBlockNeedingRepaint, QPointF *cursorBlockOffset) const
 
void drawBorder (QPainter *painter, const QRectF &rect, qreal topMargin, qreal bottomMargin, qreal border, const QBrush &brush, QTextFrameFormat::BorderStyle style) const
 
void drawFrameDecoration (QPainter *painter, QTextFrame *frame, QTextFrameData *fd, const QRectF &clip, const QRectF &rect) const
 
HitPoint hitTest (QTextFrame *frame, const QFixedPoint &point, int *position, QTextLayout **l, Qt::HitTestAccuracy accuracy) const
 
HitPoint hitTest (QTextFrame::Iterator it, HitPoint hit, const QFixedPoint &p, int *position, QTextLayout **l, Qt::HitTestAccuracy accuracy) const
 
HitPoint hitTest (QTextTable *table, const QFixedPoint &point, int *position, QTextLayout **l, Qt::HitTestAccuracy accuracy) const
 
HitPoint hitTest (const QTextBlock &bl, const QFixedPoint &point, int *position, QTextLayout **l, Qt::HitTestAccuracy accuracy) const
 
QTextLayoutStruct layoutCell (QTextTable *t, const QTextTableCell &cell, QFixed width, int layoutFrom, int layoutTo, QTextTableData *tableData, QFixed absoluteTableY, bool withPageBreaks)
 
void setCellPosition (QTextTable *t, const QTextTableCell &cell, const QPointF &pos)
 
QRectF layoutTable (QTextTable *t, int layoutFrom, int layoutTo, QFixed parentY)
 
void positionFloat (QTextFrame *frame, QTextLine *currentLine=nullptr)
 
QRectF layoutFrame (QTextFrame *f, int layoutFrom, int layoutTo, QFixed parentY=0)
 
QRectF layoutFrame (QTextFrame *f, int layoutFrom, int layoutTo, QFixed frameWidth, QFixed frameHeight, QFixed parentY=0)
 
void layoutBlock (const QTextBlock &bl, int blockPosition, const QTextBlockFormat &blockFormat, QTextLayoutStruct *layoutStruct, int layoutFrom, int layoutTo, const QTextBlockFormat *previousBlockFormat)
 
void layoutFlow (QTextFrame::Iterator it, QTextLayoutStruct *layoutStruct, int layoutFrom, int layoutTo, QFixed width=0)
 
void floatMargins (QFixed y, const QTextLayoutStruct *layoutStruct, QFixed *left, QFixed *right) const
 
QFixed findY (QFixed yFrom, const QTextLayoutStruct *layoutStruct, QFixed requiredWidth) const
 
QTextFrame::Iterator frameIteratorForYPosition (QFixed y) const
 
QTextFrame::Iterator frameIteratorForTextPosition (int position) const
 
void ensureLayouted (QFixed y) const
 
void ensureLayoutedByPosition (int position) const
 
void ensureLayoutFinished () const
 
void layoutStep () const
 
QRectF frameBoundingRectInternal (QTextFrame *frame) const
 
qreal scaleToDevice (qreal value) const
 
QFixed scaleToDevice (QFixed value) const
 
- Public Member Functions inherited from QAbstractTextDocumentLayoutPrivate
 QAbstractTextDocumentLayoutPrivate ()
 
 ~QAbstractTextDocumentLayoutPrivate ()
 
void setDocument (QTextDocument *doc)
 
bool hasHandlers () const
 
int _q_dynamicPageCountSlot () const
 
QSizeF _q_dynamicDocumentSizeSlot () const
 
void _q_handlerDestroyed (QObject *obj)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
void _q_reregisterTimers (void *pointer)
 
bool isSender (const QObject *receiver, const char *signal) const
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

QTextOption::WrapMode wordWrapMode
 
int fixedColumnWidth
 
int cursorWidth
 
QSizeF lastReportedSize
 
QRectF viewportRect
 
QRectF clipRect
 
int currentLazyLayoutPosition
 
int lazyLayoutStepSize
 
QBasicTimer layoutTimer
 
QBasicTimer sizeChangedTimer
 
uint showLayoutProgress: 1
 
uint insideDocumentChange: 1
 
int lastPageCount
 
qreal idealWidth
 
bool contentHasAlignment
 
QList< QCheckPointcheckPoints
 
- Public Attributes inherited from QAbstractTextDocumentLayoutPrivate
HandlerHash handlers
 
QPaintDevicepaintDevice
 
QTextDocumentdocument
 
QTextDocumentPrivatedocPrivate
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint unused: 21
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Static Public Member Functions inherited from QAbstractTextDocumentLayoutPrivate
static QAbstractTextDocumentLayoutPrivateget (QAbstractTextDocumentLayout *layout)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Detailed Description

Definition at line 475 of file qtextdocumentlayout.cpp.

Member Enumeration Documentation

◆ HitPoint

Enumerator
PointBefore 
PointAfter 
PointInside 
PointExact 

Definition at line 522 of file qtextdocumentlayout.cpp.

Constructor & Destructor Documentation

◆ QTextDocumentLayoutPrivate()

QTextDocumentLayoutPrivate::QTextDocumentLayoutPrivate ( )

Member Function Documentation

◆ blockIndent()

QFixed QTextDocumentLayoutPrivate::blockIndent ( const QTextBlockFormat blockFormat) const

Definition at line 841 of file qtextdocumentlayout.cpp.

References QAbstractTextDocumentLayoutPrivate::document, QTextObject::format(), QFixed::fromReal(), QTextBlockFormat::indent(), QTextListFormat::indent(), QTextDocument::indentWidth, QPaintDevice::logicalDpiY(), QTextDocument::objectForFormat(), QAbstractTextDocumentLayoutPrivate::paintDevice, qIsNull(), qt_defaultDpi(), and QTextFormat::toListFormat().

Referenced by layoutBlock().

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

◆ drawBlock()

void QTextDocumentLayoutPrivate::drawBlock ( const QPointF offset,
QPainter painter,
const QAbstractTextDocumentLayout::PaintContext context,
const QTextBlock bl,
bool  inRootFrame 
) const

Definition at line 1984 of file qtextdocumentlayout.cpp.

References QList< T >::append(), QTextFormat::background(), QTextFormat::BackgroundBrush, QTextBlock::blockFormat(), QTextFormat::BlockTrailingHorizontalRulerWidth, QTextLayout::boundingRect(), clipRect, QTextBlock::contains(), context, cursorWidth, QAbstractTextDocumentLayoutPrivate::document, QTextLayout::draw(), QTextLayout::drawCursor(), QPainter::drawLine(), drawListItem(), fillBackground(), frameIteratorForTextPosition(), QTextFormat::FullWidthSelection, QTextFormat::hasProperty(), i, QPalette::Inactive, QString::isEmpty(), isEmptyBlockBeforeTable(), QTextBlock::isVisible(), QTextBlock::layout(), QTextBlock::length(), QTextFormat::lengthProperty(), QTextLayout::lineForTextPosition(), QTextListFormat::ListStyleUndefined, Qt::NoBrush, o, QTextDocument::objectForFormat(), QTextDocument::pageSize, painter, QPainter::pen(), QTextLayout::position(), QTextBlock::position(), QTextLayout::preeditAreaPosition(), QTextLayout::preeditAreaText(), QTextFormat::property(), qCDebug, rect, QTextDocument::rootFrame(), QPainter::setPen(), QPalette::Text, QTextLine::textLength(), QTextLine::textStart(), QRectF::translate(), QTextLength::value(), QSizeF::width(), and QPalette::WindowText.

Referenced by drawFlow().

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

◆ drawBorder()

void QTextDocumentLayoutPrivate::drawBorder ( QPainter painter,
const QRectF rect,
qreal  topMargin,
qreal  bottomMargin,
qreal  border,
const QBrush brush,
QTextFrameFormat::BorderStyle  style 
) const

Definition at line 895 of file qtextdocumentlayout.cpp.

References QPainter::Antialiasing, QRectF::bottom(), QCss::BottomEdge, BorderPaginator::bottomPage, BorderPaginator::clipRect(), QAbstractTextDocumentLayoutPrivate::document, QPainter::drawRect(), i, QRectF::isValid(), QRectF::left(), QCss::LeftEdge, Qt::NoPen, painter, Q_UNUSED, qDrawEdge(), rect, QPainter::renderHints(), QPainter::restore(), QRectF::right(), QCss::RightEdge, QPainter::save(), QPainter::setBrush(), QPainter::setPen(), QPainter::setRenderHint(), QRectF::top(), QCss::TopEdge, and BorderPaginator::topPage.

Referenced by drawFrameDecoration(), and drawTableCell().

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

◆ drawFlow()

void QTextDocumentLayoutPrivate::drawFlow ( const QPointF offset,
QPainter painter,
const QAbstractTextDocumentLayout::PaintContext context,
QTextFrame::Iterator  it,
const QList< QTextFrame * > &  floats,
QTextBlock cursorBlockNeedingRepaint 
) const

Definition at line 1907 of file qtextdocumentlayout.cpp.

References QList< T >::at(), QList< T >::begin(), QTextBlock::blockFormat(), checkPoints, QList< T >::constLast(), QTextBlock::contains(), context, QAbstractTextDocumentLayoutPrivate::document, drawBlock(), drawFrame(), QTextObjectInterface::drawObject(), QList< T >::end(), frame, frameBoundingRectInternal(), QFixed::fromReal(), i, QTextFrameFormat::InFlow, QList< T >::isEmpty(), isEmptyBlockAfterTable(), isEmptyBlockBeforeTable(), isFrameFromInlineObject(), it, painter, pos, QCheckPoint::positionInFrame, rect, QAbstractTextDocumentLayout::PaintContext::selections, and QList< T >::size().

Referenced by drawFrame(), and drawTableCell().

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

◆ drawFrame()

void QTextDocumentLayoutPrivate::drawFrame ( const QPointF offset,
QPainter painter,
const QAbstractTextDocumentLayout::PaintContext context,
QTextFrame f 
) const

◆ drawFrameDecoration()

void QTextDocumentLayoutPrivate::drawFrameDecoration ( QPainter painter,
QTextFrame frame,
QTextFrameData fd,
const QRectF clip,
const QRectF rect 
) const

Definition at line 934 of file qtextdocumentlayout.cpp.

References QRectF::adjust(), QPainter::device(), drawBorder(), fillBackground(), frame, QPaintDevice::height(), Qt::lightGray, Qt::NoBrush, Qt::NoPen, painter, rect, QPainter::restore(), QPainter::save(), QPainter::setBrush(), QRectF::setHeight(), QPainter::setPen(), QRectF::setWidth(), QRectF::topLeft(), and QPaintDevice::width().

Referenced by drawFrame().

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

◆ drawListItem()

void QTextDocumentLayoutPrivate::drawListItem ( const QPointF offset,
QPainter painter,
const QAbstractTextDocumentLayout::PaintContext context,
const QTextBlock bl,
const QTextCharFormat selectionFormat 
) const

Definition at line 2087 of file qtextdocumentlayout.cpp.

References QRectF::adjusted(), Qt::AlignAbsolute, Qt::AlignLeft, QPainter::Antialiasing, QTextFormat::background(), QTextBlock::blockFormat(), QTextBlock::charFormat(), QTextBlockFormat::Checked, QPen::color(), context, dir, QAbstractTextDocumentLayoutPrivate::document, QPainter::drawEllipse(), QPainter::drawLine(), QPainter::drawRect(), QPainter::fillRect(), QTextCharFormat::font(), font, fontMetrics, QTextFormat::foreground(), QTextFormat::hasProperty(), QTextFormat::intProperty(), QTextLine::isValid(), layout, QTextBlock::layout(), Qt::LeftToRight, line, QTextListFormat::ListCircle, QTextListFormat::ListDecimal, QTextListFormat::ListDisc, QTextListFormat::ListLowerAlpha, QTextListFormat::ListLowerRoman, QTextListFormat::ListSquare, QTextFormat::ListStyle, QTextListFormat::ListStyleUndefined, QTextListFormat::ListUpperAlpha, QTextListFormat::ListUpperRoman, QTextBlockFormat::marker(), QTextLine::naturalTextRect(), Qt::NoBrush, QTextBlockFormat::NoMarker, Qt::NoPen, QTextDocument::objectForFormat(), painter, QPainter::pen(), pos, Q_ASSERT, QPainter::restore(), Qt::RightToLeft, QPainter::save(), QPainter::setBrush(), QPainter::setPen(), QPainter::setRenderHint(), QTextListFormat::style(), QPalette::Text, QTextBlock::textDirection(), textRect, QTextFormat::toListFormat(), QRect::topLeft(), and QRect::width().

Referenced by drawBlock().

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

◆ drawTableCell()

void QTextDocumentLayoutPrivate::drawTableCell ( const QRectF cellRect,
QPainter painter,
const QAbstractTextDocumentLayout::PaintContext cell_context,
QTextTable table,
QTextTableData td,
int  r,
int  c,
QTextBlock cursorBlockNeedingRepaint,
QPointF cursorBlockOffset 
) const

Definition at line 1792 of file qtextdocumentlayout.cpp.

References QList< T >::at(), QTextFormat::background(), QTextTableCell::begin(), QTextFrameData::border, QTextTableData::borderCollapse, QTextFrameFormat::BorderStyle_Groove, QTextFrameFormat::BorderStyle_Inset, QTextFrameFormat::BorderStyle_Outset, QTextFrameFormat::BorderStyle_Ridge, QRectF::bottom(), QPainter::brush(), QPainter::brushOrigin(), QTextTableData::cellSpacing, QTextTableData::cellVerticalOffsets, QTextTableData::childFrameMap, QAbstractTextDocumentLayout::PaintContext::clip, QTextTableCell::column(), QTextTableCell::columnSpan(), QAbstractTextDocumentLayoutPrivate::document, drawBorder(), drawFlow(), drawTableCellBorder(), QTextFrameData::effectiveBottomMargin, QTextFrameData::effectiveTopMargin, fillBackground(), QTextTableCell::format(), QTextTableData::headerHeight, QRectF::height(), QSizeF::height(), i, QTextBlock::isValid(), QRectF::left(), QTextTableData::leftPadding(), Qt::NoBrush, QTextDocument::pageSize, painter, QPainter::pen(), qMax(), qMin(), QTextTableCell::row(), QTextTableCell::rowSpan(), QRectF::setBottom(), QPainter::setBrush(), QPainter::setBrushOrigin(), QPainter::setPen(), QRectF::setTop(), Qt::SolidPattern, QBrush::style(), QRectF::top(), QRectF::topLeft(), QTextTableData::topPadding(), QFixed::toReal(), QRectF::toRect(), QMultiHash< Key, T >::values(), and QRectF::width().

Referenced by drawFrame().

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

◆ drawTableCellBorder()

void QTextDocumentLayoutPrivate::drawTableCellBorder ( const QRectF cellRect,
QPainter painter,
QTextTable table,
QTextTableData td,
const QTextTableCell cell 
) const

◆ ensureLayouted()

void QTextDocumentLayoutPrivate::ensureLayouted ( QFixed  y) const

Definition at line 3971 of file qtextdocumentlayout.cpp.

References checkPoints, currentLazyLayoutPosition, QList< T >::isEmpty(), QList< T >::last(), layoutStep(), Q_UNUSED, and QCheckPoint::y.

+ Here is the call graph for this function:

◆ ensureLayoutedByPosition()

void QTextDocumentLayoutPrivate::ensureLayoutedByPosition ( int  position) const

Definition at line 3987 of file qtextdocumentlayout.cpp.

References currentLazyLayoutPosition, and position().

Referenced by ensureLayoutFinished(), and layoutStep().

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

◆ ensureLayoutFinished()

void QTextDocumentLayoutPrivate::ensureLayoutFinished ( ) const
inline

Definition at line 560 of file qtextdocumentlayout.cpp.

References ensureLayoutedByPosition().

+ Here is the call graph for this function:

◆ findY()

QFixed QTextDocumentLayoutPrivate::findY ( QFixed  yFrom,
const QTextLayoutStruct layoutStruct,
QFixed  requiredWidth 
) const

Definition at line 3660 of file qtextdocumentlayout.cpp.

References QList< T >::at(), floatMargins(), QTextFrameData::floats, QTextLayoutStruct::frame, i, QFIXED_MAX, qMin(), QList< T >::size(), QTextLayoutStruct::x_left, and QTextLayoutStruct::x_right.

Referenced by layoutBlock(), layoutFlow(), and positionFloat().

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

◆ floatMargins()

void QTextDocumentLayoutPrivate::floatMargins ( QFixed  y,
const QTextLayoutStruct layoutStruct,
QFixed left,
QFixed right 
) const

Definition at line 3638 of file qtextdocumentlayout.cpp.

References QList< T >::at(), QTextFrameFormat::FloatLeft, QTextFrameData::floats, QTextLayoutStruct::frame, QTextFrame::frameFormat(), i, QTextFrameFormat::position(), qMax(), qMin(), QList< T >::size(), QTextLayoutStruct::x_left, and QTextLayoutStruct::x_right.

Referenced by findY(), layoutBlock(), layoutFlow(), and positionFloat().

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

◆ frameBoundingRectInternal()

QRectF QTextDocumentLayoutPrivate::frameBoundingRectInternal ( QTextFrame frame) const

Definition at line 4072 of file qtextdocumentlayout.cpp.

References frame, QTextTableCell::isValid(), and pos.

Referenced by drawFlow().

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

◆ frameIteratorForTextPosition()

QTextFrame::Iterator QTextDocumentLayoutPrivate::frameIteratorForTextPosition ( int  position) const

Definition at line 602 of file qtextdocumentlayout.cpp.

References begin(), QTextDocumentPrivate::blockMap(), QAbstractTextDocumentLayoutPrivate::docPrivate, QTextFrame::firstPosition(), QTextDocumentPrivate::frameAt(), it, QTextFrame::lastPosition(), map, QTextFrame::parentFrame(), position(), Q_ASSERT, and QTextDocumentPrivate::rootFrame().

Referenced by drawBlock(), frameIteratorForYPosition(), and layoutFlow().

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

◆ frameIteratorForYPosition()

QTextFrame::Iterator QTextDocumentLayoutPrivate::frameIteratorForYPosition ( QFixed  y) const

Definition at line 583 of file qtextdocumentlayout.cpp.

References QList< T >::begin(), QTextFrame::begin(), checkPoints, QAbstractTextDocumentLayoutPrivate::document, QList< T >::end(), QTextFrame::firstPosition(), frameIteratorForTextPosition(), QList< T >::isEmpty(), position(), and QTextDocument::rootFrame().

Referenced by drawFrame(), and hitTest().

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

◆ hitTest() [1/4]

◆ hitTest() [2/4]

QTextDocumentLayoutPrivate::HitPoint QTextDocumentLayoutPrivate::hitTest ( QTextFrame frame,
const QFixedPoint point,
int *  position,
QTextLayout **  l,
Qt::HitTestAccuracy  accuracy 
) const

Definition at line 630 of file qtextdocumentlayout.cpp.

References QList< T >::at(), QTextTableData::cellRect(), child, QTextTableData::childFrameMap, QTextTableCell::column(), QAbstractTextDocumentLayoutPrivate::docPrivate, frame, frameIteratorForYPosition(), QFixedPoint::fromPointF(), hitTest(), i, QTextFrameFormat::InFlow, QMultiHash< Key, T >::isEmpty(), isFrameFromInlineObject(), it, PointAfter, PointBefore, PointExact, position(), Q_ASSERT, qCDebug, QTextDocumentPrivate::rootFrame(), QTextTableCell::row(), QList< T >::size(), QRectF::topLeft(), QFixedPoint::toPointF(), QMultiHash< Key, T >::values(), QFixedPoint::x, and QFixedPoint::y.

Referenced by hitTest(), hitTest(), and hitTest().

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

◆ hitTest() [3/4]

QTextDocumentLayoutPrivate::HitPoint QTextDocumentLayoutPrivate::hitTest ( QTextFrame::Iterator  it,
HitPoint  hit,
const QFixedPoint p,
int *  position,
QTextLayout **  l,
Qt::HitTestAccuracy  accuracy 
) const

Definition at line 722 of file qtextdocumentlayout.cpp.

References hitTest(), isEmptyBlockBeforeTable(), it, PointAfter, PointBefore, PointInside, pos, position(), and qCDebug.

+ Here is the call graph for this function:

◆ hitTest() [4/4]

QTextDocumentLayoutPrivate::HitPoint QTextDocumentLayoutPrivate::hitTest ( QTextTable table,
const QFixedPoint point,
int *  position,
QTextLayout **  l,
Qt::HitTestAccuracy  accuracy 
) const

◆ layoutBlock()

void QTextDocumentLayoutPrivate::layoutBlock ( const QTextBlock bl,
int  blockPosition,
const QTextBlockFormat blockFormat,
QTextLayoutStruct layoutStruct,
int  layoutFrom,
int  layoutTo,
const QTextBlockFormat previousBlockFormat 
)

Definition at line 3408 of file qtextdocumentlayout.cpp.

References QTextLayoutStruct::absoluteY(), QTextOption::AddSpaceForLineAndParagraphSeparators, QTextBlockFormat::alignment(), QTextOption::alignment(), QList< T >::at(), QTextLayout::beginLayout(), QTextFormat::BlockAlignment, blockIndent(), QRectF::bottom(), QTextBlockFormat::bottomMargin(), QTextLayout::boundingRect(), QTextBlock::charFormat(), QList< T >::clear(), QTextLayoutStruct::contentHeight(), QTextLayoutStruct::contentsWidth, QTextLayout::createLine(), QTextDocumentPrivate::defaultTextOption, dir, QAbstractTextDocumentLayoutPrivate::docPrivate, QAbstractTextDocumentLayoutPrivate::document, QTextLayout::endLayout(), findY(), fixedColumnWidth, QTextOption::flags(), floatMargins(), QTextCharFormat::font(), QTextLayoutStruct::frameY, QFixed::fromReal(), QTextLayoutStruct::fullLayout, getLineHeightParams(), QTextFormat::hasProperty(), QRectF::height(), QFontMetricsF::horizontalAdvance(), i, QRectF::isValid(), QTextBlock::isVisible(), QTextBlock::layout(), QTextBlockFormat::leftMargin(), Qt::LeftToRight, QTextBlock::length(), line, QTextLayout::lineAt(), QTextLayout::lineCount(), QTextOption::ManualWrap, QTextLayoutStruct::maximumWidth, QTextLayout::maximumWidth(), QTextLayoutStruct::minimumWidth, QTextLayout::minimumWidth(), QTextLine::naturalTextWidth(), QTextLayoutStruct::newPage(), QTextBlockFormat::nonBreakableLines(), oldPosition, QTextLayoutStruct::pageBottom, QTextLayoutStruct::pageHeight, QTextDocument::pageSize, QTextLayoutStruct::pendingFloats, QTextLayout::position(), positionFloat(), qCDebug, QFIXED_MAX, qMax(), qMin(), qt_defaultDpi(), QTextBlockFormat::rightMargin(), Qt::RightToLeft, QRectF::setBottom(), QTextLayout::setPosition(), QTextOption::setTextDirection(), QTextLayout::setTextOption(), QRectF::setTop(), QList< T >::size(), QTextBlockFormat::tabPositions(), QTextBlock::textDirection(), QTextBlockFormat::textIndent(), QRectF::top(), QTextBlockFormat::topMargin(), QFixed::toReal(), QTextLayoutStruct::updateRect, QGuiApplicationPrivate::visualAlignment(), QSizeF::width(), QTextOption::WordWrap, QTextOption::WrapAnywhere, QTextOption::WrapAtWordBoundaryOrAnywhere, QTextLayoutStruct::x_left, QTextLayoutStruct::x_right, QPointF::y(), and QTextLayoutStruct::y.

Referenced by layoutFlow().

+ Here is the caller graph for this function:

◆ layoutCell()

QTextLayoutStruct QTextDocumentLayoutPrivate::layoutCell ( QTextTable t,
const QTextTableCell cell,
QFixed  width,
int  layoutFrom,
int  layoutTo,
QTextTableData tableData,
QFixed  absoluteTableY,
bool  withPageBreaks 
)

Definition at line 2254 of file qtextdocumentlayout.cpp.

References QList< T >::at(), axisEdgeData(), QTextTableCell::begin(), QTextFrameData::border, QTextTableData::borderCollapse, QCss::BottomEdge, QTextTableData::bottomPadding(), QTextTableData::cellSpacing, QTextTableData::childFrameMap, QTextTableCell::column(), QTextLayoutStruct::currentPage(), QAbstractTextDocumentLayoutPrivate::document, QTextTableData::effectiveBottomBorder, QTextFrameData::effectiveBottomMargin, QTextFrameData::effectiveTopMargin, QTextTableCell::format(), QTextLayoutStruct::frame, frame, QTextLayoutStruct::frameY, QFixed::fromReal(), QTextLayoutStruct::fullLayout, QSizeF::height(), QFixedSize::height, i, QTextFrameFormat::InFlow, layoutFlow(), QTextLayoutStruct::maximumWidth, QTextFrameData::minimumWidth, QTextLayoutStruct::minimumWidth, QTextTableData::paddingProperty(), QTextLayoutStruct::pageBottom, QTextLayoutStruct::pageBottomMargin, QTextLayoutStruct::pageHeight, QTextDocument::pageSize, QTextLayoutStruct::pageTopMargin, QTextFrameData::position, qCDebug, QFIXED_MAX, qMax(), QTextTableCell::row(), QTextTableData::rowPositions, scaleToDevice(), QList< T >::size(), QTextFrameData::size, QTextFrameData::sizeDirty, QTextFormat::TableCellTopPadding, QTextTableData::topPadding(), QMultiHash< Key, T >::values(), EdgeData::width, QTextLayoutStruct::x_left, QTextLayoutStruct::x_right, QFixedPoint::y, and QTextLayoutStruct::y.

Referenced by layoutTable().

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

◆ layoutFlow()

void QTextDocumentLayoutPrivate::layoutFlow ( QTextFrame::Iterator  it,
QTextLayoutStruct layoutStruct,
int  layoutFrom,
int  layoutTo,
QFixed  width = 0 
)

Definition at line 3055 of file qtextdocumentlayout.cpp.

References QTextLayoutStruct::absoluteY(), QTextLayoutStruct::addUpdateRectForFloat(), Qt::AlignHCenter, Qt::AlignHorizontal_Mask, Qt::AlignLeft, QTextOption::alignment(), Qt::AlignRight, QList< T >::append(), QList< T >::at(), QTextFrame::iterator::atEnd(), QList< T >::begin(), QTextBlock::blockFormat(), QTextBlockFormat::bottomMargin(), checkPoints, QTextFrame::childFrames(), QObjectData::children, QList< T >::clear(), QList< T >::constLast(), contentHasAlignment, QTextLayoutStruct::contentsWidth, QCheckPoint::contentsWidth, QTextFrame::iterator::currentBlock(), QTextFrame::iterator::currentFrame(), currentLazyLayoutPosition, QTextLayoutStruct::currentPage(), QAbstractTextDocumentLayoutPrivate::docPrivate, QAbstractTextDocumentLayoutPrivate::document, QList< T >::end(), findY(), firstChildPos(), floatMargins(), QTextLayoutStruct::frame, frameIteratorForTextPosition(), QTextLayoutStruct::frameY, QCheckPoint::frameY, QFixed::fromReal(), QTextLayoutStruct::fullLayout, QSizeF::height(), QFixedSize::height, i, QTextFrameFormat::InFlow, QList< T >::isEmpty(), isEmptyBlockAfterTable(), isEmptyBlockBeforeTable(), isLineSeparatorBlockAfterTable(), QTextBlock::isValid(), QRectF::isValid(), it, layout, QTextBlock::layout(), layoutBlock(), QTextFrameData::layoutDirty, layoutFrame(), lazyLayoutStepSize, QTextDocumentPrivate::length(), QTextFrameData::maximumWidth, QTextLayoutStruct::maximumWidth, QCheckPoint::maximumWidth, QTextFrameData::minimumWidth, QTextLayoutStruct::minimumWidth, QCheckPoint::minimumWidth, QTextLayoutStruct::newPage(), page, QTextLayoutStruct::pageBottom, QTextLayoutStruct::pageBottomMargin, QTextFormat::PageBreak_AlwaysAfter, QTextFormat::PageBreak_AlwaysBefore, QTextBlockFormat::pageBreakPolicy(), QTextFrameFormat::pageBreakPolicy(), QTextLayoutStruct::pageHeight, QTextDocument::pageSize, pos, QTextFrameData::position, QTextFrameFormat::position(), positionFloat(), QCheckPoint::positionInFrame, qAbs(), qCDebug, QFIXED_MAX, qMax(), qMin(), QList< T >::reserve(), QList< T >::resize(), QTextDocument::rootFrame(), QList< T >::size(), QTextFrameData::size, QTextFrameData::sizeDirty, QTextLayout::textOption(), QTextBlockFormat::topMargin(), QFixedPoint::toPointF(), QFixedSize::toSizeF(), QRectF::translate(), QFixedSize::width, QFixedPoint::x, QTextLayoutStruct::x_left, QTextLayoutStruct::x_right, QFixedPoint::y, QTextLayoutStruct::y, and QCheckPoint::y.

Referenced by layoutCell(), and layoutFrame().

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

◆ layoutFrame() [1/2]

QRectF QTextDocumentLayoutPrivate::layoutFrame ( QTextFrame f,
int  layoutFrom,
int  layoutTo,
QFixed  frameWidth,
QFixed  frameHeight,
QFixed  parentY = 0 
)

◆ layoutFrame() [2/2]

QRectF QTextDocumentLayoutPrivate::layoutFrame ( QTextFrame f,
int  layoutFrom,
int  layoutTo,
QFixed  parentY = 0 
)

Definition at line 2890 of file qtextdocumentlayout.cpp.

References QTextFrameData::contentsHeight, QTextFrameData::contentsWidth, QAbstractTextDocumentLayoutPrivate::document, QTextLength::FixedLength, QFixed::fromReal(), QTextFrameFormat::height(), layoutFrame(), QTextDocument::pageSize, QObjectData::parent, QTextLength::PercentageLength, Q_ASSERT, qCDebug, qMax(), scaleToDevice(), QFixed::toReal(), QTextLength::type(), QTextLength::value(), QTextFrameFormat::width(), and QSizeF::width().

Referenced by layoutFlow(), and layoutFrame().

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

◆ layoutStep()

void QTextDocumentLayoutPrivate::layoutStep ( ) const

Definition at line 3999 of file qtextdocumentlayout.cpp.

References currentLazyLayoutPosition, ensureLayoutedByPosition(), lazyLayoutStepSize, and qMin().

Referenced by ensureLayouted().

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

◆ layoutTable()

QRectF QTextDocumentLayoutPrivate::layoutTable ( QTextTable t,
int  layoutFrom,
int  layoutTo,
QFixed  parentY 
)

Definition at line 2356 of file qtextdocumentlayout.cpp.

References QTextCharFormat::AlignBottom, QTextCharFormat::AlignMiddle, QVarLengthArray< T, Prealloc >::append(), QList< T >::append(), QList< T >::at(), QTextTableCell::begin(), QTextFrameData::border, QTextTableData::borderCell, QTextTableData::borderCollapse, QCss::BottomEdge, QTextTableData::bottomPadding(), QTextTableData::calcRowPosition(), QTextTableData::cellPadding, QTextTableData::cellSpacing, QTextTableData::cellVerticalOffsets, QTextTableData::cellWidth(), QTextTableData::childFrameMap, QObjectData::children, QList< T >::clear(), QMultiHash< Key, T >::clear(), QTextTableCell::column(), QTextTableData::columnPositions, QTextTableCell::columnSpan(), QList< T >::constLast(), QTextFrameData::contentsWidth, QTextDocumentPrivate::defaultTextOption, QTextTableData::deviceScale, QAbstractTextDocumentLayoutPrivate::docPrivate, QAbstractTextDocumentLayoutPrivate::document, QTextTableData::drawGrid, QTextTableData::effectiveBottomBorder, QTextFrameData::effectiveBottomMargin, QTextTableData::effectiveLeftBorder, QTextTableData::effectiveRightBorder, QTextTableData::effectiveTopBorder, QTextFrameData::effectiveTopMargin, error, QList< T >::fill(), findWidestOutermostBorder(), QTextLength::FixedLength, flowPosition(), fmt, QTextTableCell::format(), frame, QFixed::fromReal(), QTextTableData::headerHeight, QSizeF::height(), QTextTableData::heights, i, QMultiHash< Key, T >::insert(), layoutCell(), QCss::LeftEdge, QTextFrameData::leftMargin, QTextTableData::leftPadding(), QTextFrameData::maximumWidth, QTextLayoutStruct::maximumWidth, QTextTableData::maxWidths, QTextFrameData::minimumWidth, QTextLayoutStruct::minimumWidth, QTextTableData::minWidths, QCss::NumEdges, QTextFrameData::padding, QTextDocument::pageSize, QTextLength::PercentageLength, QTextFrameData::position, Q_ASSERT, qBound(), qCDebug, QFIXED_MAX, qMax(), qMin(), rd, QList< T >::reserve(), QList< T >::resize(), QCss::RightEdge, QTextFrameData::rightMargin, QTextTableData::rightPadding(), QFixed::round(), QTextTableCell::row(), QTextTableData::rowPositions, QTextTableCell::rowSpan(), scaleToDevice(), QTextOption::setWrapMode(), QList< T >::size(), QVLABaseBase::size(), QTextFrameData::sizeDirty, QCss::TopEdge, QTextFrameData::topMargin, QTextTableData::topPadding(), QFixed::toReal(), QFixed::truncate(), QTextTableData::updateTableSize(), QTextLength::VariableLength, QTextCharFormat::verticalAlignment(), QTextTableData::widths, QTextOption::WrapAnywhere, QTextOption::WrapAtWordBoundaryOrAnywhere, QTextOption::wrapMode(), QFixedPoint::y, and QTextLayoutStruct::y.

Referenced by layoutFrame().

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

◆ positionFloat()

void QTextDocumentLayoutPrivate::positionFloat ( QTextFrame frame,
QTextLine currentLine = nullptr 
)

Definition at line 2828 of file qtextdocumentlayout.cpp.

References QList< T >::append(), QListSpecialMethodsBase< T >::contains(), QTextFrameData::currentLayoutStruct, findY(), QTextFrameFormat::FloatLeft, floatMargins(), QTextFrameData::floats, frame, QTextLayoutStruct::frameY, QFixed::fromReal(), QTextLayoutStruct::maximumWidth, QTextLayoutStruct::minimumWidth, QTextLine::naturalTextWidth(), QTextLayoutStruct::newPage(), QTextLayoutStruct::pageBottom, QTextLayoutStruct::pageHeight, QObjectData::parent, QTextLayoutStruct::pendingFloats, Q_ASSERT, qMax(), qMin(), and QTextLayoutStruct::y.

Referenced by layoutBlock(), and layoutFlow().

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

◆ scaleToDevice() [1/2]

QFixed QTextDocumentLayoutPrivate::scaleToDevice ( QFixed  value) const

Definition at line 4188 of file qtextdocumentlayout.cpp.

References QPaintDevice::logicalDpiY(), QAbstractTextDocumentLayoutPrivate::paintDevice, and qt_defaultDpi().

+ Here is the call graph for this function:

◆ scaleToDevice() [2/2]

qreal QTextDocumentLayoutPrivate::scaleToDevice ( qreal  value) const

Definition at line 4181 of file qtextdocumentlayout.cpp.

References QPaintDevice::logicalDpiY(), QAbstractTextDocumentLayoutPrivate::paintDevice, and qt_defaultDpi().

Referenced by layoutCell(), layoutFrame(), layoutFrame(), and layoutTable().

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

◆ setCellPosition()

void QTextDocumentLayoutPrivate::setCellPosition ( QTextTable t,
const QTextTableCell cell,
const QPointF pos 
)

Member Data Documentation

◆ checkPoints

QList<QCheckPoint> QTextDocumentLayoutPrivate::checkPoints

◆ clipRect

QRectF QTextDocumentLayoutPrivate::clipRect

Definition at line 491 of file qtextdocumentlayout.cpp.

Referenced by drawBlock().

◆ contentHasAlignment

bool QTextDocumentLayoutPrivate::contentHasAlignment

Definition at line 502 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate(), and layoutFlow().

◆ currentLazyLayoutPosition

int QTextDocumentLayoutPrivate::currentLazyLayoutPosition
mutable

◆ cursorWidth

int QTextDocumentLayoutPrivate::cursorWidth

Definition at line 487 of file qtextdocumentlayout.cpp.

Referenced by drawBlock(), and drawFrame().

◆ fixedColumnWidth

int QTextDocumentLayoutPrivate::fixedColumnWidth

Definition at line 486 of file qtextdocumentlayout.cpp.

Referenced by layoutBlock().

◆ idealWidth

qreal QTextDocumentLayoutPrivate::idealWidth

Definition at line 501 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate(), and layoutFrame().

◆ insideDocumentChange

uint QTextDocumentLayoutPrivate::insideDocumentChange

Definition at line 498 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate().

◆ lastPageCount

int QTextDocumentLayoutPrivate::lastPageCount

Definition at line 500 of file qtextdocumentlayout.cpp.

◆ lastReportedSize

QSizeF QTextDocumentLayoutPrivate::lastReportedSize

Definition at line 489 of file qtextdocumentlayout.cpp.

◆ layoutTimer

QBasicTimer QTextDocumentLayoutPrivate::layoutTimer

Definition at line 495 of file qtextdocumentlayout.cpp.

◆ lazyLayoutStepSize

int QTextDocumentLayoutPrivate::lazyLayoutStepSize
mutable

Definition at line 494 of file qtextdocumentlayout.cpp.

Referenced by layoutFlow(), and layoutStep().

◆ showLayoutProgress

uint QTextDocumentLayoutPrivate::showLayoutProgress

Definition at line 497 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate().

◆ sizeChangedTimer

QBasicTimer QTextDocumentLayoutPrivate::sizeChangedTimer
mutable

Definition at line 496 of file qtextdocumentlayout.cpp.

◆ viewportRect

QRectF QTextDocumentLayoutPrivate::viewportRect

Definition at line 490 of file qtextdocumentlayout.cpp.

◆ wordWrapMode

QTextOption::WrapMode QTextDocumentLayoutPrivate::wordWrapMode

Definition at line 481 of file qtextdocumentlayout.cpp.


The documentation for this class was generated from the following file: