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
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)
 
QObjectList receiverList (const char *signal) 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
 
virtual void writeToDebugStream (QDebug &) 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 receiveParentEvents: 1
 
uint unused: 20
 
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 476 of file qtextdocumentlayout.cpp.

Member Enumeration Documentation

◆ HitPoint

Enumerator
PointBefore 
PointAfter 
PointInside 
PointExact 

Definition at line 523 of file qtextdocumentlayout.cpp.

Constructor & Destructor Documentation

◆ QTextDocumentLayoutPrivate()

QTextDocumentLayoutPrivate::QTextDocumentLayoutPrivate ( )

Member Function Documentation

◆ blockIndent()

QFixed QTextDocumentLayoutPrivate::blockIndent ( const QTextBlockFormat & blockFormat) const

Definition at line 842 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

◆ 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 896 of file qtextdocumentlayout.cpp.

References QPainter::Antialiasing, QCss::BottomEdge, QAbstractTextDocumentLayoutPrivate::document, QPainter::drawRect(), i, QCss::LeftEdge, Qt::NoPen, painter, Q_UNUSED, qDrawEdge(), rect, QPainter::renderHints(), QPainter::restore(), QCss::RightEdge, QPainter::save(), QPainter::setBrush(), QPainter::setPen(), QPainter::setRenderHint(), and QCss::TopEdge.

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 1918 of file qtextdocumentlayout.cpp.

References QList< T >::begin(), checkPoints, QList< T >::constLast(), 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, and QAbstractTextDocumentLayout::PaintContext::selections.

Referenced by drawFrame(), and drawTableCell().

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

◆ drawFrame()

◆ drawFrameDecoration()

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

Definition at line 935 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(), QPainter::setPen(), QRectF::setWidth(), 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 2098 of file qtextdocumentlayout.cpp.

References QRectF::adjusted(), Qt::AlignAbsolute, Qt::AlignLeft, QPainter::Antialiasing, QPen::brush(), 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(), layout, QLayout::layout(), Qt::LeftToRight, line, QTextListFormat::ListCircle, QTextListFormat::ListDecimal, QTextListFormat::ListDisc, QTextListFormat::ListLowerAlpha, QTextListFormat::ListLowerRoman, QTextListFormat::ListSquare, QTextFormat::ListStyle, QTextListFormat::ListStyleUndefined, QTextListFormat::ListUpperAlpha, QTextListFormat::ListUpperRoman, 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, 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 1793 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, QTextTableCell::column(), QTextTableCell::columnSpan(), QAbstractTextDocumentLayoutPrivate::document, drawBorder(), drawFlow(), drawTableCellBorder(), QTextFrameData::effectiveBottomMargin, QTextFrameData::effectiveTopMargin, fillBackground(), QTextTableCell::format(), QTextFormat::hasProperty(), QTextTableData::headerHeight, QRectF::height(), QSizeF::height(), i, QRectF::left(), QTextTableData::leftPadding(), Qt::NoBrush, QTextDocument::pageSize, painter, QPainter::pen(), qMax(), qMin(), QTextTableCell::row(), QTextTableCell::rowSpan(), QPainter::setBrush(), QPainter::setBrushOrigin(), QPainter::setPen(), Qt::SolidPattern, QBrush::style(), QTextFormat::TableCellBottomBorder, QTextFormat::TableCellLeftBorder, QTextFormat::TableCellRightBorder, QTextFormat::TableCellTopBorder, 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 3980 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 3996 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 561 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 3669 of file qtextdocumentlayout.cpp.

References floatMargins(), i, QFIXED_MAX, and qMin().

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 3647 of file qtextdocumentlayout.cpp.

References QTextFrameFormat::FloatLeft, i, qMax(), and qMin().

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 4081 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 603 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 584 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]

QTextDocumentLayoutPrivate::HitPoint QTextDocumentLayoutPrivate::hitTest ( const QTextBlock & bl,
const QFixedPoint & point,
int * position,
QTextLayout ** l,
Qt::HitTestAccuracy accuracy ) const

Definition at line 792 of file qtextdocumentlayout.cpp.

References QTextLayout::boundingRect(), QTextLine::CursorBetweenCharacters, QTextLine::CursorOnCharacter, Qt::ExactHit, i, line, QTextLayout::lineAt(), QTextLayout::lineCount(), PointAfter, PointBefore, PointExact, PointInside, pos, QTextLayout::position(), position(), qCDebug, qMax(), qMin(), QFixedPoint::toPointF(), QFixed::toReal(), QRectF::translate(), and QFixedPoint::y.

+ Here is the call graph for this function:

◆ hitTest() [2/4]

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

Definition at line 631 of file qtextdocumentlayout.cpp.

References 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(), 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 723 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 3417 of file qtextdocumentlayout.cpp.

References QTextOption::AddSpaceForLineAndParagraphSeparators, QTextBlockFormat::alignment(), QTextOption::alignment(), QTextLayout::beginLayout(), QTextFormat::BlockAlignment, blockIndent(), QTextLayout::boundingRect(), QTextLayout::createLine(), QTextDocumentPrivate::defaultTextOption, dir, QAbstractTextDocumentLayoutPrivate::docPrivate, QAbstractTextDocumentLayoutPrivate::document, QTextLayout::endLayout(), findY(), fixedColumnWidth, QTextOption::flags(), floatMargins(), QFixed::fromReal(), getLineHeightParams(), QTextFormat::hasProperty(), QRectF::height(), i, QTextBlockFormat::leftMargin(), Qt::LeftToRight, line, QTextLayout::lineAt(), QTextLayout::lineCount(), QTextOption::ManualWrap, QTextLayout::maximumWidth(), QTextLayout::minimumWidth(), QTextLine::naturalTextWidth(), QTextBlockFormat::nonBreakableLines(), oldPosition, QTextDocument::pageSize, QTextLayout::position(), positionFloat(), qCDebug, QFIXED_MAX, qMax(), qMin(), qt_defaultDpi(), QTextBlockFormat::rightMargin(), Qt::RightToLeft, QTextLayout::setPosition(), QTextOption::setTextDirection(), QTextLayout::setTextOption(), QTextBlockFormat::tabPositions(), QTextBlockFormat::textIndent(), QTextBlockFormat::topMargin(), QGuiApplicationPrivate::visualAlignment(), QSizeF::width(), QTextOption::WordWrap, QTextOption::WrapAnywhere, QTextOption::WrapAtWordBoundaryOrAnywhere, and QPointF::y().

Referenced by layoutFlow().

+ Here is the call graph for this function:
+ 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 )

◆ layoutFlow()

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

Definition at line 3064 of file qtextdocumentlayout.cpp.

References Qt::AlignHCenter, Qt::AlignHorizontal_Mask, Qt::AlignLeft, QTextOption::alignment(), Qt::AlignRight, QList< T >::append(), QList< T >::at(), QList< T >::begin(), QTextBlock::blockFormat(), QTextBlockFormat::bottomMargin(), checkPoints, QObjectData::children, QList< T >::clear(), QList< T >::constLast(), contentHasAlignment, QCheckPoint::contentsWidth, currentLazyLayoutPosition, QAbstractTextDocumentLayoutPrivate::docPrivate, QAbstractTextDocumentLayoutPrivate::document, QList< T >::end(), findY(), firstChildPos(), floatMargins(), frameIteratorForTextPosition(), QCheckPoint::frameY, QFixed::fromReal(), 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, QCheckPoint::maximumWidth, QTextFrameData::minimumWidth, QCheckPoint::minimumWidth, page, QTextFormat::PageBreak_AlwaysAfter, QTextFormat::PageBreak_AlwaysBefore, QTextBlockFormat::pageBreakPolicy(), QTextDocument::pageSize, pos, QTextFrameData::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, QFixedPoint::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]

◆ layoutFrame() [2/2]

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

Definition at line 2899 of file qtextdocumentlayout.cpp.

References QTextFrameData::contentsHeight, QTextFrameData::contentsWidth, QAbstractTextDocumentLayoutPrivate::document, QTextLength::FixedLength, QFixed::fromReal(), layoutFrame(), QTextDocument::pageSize, QObjectData::parent, QTextLength::PercentageLength, Q_ASSERT, qCDebug, qMax(), scaleToDevice(), QFixed::toReal(), 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 4008 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 2365 of file qtextdocumentlayout.cpp.

References QTextCharFormat::AlignBottom, QTextCharFormat::AlignMiddle, 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, QTextTableData::maxWidths, QTextFrameData::minimumWidth, QTextTableData::minWidths, QCss::NumEdges, QTextFrameData::padding, QTextDocument::pageSize, QTextLength::PercentageLength, QTextFrameData::position, Q_ASSERT, qBound(), qCDebug, QFIXED_MAX, qMax(), qMin(), rd, QList< T >::resize(), QCss::RightEdge, QTextFrameData::rightMargin, QTextTableData::rightPadding(), QTextTableCell::row(), QTextTableData::rowPositions, QTextTableCell::rowSpan(), scaleToDevice(), QTextOption::setWrapMode(), QList< T >::size(), QTextFrameData::sizeDirty, QCss::TopEdge, QTextFrameData::topMargin, QTextTableData::topPadding(), QFixed::toReal(), QFixed::truncate(), QTextTableData::updateTableSize(), QTextLength::VariableLength, QTextTableData::widths, QTextOption::WrapAnywhere, QTextOption::WrapAtWordBoundaryOrAnywhere, QTextOption::wrapMode(), and QFixedPoint::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 2837 of file qtextdocumentlayout.cpp.

References QList< T >::append(), QListSpecialMethodsBase< T >::contains(), QTextFrameData::currentLayoutStruct, findY(), QTextFrameFormat::FloatLeft, floatMargins(), QTextFrameData::floats, frame, QFixed::fromReal(), QTextLine::naturalTextWidth(), QObjectData::parent, Q_ASSERT, qMax(), and qMin().

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 4197 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 4190 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 492 of file qtextdocumentlayout.cpp.

Referenced by drawBlock().

◆ contentHasAlignment

bool QTextDocumentLayoutPrivate::contentHasAlignment

Definition at line 503 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate(), and layoutFlow().

◆ currentLazyLayoutPosition

int QTextDocumentLayoutPrivate::currentLazyLayoutPosition
mutable

◆ cursorWidth

int QTextDocumentLayoutPrivate::cursorWidth

Definition at line 488 of file qtextdocumentlayout.cpp.

Referenced by drawBlock(), and drawFrame().

◆ fixedColumnWidth

int QTextDocumentLayoutPrivate::fixedColumnWidth

Definition at line 487 of file qtextdocumentlayout.cpp.

Referenced by layoutBlock().

◆ idealWidth

qreal QTextDocumentLayoutPrivate::idealWidth

Definition at line 502 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate(), and layoutFrame().

◆ insideDocumentChange

uint QTextDocumentLayoutPrivate::insideDocumentChange

Definition at line 499 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate().

◆ lastPageCount

int QTextDocumentLayoutPrivate::lastPageCount

Definition at line 501 of file qtextdocumentlayout.cpp.

◆ lastReportedSize

QSizeF QTextDocumentLayoutPrivate::lastReportedSize

Definition at line 490 of file qtextdocumentlayout.cpp.

◆ layoutTimer

QBasicTimer QTextDocumentLayoutPrivate::layoutTimer

Definition at line 496 of file qtextdocumentlayout.cpp.

◆ lazyLayoutStepSize

int QTextDocumentLayoutPrivate::lazyLayoutStepSize
mutable

Definition at line 495 of file qtextdocumentlayout.cpp.

Referenced by layoutFlow(), and layoutStep().

◆ showLayoutProgress

uint QTextDocumentLayoutPrivate::showLayoutProgress

Definition at line 498 of file qtextdocumentlayout.cpp.

Referenced by QTextDocumentLayoutPrivate().

◆ sizeChangedTimer

QBasicTimer QTextDocumentLayoutPrivate::sizeChangedTimer
mutable

Definition at line 497 of file qtextdocumentlayout.cpp.

◆ viewportRect

QRectF QTextDocumentLayoutPrivate::viewportRect

Definition at line 491 of file qtextdocumentlayout.cpp.

◆ wordWrapMode

QTextOption::WrapMode QTextDocumentLayoutPrivate::wordWrapMode

Definition at line 482 of file qtextdocumentlayout.cpp.


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