Qt 6.x
The Qt SDK
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, const QString &text, 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)
 
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
 

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
 
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 unused: 21
 
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 159 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 1713 of file qtextdocument_p.cpp.

References Q_ASSERT.

◆ addCursor()

void QTextDocumentPrivate::addCursor ( QTextCursorPrivate c)

Definition at line 1422 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 1007 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 184 of file qtextdocument_p.h.

References qMax().

+ Here is the call graph for this function:

◆ availableUndoSteps()

int QTextDocumentPrivate::availableUndoSteps ( ) const
inline

Definition at line 183 of file qtextdocument_p.h.

◆ begin()

FragmentIterator QTextDocumentPrivate::begin ( ) const
inline

Definition at line 195 of file qtextdocument_p.h.

Referenced by plainText(), and QTextOdfWriter::writeAll().

+ Here is the caller graph for this function:

◆ beginEditBlock()

◆ block()

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

Definition at line 210 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 1321 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 207 of file qtextdocument_p.h.

◆ blockMap() [2/2]

const BlockMap & QTextDocumentPrivate::blockMap ( ) const
inline

Definition at line 205 of file qtextdocument_p.h.

Referenced by QTextCursor::charFormat(), and QTextDocumentLayoutPrivate::frameIteratorForTextPosition().

+ Here is the caller graph for this function:

◆ blocksBegin()

QTextBlock QTextDocumentPrivate::blocksBegin ( ) const
inline

Definition at line 198 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 199 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 200 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 186 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 296 of file qtextdocument_p.h.

◆ changeObjectFormat()

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

Definition at line 1371 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 1071 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 1603 of file qtextdocument_p.cpp.

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

Referenced by QTextCursor::createList(), QTextTablePrivate::createTable(), insertFrame(), QTextCursor::insertImage(), objectForIndex(), 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 222 of file qtextdocument_p.h.

◆ deleteObject()

void QTextDocumentPrivate::deleteObject ( QTextObject object)

Definition at line 1615 of file qtextdocument_p.cpp.

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

Referenced by QTextBlockGroup::blockRemoved(), and QTextFramePrivate::remove_me().

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

◆ document() [1/2]

QTextDocument * QTextDocumentPrivate::document ( )
inline

Definition at line 261 of file qtextdocument_p.h.

Referenced by createObject(), QTextEngine::docLayout(), 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 262 of file qtextdocument_p.h.

◆ documentChange()

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

Definition at line 1227 of file qtextdocument_p.cpp.

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

Referenced by changeObjectFormat(), QTextBlockGroupPrivate::markBlocksDirty(), setBlockFormat(), setCharFormat(), QTextLayout::setFormats(), QTextLayout::setPreeditArea(), 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 1121 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 1112 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 1130 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 196 of file qtextdocument_p.h.

Referenced by plainText(), and setBlockFormat().

+ Here is the caller graph for this function:

◆ endEditBlock()

◆ ensureMaximumBlockCount()

bool QTextDocumentPrivate::ensureMaximumBlockCount ( )

Definition at line 1685 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 194 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 1175 of file qtextdocument_p.cpp.

References QList< T >::append(), 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]

◆ formatCollection() [2/2]

const QTextFormatCollection * QTextDocumentPrivate::formatCollection ( ) const
inline

Definition at line 191 of file qtextdocument_p.h.

◆ fragmentMap() [1/2]

FragmentMap & QTextDocumentPrivate::fragmentMap ( )
inline

Definition at line 208 of file qtextdocument_p.h.

◆ fragmentMap() [2/2]

const FragmentMap & QTextDocumentPrivate::fragmentMap ( ) const
inline

Definition at line 206 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 1432 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 281 of file qtextdocument_p.h.

◆ get() [2/6]

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

Definition at line 266 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 291 of file qtextdocument_p.h.

References QObjectPrivate::get().

+ Here is the call graph for this function:

◆ get() [4/6]

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

Definition at line 276 of file qtextdocument_p.h.

◆ get() [5/6]

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

Definition at line 271 of file qtextdocument_p.h.

◆ get() [6/6]

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

Definition at line 286 of file qtextdocument_p.h.

References QObjectPrivate::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/2]

void QTextDocumentPrivate::insert ( int  pos,
const QString text,
int  format 
)

Definition at line 446 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:

◆ insert() [2/2]

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

Definition at line 423 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:

◆ insertBlock() [1/2]

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

Definition at line 418 of file qtextdocument_p.cpp.

References insertBlock(), QChar::ParagraphSeparator, 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 1526 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 176 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 220 of file qtextdocument_p.h.

◆ isRedoAvailable()

bool QTextDocumentPrivate::isRedoAvailable ( ) const
inline

Definition at line 181 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 180 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 178 of file qtextdocument_p.h.

◆ joinPreviousEditBlock()

void QTextDocumentPrivate::joinPreviousEditBlock ( )

Definition at line 1147 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 192 of file qtextdocument_p.h.

Referenced by QTextCursorPrivate::blockLayout(), QTextEngine::calculateTabWidth(), QTextEngine::font(), QTextEngine::fontEngine(), QTextEngine::itemize(), QScriptLine::setDefaultHeight(), and setLayout().

+ Here is the caller graph for this function:

◆ leftCursorPosition()

int QTextDocumentPrivate::leftCursorPosition ( int  position) const

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

◆ mergeCachedResources()

void QTextDocumentPrivate::mergeCachedResources ( const QTextDocumentPrivate priv)

Definition at line 3211 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 1330 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 203 of file qtextdocument_p.h.

◆ objectForFormat() [1/2]

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

Definition at line 1598 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 1592 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 1578 of file qtextdocument_p.cpp.

References createObject(), 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 1305 of file qtextdocument_p.cpp.

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

+ Here is the call graph for this function:

◆ previousCursorPosition()

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

Definition at line 1344 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 170 of file qtextdocument_p.h.

◆ remove()

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

Definition at line 642 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 1427 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 1559 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 1364 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 1412 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 749 of file qtextdocument_p.cpp.

References appendUndoItem(), beginEditBlock(), block(), QTextUndoCommand::BlockFormatChanged, QTextBlockGroup::blockRemoved(), documentChange(), end(), endEditBlock(), QTextBlockData::format, QTextBlockData::invalidate(), QTextBlockFormat::isValid(), 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 
)

◆ setDefaultFont()

void QTextDocumentPrivate::setDefaultFont ( const QFont f)
inline

Definition at line 223 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 1670 of file qtextdocument_p.cpp.

References emit.

◆ undo()

void QTextDocumentPrivate::undo ( )
inline

Definition at line 169 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 365 of file qtextdocument_p.h.

Referenced by finishEdit().

◆ QTextHtmlExporter

friend class QTextHtmlExporter
friend

Definition at line 364 of file qtextdocument_p.h.

◆ QTextHtmlParserNode

friend struct QTextHtmlParserNode
friend

Definition at line 363 of file qtextdocument_p.h.

Member Data Documentation

◆ baseUrl

QUrl QTextDocumentPrivate::baseUrl

Definition at line 359 of file qtextdocument_p.h.

◆ blockCursorAdjustment

uint QTextDocumentPrivate::blockCursorAdjustment

Definition at line 352 of file qtextdocument_p.h.

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

◆ cssMedia

QString QTextDocumentPrivate::cssMedia

Definition at line 356 of file qtextdocument_p.h.

◆ defaultCursorMoveStyle

Qt::CursorMoveStyle QTextDocumentPrivate::defaultCursorMoveStyle

◆ defaultTextOption

QTextOption QTextDocumentPrivate::defaultTextOption

◆ documentMargin

qreal QTextDocumentPrivate::documentMargin

Definition at line 358 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate(), and rootFrame().

◆ inContentsChange

bool QTextDocumentPrivate::inContentsChange

◆ indentWidth

qreal QTextDocumentPrivate::indentWidth

Definition at line 357 of file qtextdocument_p.h.

Referenced by QTextDocumentPrivate().

◆ layoutEnabled

bool QTextDocumentPrivate::layoutEnabled = true

Definition at line 344 of file qtextdocument_p.h.

◆ maximumBlockCount

int QTextDocumentPrivate::maximumBlockCount

◆ needsEnsureMaximumBlockCount

uint QTextDocumentPrivate::needsEnsureMaximumBlockCount

Definition at line 351 of file qtextdocument_p.h.

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

◆ pageSize

QSizeF QTextDocumentPrivate::pageSize

Definition at line 353 of file qtextdocument_p.h.

◆ parsedDefaultStyleSheet

QCss::StyleSheet QTextDocumentPrivate::parsedDefaultStyleSheet

Definition at line 348 of file qtextdocument_p.h.

◆ title

QString QTextDocumentPrivate::title

Definition at line 354 of file qtextdocument_p.h.

Referenced by clear().

◆ url

QString QTextDocumentPrivate::url

Definition at line 355 of file qtextdocument_p.h.


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