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
QTextDocumentPrivate Class Reference

#include <qtextdocument_p.h>

+ Inheritance diagram for QTextDocumentPrivate:
+ Collaboration diagram for QTextDocumentPrivate:

Public Types

enum  FormatChangeMode { MergeFormat , SetFormat , SetFormatAndPreserveObjectIndices }
 
typedef QFragmentMap< QTextFragmentDataFragmentMap
 
typedef FragmentMap::ConstIterator FragmentIterator
 
typedef QFragmentMap< QTextBlockDataBlockMap
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QTextDocumentPrivate ()
 
 ~QTextDocumentPrivate ()
 
void init ()
 
void clear ()
 
void setLayout (QAbstractTextDocumentLayout *layout)
 
void insert (int pos, QStringView text, int format)
 
void insert (int pos, QChar c, int format)
 
void insert (int pos, int strPos, int strLength, int format)
 
int insertBlock (int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation=QTextUndoCommand::MoveCursor)
 
int insertBlock (QChar blockSeparator, int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation op=QTextUndoCommand::MoveCursor)
 
void move (int from, int to, int length, QTextUndoCommand::Operation=QTextUndoCommand::MoveCursor)
 
void remove (int pos, int length, QTextUndoCommand::Operation=QTextUndoCommand::MoveCursor)
 
void aboutToRemoveCell (int cursorFrom, int cursorEnd)
 This method is called from QTextTable when it is about to remove a table-cell to allow cursors to update their selection.
 
QTextFrameinsertFrame (int start, int end, const QTextFrameFormat &format)
 
void removeFrame (QTextFrame *frame)
 
void setCharFormat (int pos, int length, const QTextCharFormat &newFormat, FormatChangeMode mode=SetFormat)
 
void setBlockFormat (const QTextBlock &from, const QTextBlock &to, const QTextBlockFormat &newFormat, FormatChangeMode mode=SetFormat)
 
void emitUndoAvailable (bool available)
 
void emitRedoAvailable (bool available)
 
int undoRedo (bool undo)
 
void undo ()
 
void redo ()
 
void appendUndoItem (QAbstractUndoItem *)
 Appends a custom undo item to the undo stack.
 
void beginEditBlock ()
 
void joinPreviousEditBlock ()
 
void endEditBlock ()
 
void finishEdit ()
 
bool isInEditBlock () const
 
void enableUndoRedo (bool enable)
 
bool isUndoRedoEnabled () const
 
bool isUndoAvailable () const
 
bool isRedoAvailable () const
 
int availableUndoSteps () const
 
int availableRedoSteps () const
 
QString buffer () const
 
QString plainText () const
 
int length () const
 
QTextFormatCollectionformatCollection ()
 
const QTextFormatCollectionformatCollection () const
 
QAbstractTextDocumentLayoutlayout () const
 
FragmentIterator find (int pos) const
 
FragmentIterator begin () const
 
FragmentIterator end () const
 
QTextBlock blocksBegin () const
 
QTextBlock blocksEnd () const
 
QTextBlock blocksFind (int pos) const
 
int blockCharFormatIndex (int node) const
 
int numBlocks () const
 
const BlockMapblockMap () const
 
const FragmentMapfragmentMap () const
 
BlockMapblockMap ()
 
FragmentMapfragmentMap ()
 
int nextCursorPosition (int position, QTextLayout::CursorMode mode) const
 
int previousCursorPosition (int position, QTextLayout::CursorMode mode) const
 
int leftCursorPosition (int position) const
 
int rightCursorPosition (int position) const
 
void changeObjectFormat (QTextObject *group, int format)
 
void setModified (bool m)
 
bool isModified () const
 
QFont defaultFont () const
 
void setDefaultFont (const QFont &f)
 
void clearUndoRedoStacks (QTextDocument::Stacks stacksToClear, bool emitSignals=false)
 
void documentChange (int from, int length)
 
void addCursor (QTextCursorPrivate *c)
 
void removeCursor (QTextCursorPrivate *c)
 
QTextFrameframeAt (int pos) const
 
QTextFramerootFrame () const
 
QTextObjectobjectForIndex (int objectIndex) const
 
QTextObjectobjectForFormat (int formatIndex) const
 
QTextObjectobjectForFormat (const QTextFormat &f) const
 
QTextObjectcreateObject (const QTextFormat &newFormat, int objectIndex=-1)
 
void deleteObject (QTextObject *object)
 
QTextDocumentdocument ()
 
const QTextDocumentdocument () const
 
bool ensureMaximumBlockCount ()
 
bool canLayout () const
 
void mergeCachedResources (const QTextDocumentPrivate *priv)
 
- 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
 

Static Public Member Functions

static const QTextBlockDatablock (const QTextBlock &it)
 
static const QTextDocumentPrivateget (const QTextDocument *document)
 
static QTextDocumentPrivateget (QTextDocument *document)
 
static QTextDocumentPrivateget (QTextBlock &block)
 
static const QTextDocumentPrivateget (const QTextBlock &block)
 
static QTextDocumentPrivateget (QTextObject *object)
 
static const QTextDocumentPrivateget (const QTextObject *object)
 
- 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)
 

Public Attributes

bool inContentsChange
 
bool layoutEnabled = true
 
QTextOption defaultTextOption
 
Qt::CursorMoveStyle defaultCursorMoveStyle
 
QCss::StyleSheet parsedDefaultStyleSheet
 
int maximumBlockCount
 
uint needsEnsureMaximumBlockCount: 1
 
uint blockCursorAdjustment: 1
 
QSizeF pageSize
 
QString title
 
QString url
 
QString cssMedia
 
QString frontMatter
 
qreal indentWidth
 
qreal documentMargin
 
QUrl baseUrl
 
- 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
 

Friends

struct QTextHtmlParserNode
 
class QTextHtmlExporter
 
class QTextCursor
 

Detailed Description

Definition at line 129 of file qtextdocument_p.h.

Member Typedef Documentation

◆ BlockMap

◆ FragmentIterator

◆ FragmentMap

Member Enumeration Documentation

◆ FormatChangeMode

Enumerator
MergeFormat 
SetFormat 
SetFormatAndPreserveObjectIndices 

Definition at line 161 of file qtextdocument_p.h.

Constructor & Destructor Documentation

◆ QTextDocumentPrivate()

QTextDocumentPrivate::QTextDocumentPrivate ( )

Definition at line 146 of file qtextdocument_p.cpp.

References blockCursorAdjustment, defaultCursorMoveStyle, defaultTextOption, documentMargin, inContentsChange, indentWidth, Qt::LogicalMoveStyle, maximumBlockCount, needsEnsureMaximumBlockCount, QTextOption::setTabStopDistance(), QTextOption::setWrapMode(), and QTextOption::WrapAtWordBoundaryOrAnywhere.

+ Here is the call graph for this function:

◆ ~QTextDocumentPrivate()

QTextDocumentPrivate::~QTextDocumentPrivate ( )

Definition at line 256 of file qtextdocument_p.cpp.

References QSet< T >::clear(), clearUndoRedoStacks(), and QTextDocument::RedoStack.

+ Here is the call graph for this function:

Member Function Documentation

◆ aboutToRemoveCell()

void QTextDocumentPrivate::aboutToRemoveCell ( int cursorFrom,
int cursorEnd )

This method is called from QTextTable when it is about to remove a table-cell to allow cursors to update their selection.

Definition at line 1715 of file qtextdocument_p.cpp.

References Q_ASSERT.

◆ addCursor()

void QTextDocumentPrivate::addCursor ( QTextCursorPrivate * c)

Definition at line 1424 of file qtextdocument_p.cpp.

References QSet< T >::insert().

Referenced by QTextCursorPrivate::QTextCursorPrivate(), and QTextCursorPrivate::QTextCursorPrivate().

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

◆ appendUndoItem()

void QTextDocumentPrivate::appendUndoItem ( QAbstractUndoItem * item)

Appends a custom undo item to the undo stack.

Definition at line 1009 of file qtextdocument_p.cpp.

References appendUndoItem(), QTextUndoCommand::Custom, item, and QTextUndoCommand::MoveCursor.

Referenced by appendUndoItem(), changeObjectFormat(), insert(), insertBlock(), move(), setBlockFormat(), and setCharFormat().

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

◆ availableRedoSteps()

int QTextDocumentPrivate::availableRedoSteps ( ) const
inline

Definition at line 186 of file qtextdocument_p.h.

References qMax().

+ Here is the call graph for this function:

◆ availableUndoSteps()

int QTextDocumentPrivate::availableUndoSteps ( ) const
inline

Definition at line 185 of file qtextdocument_p.h.

◆ begin()

FragmentIterator QTextDocumentPrivate::begin ( ) const
inline

Definition at line 197 of file qtextdocument_p.h.

Referenced by plainText().

+ Here is the caller graph for this function:

◆ beginEditBlock()

◆ block()

static const QTextBlockData * QTextDocumentPrivate::block ( const QTextBlock & it)
inlinestatic

Definition at line 212 of file qtextdocument_p.h.

References it.

Referenced by setBlockFormat(), setCharFormat(), and undoRedo().

+ Here is the caller graph for this function:

◆ blockCharFormatIndex()

int QTextDocumentPrivate::blockCharFormatIndex ( int node) const

Definition at line 1323 of file qtextdocument_p.cpp.

References QFragmentMap< Fragment >::find(), pos, and QFragmentMap< Fragment >::position().

Referenced by QTextCursor::charFormat().

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

◆ blockMap() [1/2]

BlockMap & QTextDocumentPrivate::blockMap ( )
inline

Definition at line 209 of file qtextdocument_p.h.

◆ blockMap() [2/2]

const BlockMap & QTextDocumentPrivate::blockMap ( ) const
inline

Definition at line 207 of file qtextdocument_p.h.

Referenced by QTextDocument::begin(), QTextCursor::charFormat(), QTextDocument::findBlock(), QTextDocument::findBlockByLineNumber(), QTextDocument::findBlockByNumber(), QTextDocument::firstBlock(), QTextDocumentLayoutPrivate::frameIteratorForTextPosition(), and QTextDocument::lastBlock().

+ Here is the caller graph for this function:

◆ blocksBegin()

QTextBlock QTextDocumentPrivate::blocksBegin ( ) const
inline

Definition at line 200 of file qtextdocument_p.h.

Referenced by QTextCursorPrivate::movePosition().

+ Here is the caller graph for this function:

◆ blocksEnd()

QTextBlock QTextDocumentPrivate::blocksEnd ( ) const
inline

Definition at line 201 of file qtextdocument_p.h.

Referenced by QTextCursorPrivate::movePosition().

+ Here is the caller graph for this function:

◆ blocksFind()

QTextBlock QTextDocumentPrivate::blocksFind ( int pos) const
inline

Definition at line 202 of file qtextdocument_p.h.

References pos.

Referenced by leftCursorPosition(), QTextCursorPrivate::movePosition(), nextCursorPosition(), previousCursorPosition(), rightCursorPosition(), QTextCursorPrivate::setBlockFormat(), setCharFormat(), and undoRedo().

+ Here is the caller graph for this function:

◆ buffer()

QString QTextDocumentPrivate::buffer ( ) const
inline

Definition at line 188 of file qtextdocument_p.h.

References text.

Referenced by QTextCursor::deletePreviousChar(), and QTextCursor::selectedText().

+ Here is the caller graph for this function:

◆ canLayout()

bool QTextDocumentPrivate::canLayout ( ) const
inline

Definition at line 298 of file qtextdocument_p.h.

◆ changeObjectFormat()

void QTextDocumentPrivate::changeObjectFormat ( QTextObject * group,
int format )

Definition at line 1373 of file qtextdocument_p.cpp.

References appendUndoItem(), beginEditBlock(), documentChange(), endEditBlock(), QTextUndoCommand::GroupFormatChange, QTextUndoCommand::MoveCursor, and QT_INIT_TEXTUNDOCOMMAND.

Referenced by undoRedo().

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

◆ clear()

void QTextDocumentPrivate::clear ( )

◆ clearUndoRedoStacks()

void QTextDocumentPrivate::clearUndoRedoStacks ( QTextDocument::Stacks stacksToClear,
bool emitSignals = false )

Definition at line 1073 of file qtextdocument_p.cpp.

References QList< T >::at(), QList< T >::clear(), QTextUndoCommand::Custom, QTextUndoCommand::custom, emitRedoAvailable(), emitUndoAvailable(), i, QList< T >::isEmpty(), QTextDocument::RedoStack, QList< T >::remove(), QList< T >::resize(), QList< T >::size(), QTextDocument::UndoAndRedoStacks, and QTextDocument::UndoStack.

Referenced by ~QTextDocumentPrivate(), clear(), and enableUndoRedo().

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

◆ createObject()

QTextObject * QTextDocumentPrivate::createObject ( const QTextFormat & newFormat,
int objectIndex = -1 )

Definition at line 1605 of file qtextdocument_p.cpp.

References QTextDocument::createObject(), and document().

Referenced by QTextCursor::createList(), QTextTablePrivate::createTable(), insertFrame(), QTextCursor::insertImage(), and rootFrame().

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

◆ defaultFont()

QFont QTextDocumentPrivate::defaultFont ( ) const
inline

Definition at line 224 of file qtextdocument_p.h.

◆ deleteObject()

void QTextDocumentPrivate::deleteObject ( QTextObject * object)

Definition at line 1617 of file qtextdocument_p.cpp.

References QMap< Key, T >::remove().

+ Here is the call graph for this function:

◆ document() [1/2]

QTextDocument * QTextDocumentPrivate::document ( )
inline

Definition at line 263 of file qtextdocument_p.h.

Referenced by createObject(), QTextCursor::document(), endEditBlock(), QTextCursor::insertHtml(), and QTextCursor::insertImage().

+ Here is the caller graph for this function:

◆ document() [2/2]

const QTextDocument * QTextDocumentPrivate::document ( ) const
inline

Definition at line 264 of file qtextdocument_p.h.

◆ documentChange()

void QTextDocumentPrivate::documentChange ( int from,
int length )

Definition at line 1229 of file qtextdocument_p.cpp.

References length(), qMax(), and qMin().

Referenced by changeObjectFormat(), QTextBlockGroupPrivate::markBlocksDirty(), setBlockFormat(), setCharFormat(), and undoRedo().

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

◆ emitRedoAvailable()

void QTextDocumentPrivate::emitRedoAvailable ( bool available)

Definition at line 1123 of file qtextdocument_p.cpp.

References emit.

Referenced by clearUndoRedoStacks(), enableUndoRedo(), and undoRedo().

+ Here is the caller graph for this function:

◆ emitUndoAvailable()

void QTextDocumentPrivate::emitUndoAvailable ( bool available)

Definition at line 1114 of file qtextdocument_p.cpp.

References emit.

Referenced by clearUndoRedoStacks(), enableUndoRedo(), and undoRedo().

+ Here is the caller graph for this function:

◆ enableUndoRedo()

void QTextDocumentPrivate::enableUndoRedo ( bool enable)

Definition at line 1132 of file qtextdocument_p.cpp.

References clearUndoRedoStacks(), emitRedoAvailable(), emitUndoAvailable(), maximumBlockCount, and QTextDocument::RedoStack.

+ Here is the call graph for this function:

◆ end()

FragmentIterator QTextDocumentPrivate::end ( ) const
inline

Definition at line 198 of file qtextdocument_p.h.

Referenced by plainText(), and setBlockFormat().

+ Here is the caller graph for this function:

◆ endEditBlock()

void QTextDocumentPrivate::endEditBlock ( )

◆ ensureMaximumBlockCount()

bool QTextDocumentPrivate::ensureMaximumBlockCount ( )

Definition at line 1687 of file qtextdocument_p.cpp.

References beginEditBlock(), cursor, endEditBlock(), QTextCursor::KeepAnchor, maximumBlockCount, QTextCursor::NextBlock, and QFragmentMap< Fragment >::numNodes().

Referenced by finishEdit().

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

◆ find()

FragmentIterator QTextDocumentPrivate::find ( int pos) const
inline

Definition at line 196 of file qtextdocument_p.h.

References pos.

Referenced by QPlainTextEdit::anchorAt(), QTextCursorPrivate::canDelete(), QTextCursor::charFormat(), QTextCursor::deletePreviousChar(), QAbstractTextDocumentLayout::format(), QAbstractTextDocumentLayout::formatAt(), QAbstractTextDocumentLayout::formatIndex(), insertFrame(), move(), and undoRedo().

+ Here is the caller graph for this function:

◆ finishEdit()

void QTextDocumentPrivate::finishEdit ( )

Definition at line 1177 of file qtextdocument_p.cpp.

References cursor, QAbstractTextDocumentLayout::documentChanged(), emit, ensureMaximumBlockCount(), inContentsChange, needsEnsureMaximumBlockCount, QFragmentMap< Fragment >::numNodes(), and QTextCursor.

Referenced by endEditBlock(), insert(), move(), and remove().

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

◆ formatCollection() [1/2]

QTextFormatCollection * QTextDocumentPrivate::formatCollection ( )
inline

◆ formatCollection() [2/2]

const QTextFormatCollection * QTextDocumentPrivate::formatCollection ( ) const
inline

Definition at line 193 of file qtextdocument_p.h.

◆ fragmentMap() [1/2]

FragmentMap & QTextDocumentPrivate::fragmentMap ( )
inline

Definition at line 210 of file qtextdocument_p.h.

◆ fragmentMap() [2/2]

const FragmentMap & QTextDocumentPrivate::fragmentMap ( ) const
inline

Definition at line 208 of file qtextdocument_p.h.

Referenced by QTextTablePrivate::findCellIndex(), and QTextTablePrivate::fragmentAdded().

+ Here is the caller graph for this function:

◆ frameAt()

QTextFrame * QTextDocumentPrivate::frameAt ( int pos) const

Definition at line 1434 of file qtextdocument_p.cpp.

References findChildFrame(), pos, and rootFrame().

Referenced by QTextCursorPrivate::aboutToRemoveCell(), QTextCursorPrivate::adjustCursor(), QTextCursorPrivate::complexSelectionTable(), QTextCursor::currentFrame(), QTextCursor::currentTable(), QTextDocumentLayoutPrivate::frameIteratorForTextPosition(), insertFrame(), move(), QTextCursorPrivate::movePosition(), and QTextCursorPrivate::selectedTableCells().

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

◆ get() [1/6]

static const QTextDocumentPrivate * QTextDocumentPrivate::get ( const QTextBlock & block)
inlinestatic

Definition at line 283 of file qtextdocument_p.h.

◆ get() [2/6]

static const QTextDocumentPrivate * QTextDocumentPrivate::get ( const QTextDocument * document)
inlinestatic

Definition at line 268 of file qtextdocument_p.h.

Referenced by QTextDocumentFragmentPrivate::QTextDocumentFragmentPrivate(), QTextList::add(), QPlainTextEdit::anchorAt(), QTextHtmlParserNode::applyForegroundImage(), QTextFrame::begin(), QTextTableCell::begin(), QTextBlockGroup::blockRemoved(), QTextEngine::calculateTabWidth(), QTextFrame::iterator::currentBlock(), QTextEngine::docLayout(), QTextFrame::end(), QTextTableCell::end(), findInBlock(), QTextTableCell::firstPosition(), QTextEngine::font(), QTextEngine::fontEngine(), QTextTableCell::format(), QAbstractTextDocumentLayout::format(), QAbstractTextDocumentLayout::formatAt(), QTextEngine::formatCollection(), QTextEngine::formatIndex(), QAbstractTextDocumentLayout::formatIndex(), QTextEngine::hasFormats(), QTextCursor::insertFragment(), QTextDocumentFragment::isEmpty(), QTextEngine::itemize(), QTextTableCell::lastPosition(), QTextDocumentLayout::layoutStatus(), QTextFrame::iterator::operator++(), QTextFrame::iterator::operator--(), QSyntaxHighlighterPrivate::reformatBlocks(), QTextList::remove(), QTextFramePrivate::remove_me(), QScriptLine::setDefaultHeight(), QAbstractTextDocumentLayoutPrivate::setDocument(), QTextTableCell::setFormat(), QTextLayout::setFormats(), QTextLayout::setPreeditArea(), QTextEngine::shape(), QTextTableCell::tableCellFormatIndex(), QTextHtmlExporter::toHtml(), QTextEngine::validate(), QTextEngine::visualCursorMovement(), and QTextOdfWriter::writeAll().

+ Here is the caller graph for this function:

◆ get() [3/6]

static const QTextDocumentPrivate * QTextDocumentPrivate::get ( const QTextObject * object)
inlinestatic

Definition at line 293 of file qtextdocument_p.h.

References get().

+ Here is the call graph for this function:

◆ get() [4/6]

static QTextDocumentPrivate * QTextDocumentPrivate::get ( QTextBlock & block)
inlinestatic

Definition at line 278 of file qtextdocument_p.h.

◆ get() [5/6]

static QTextDocumentPrivate * QTextDocumentPrivate::get ( QTextDocument * document)
inlinestatic

Definition at line 273 of file qtextdocument_p.h.

◆ get() [6/6]

static QTextDocumentPrivate * QTextDocumentPrivate::get ( QTextObject * object)
inlinestatic

Definition at line 288 of file qtextdocument_p.h.

References get().

+ Here is the call graph for this function:

◆ init()

void QTextDocumentPrivate::init ( )

Definition at line 186 of file qtextdocument_p.cpp.

References insertBlock().

Referenced by clear().

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

◆ insert() [1/3]

void QTextDocumentPrivate::insert ( int pos,
int strPos,
int strLength,
int format )

Definition at line 425 of file qtextdocument_p.cpp.

References appendUndoItem(), B, QFragmentMap< Fragment >::findNode(), finishEdit(), QFragmentMap< Fragment >::fragment(), QTextUndoCommand::Inserted, QFragmentMap< Fragment >::length(), QTextUndoCommand::MoveCursor, pos, Q_ASSERT, QT_INIT_TEXTUNDOCOMMAND, and QList< T >::size().

+ Here is the call graph for this function:

◆ insert() [2/3]

void QTextDocumentPrivate::insert ( int pos,
QChar c,
int format )
inline

Definition at line 146 of file qtextdocument_p.h.

References insert(), and pos.

+ Here is the call graph for this function:

◆ insert() [3/3]

void QTextDocumentPrivate::insert ( int pos,
QStringView text,
int format )

Definition at line 448 of file qtextdocument_p.cpp.

References QString::append(), insert(), noBlockInString(), pos, Q_ASSERT, QString::size(), and str.

Referenced by insert(), QTextCursor::insertImage(), and QTextCursor::insertText().

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

◆ insertBlock() [1/2]

int QTextDocumentPrivate::insertBlock ( int pos,
int blockFormat,
int charFormat,
QTextUndoCommand::Operation op = QTextUndoCommand::MoveCursor )

Definition at line 420 of file qtextdocument_p.cpp.

References insertBlock(), and pos.

Referenced by QTextTablePrivate::createTable(), init(), QTextCursorPrivate::insertBlock(), insertBlock(), and insertFrame().

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

◆ insertBlock() [2/2]

◆ insertFrame()

QTextFrame * QTextDocumentPrivate::insertFrame ( int start,
int end,
const QTextFrameFormat & format )

Definition at line 1528 of file qtextdocument_p.cpp.

References beginEditBlock(), createObject(), endEditBlock(), find(), frame, frameAt(), insertBlock(), QTextUndoCommand::KeepCursor, length(), QTextUndoCommand::MoveCursor, Q_ASSERT, QTextBeginningOfFrame, QTextEndOfFrame, and QTextFormat::setObjectIndex().

Referenced by QTextCursor::insertFrame().

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

◆ isInEditBlock()

bool QTextDocumentPrivate::isInEditBlock ( ) const
inline

Definition at line 178 of file qtextdocument_p.h.

Referenced by QTextCursorPrivate::movePosition(), and QTextCursorPrivate::setX().

+ Here is the caller graph for this function:

◆ isModified()

bool QTextDocumentPrivate::isModified ( ) const
inline

Definition at line 222 of file qtextdocument_p.h.

◆ isRedoAvailable()

bool QTextDocumentPrivate::isRedoAvailable ( ) const
inline

Definition at line 183 of file qtextdocument_p.h.

Referenced by undoRedo().

+ Here is the caller graph for this function:

◆ isUndoAvailable()

bool QTextDocumentPrivate::isUndoAvailable ( ) const
inline

Definition at line 182 of file qtextdocument_p.h.

Referenced by undoRedo().

+ Here is the caller graph for this function:

◆ isUndoRedoEnabled()

bool QTextDocumentPrivate::isUndoRedoEnabled ( ) const
inline

Definition at line 180 of file qtextdocument_p.h.

◆ joinPreviousEditBlock()

void QTextDocumentPrivate::joinPreviousEditBlock ( )

Definition at line 1149 of file qtextdocument_p.cpp.

References beginEditBlock().

Referenced by QTextCursor::joinPreviousEditBlock().

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

◆ layout()

QAbstractTextDocumentLayout * QTextDocumentPrivate::layout ( ) const
inline

Definition at line 194 of file qtextdocument_p.h.

Referenced by QTextCursorPrivate::blockLayout(), and setLayout().

+ Here is the caller graph for this function:

◆ leftCursorPosition()

int QTextDocumentPrivate::leftCursorPosition ( int position) const

Definition at line 1359 of file qtextdocument_p.cpp.

References blocksFind(), it, and position().

Referenced by QTextCursorPrivate::movePosition().

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

◆ length()

int QTextDocumentPrivate::length ( ) const
inline

Definition at line 190 of file qtextdocument_p.h.

Referenced by QTextCursor::atEnd(), documentChange(), insertFrame(), QTextDocumentLayoutPrivate::layoutFlow(), QTextCursorPrivate::movePosition(), nextCursorPosition(), plainText(), setCharFormat(), setLayout(), QTextCursor::setPosition(), and undoRedo().

+ Here is the caller graph for this function:

◆ mergeCachedResources()

void QTextDocumentPrivate::mergeCachedResources ( const QTextDocumentPrivate * priv)

Definition at line 3320 of file qtextdocument.cpp.

References QMap< Key, T >::insert(), and priv().

Referenced by QTextCursor::insertFragment().

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

◆ move()

◆ nextCursorPosition()

int QTextDocumentPrivate::nextCursorPosition ( int position,
QTextLayout::CursorMode mode ) const

Definition at line 1332 of file qtextdocument_p.cpp.

References blocksFind(), it, length(), and position().

Referenced by QTextCursor::deleteChar(), and QTextCursorPrivate::movePosition().

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

◆ numBlocks()

int QTextDocumentPrivate::numBlocks ( ) const
inline

Definition at line 205 of file qtextdocument_p.h.

◆ objectForFormat() [1/2]

QTextObject * QTextDocumentPrivate::objectForFormat ( const QTextFormat & f) const

Definition at line 1600 of file qtextdocument_p.cpp.

References objectForIndex().

+ Here is the call graph for this function:

◆ objectForFormat() [2/2]

QTextObject * QTextDocumentPrivate::objectForFormat ( int formatIndex) const

Definition at line 1594 of file qtextdocument_p.cpp.

References QTextObject::format(), objectForIndex(), and QTextFormat::objectIndex().

Referenced by QTextCursor::currentList(), setBlockFormat(), and undoRedo().

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

◆ objectForIndex()

QTextObject * QTextDocumentPrivate::objectForIndex ( int objectIndex) const

Definition at line 1580 of file qtextdocument_p.cpp.

References fmt, and QMap< Key, T >::value().

Referenced by objectForFormat(), objectForFormat(), and undoRedo().

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

◆ plainText()

QString QTextDocumentPrivate::plainText ( ) const

Definition at line 1307 of file qtextdocument_p.cpp.

References begin(), end(), it, length(), QString::resize(), and QString::unicode().

+ Here is the call graph for this function:

◆ previousCursorPosition()

int QTextDocumentPrivate::previousCursorPosition ( int position,
QTextLayout::CursorMode mode ) const

Definition at line 1346 of file qtextdocument_p.cpp.

References blocksFind(), it, and position().

Referenced by QTextCursorPrivate::movePosition().

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

◆ redo()

void QTextDocumentPrivate::redo ( )
inline

Definition at line 172 of file qtextdocument_p.h.

◆ remove()

void QTextDocumentPrivate::remove ( int pos,
int length,
QTextUndoCommand::Operation op = QTextUndoCommand::MoveCursor )

Definition at line 644 of file qtextdocument_p.cpp.

References blockCursorAdjustment, QTextCursorPrivate::CursorMoved, finishEdit(), move(), and pos.

Referenced by QTextCursorPrivate::clearCells(), QTextCursorPrivate::remove(), removeFrame(), and undoRedo().

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

◆ removeCursor()

void QTextDocumentPrivate::removeCursor ( QTextCursorPrivate * c)

Definition at line 1429 of file qtextdocument_p.cpp.

References QSet< T >::remove().

Referenced by QTextCursorPrivate::~QTextCursorPrivate().

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

◆ removeFrame()

void QTextDocumentPrivate::removeFrame ( QTextFrame * frame)

Definition at line 1561 of file qtextdocument_p.cpp.

References beginEditBlock(), endEditBlock(), frame, QObjectData::parent, Q_ASSERT, and remove().

+ Here is the call graph for this function:

◆ rightCursorPosition()

int QTextDocumentPrivate::rightCursorPosition ( int position) const

Definition at line 1366 of file qtextdocument_p.cpp.

References blocksFind(), it, and position().

Referenced by QTextCursorPrivate::movePosition().

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

◆ rootFrame()

QTextFrame * QTextDocumentPrivate::rootFrame ( ) const

Definition at line 1414 of file qtextdocument_p.cpp.

References createObject(), documentMargin, and QTextFrameFormat::setMargin().

Referenced by QTextDocumentLayoutPrivate::drawFrame(), frameAt(), QTextDocumentLayoutPrivate::frameIteratorForTextPosition(), and QTextDocumentLayoutPrivate::hitTest().

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

◆ setBlockFormat()

void QTextDocumentPrivate::setBlockFormat ( const QTextBlock & from,
const QTextBlock & to,
const QTextBlockFormat & newFormat,
FormatChangeMode mode = SetFormat )

Definition at line 751 of file qtextdocument_p.cpp.

References appendUndoItem(), beginEditBlock(), block(), QTextUndoCommand::BlockFormatChanged, documentChange(), end(), endEditBlock(), it, QTextBlock::length(), MergeFormat, QTextUndoCommand::MoveCursor, QTextBlock::next(), objectForFormat(), QTextBlock::position(), Q_ASSERT, QT_INIT_TEXTUNDOCOMMAND, SetFormat, and SetFormatAndPreserveObjectIndices.

Referenced by QTextCursorPrivate::setBlockFormat().

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

◆ setCharFormat()

void QTextDocumentPrivate::setCharFormat ( int pos,
int length,
const QTextCharFormat & newFormat,
FormatChangeMode mode = SetFormat )

Definition at line 659 of file qtextdocument_p.cpp.

References appendUndoItem(), beginEditBlock(), block(), blocksFind(), QTextFormat::CharFormat, QTextUndoCommand::CharFormatChanged, QTextFormat::clearProperty(), documentChange(), endEditBlock(), QFragmentMap< Fragment >::find(), QFragmentMap< Fragment >::findNode(), QTextFragmentData::format, it, QFragmentMap< QTextFragmentData >::Iterator, length(), QTextFormat::merge(), MergeFormat, QTextUndoCommand::MoveCursor, QTextFormat::ObjectIndex, pos, Q_ASSERT, qMin(), QT_INIT_TEXTUNDOCOMMAND, SetFormat, SetFormatAndPreserveObjectIndices, QTextFormat::setObjectIndex(), and QFragment< N >::size_array.

Referenced by QTextCursorPrivate::setCharFormat(), and undoRedo().

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

◆ setDefaultFont()

void QTextDocumentPrivate::setDefaultFont ( const QFont & f)
inline

Definition at line 225 of file qtextdocument_p.h.

◆ setLayout()

void QTextDocumentPrivate::setLayout ( QAbstractTextDocumentLayout * layout)

Definition at line 266 of file qtextdocument_p.cpp.

References QFragmentMap< Fragment >::begin(), QAbstractTextDocumentLayout::documentChanged(), emit, inContentsChange, it, QFragmentMap< QTextBlockData >::Iterator, layout(), and length().

+ Here is the call graph for this function:

◆ setModified()

void QTextDocumentPrivate::setModified ( bool m)

Definition at line 1672 of file qtextdocument_p.cpp.

References emit.

◆ undo()

void QTextDocumentPrivate::undo ( )
inline

Definition at line 171 of file qtextdocument_p.h.

Referenced by undoRedo().

+ Here is the caller graph for this function:

◆ undoRedo()

Friends And Related Symbol Documentation

◆ QTextCursor

friend class QTextCursor
friend

Definition at line 368 of file qtextdocument_p.h.

Referenced by finishEdit().

◆ QTextHtmlExporter

friend class QTextHtmlExporter
friend

Definition at line 367 of file qtextdocument_p.h.

◆ QTextHtmlParserNode

friend struct QTextHtmlParserNode
friend

Definition at line 366 of file qtextdocument_p.h.

Member Data Documentation

◆ baseUrl

QUrl QTextDocumentPrivate::baseUrl

Definition at line 362 of file qtextdocument_p.h.

◆ blockCursorAdjustment

uint QTextDocumentPrivate::blockCursorAdjustment

Definition at line 354 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate(), move(), and remove().

◆ cssMedia

QString QTextDocumentPrivate::cssMedia

Definition at line 358 of file qtextdocument_p.h.

◆ defaultCursorMoveStyle

Qt::CursorMoveStyle QTextDocumentPrivate::defaultCursorMoveStyle

Definition at line 348 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate(), and QTextCursorPrivate::movePosition().

◆ defaultTextOption

QTextOption QTextDocumentPrivate::defaultTextOption

◆ documentMargin

qreal QTextDocumentPrivate::documentMargin

Definition at line 361 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate(), and rootFrame().

◆ frontMatter

QString QTextDocumentPrivate::frontMatter

Definition at line 359 of file qtextdocument_p.h.

◆ inContentsChange

bool QTextDocumentPrivate::inContentsChange

◆ indentWidth

qreal QTextDocumentPrivate::indentWidth

Definition at line 360 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate().

◆ layoutEnabled

bool QTextDocumentPrivate::layoutEnabled = true

Definition at line 346 of file qtextdocument_p.h.

◆ maximumBlockCount

int QTextDocumentPrivate::maximumBlockCount

◆ needsEnsureMaximumBlockCount

uint QTextDocumentPrivate::needsEnsureMaximumBlockCount

Definition at line 353 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate(), finishEdit(), and insertBlock().

◆ pageSize

QSizeF QTextDocumentPrivate::pageSize

Definition at line 355 of file qtextdocument_p.h.

◆ parsedDefaultStyleSheet

QCss::StyleSheet QTextDocumentPrivate::parsedDefaultStyleSheet

Definition at line 350 of file qtextdocument_p.h.

◆ title

QString QTextDocumentPrivate::title

Definition at line 356 of file qtextdocument_p.h.

Referenced by clear().

◆ url

QString QTextDocumentPrivate::url

Definition at line 357 of file qtextdocument_p.h.


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