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

#include <qtextformat_p.h>

+ Collaboration diagram for QTextFormatCollection:

Public Types

typedef QList< QTextFormatFormatVector
 

Public Member Functions

 QTextFormatCollection ()
 
 ~QTextFormatCollection ()
 
void clear ()
 
QTextFormat objectFormat (int objectIndex) const
 
void setObjectFormat (int objectIndex, const QTextFormat &format)
 
int objectFormatIndex (int objectIndex) const
 
void setObjectFormatIndex (int objectIndex, int formatIndex)
 
int createObjectIndex (const QTextFormat &f)
 
int indexForFormat (const QTextFormat &f)
 
bool hasFormatCached (const QTextFormat &format) const
 
QTextFormat format (int idx) const
 
QTextBlockFormat blockFormat (int index) const
 
QTextCharFormat charFormat (int index) const
 
QTextListFormat listFormat (int index) const
 
QTextTableFormat tableFormat (int index) const
 
QTextImageFormat imageFormat (int index) const
 
int numFormats () const
 
QFont defaultFont () const
 
void setDefaultFont (const QFont &f)
 
void setSuperScriptBaseline (qreal baseline)
 
void setSubScriptBaseline (qreal baseline)
 
void setBaselineOffset (qreal baseline)
 
QTextCharFormat defaultTextFormat () const
 

Public Attributes

FormatVector formats
 
QList< qint32objFormats
 
QMultiHash< size_t, int > hashes
 

Detailed Description

Definition at line 25 of file qtextformat_p.h.

Member Typedef Documentation

◆ FormatVector

Constructor & Destructor Documentation

◆ QTextFormatCollection()

QTextFormatCollection::QTextFormatCollection ( )
inline

Definition at line 28 of file qtextformat_p.h.

◆ ~QTextFormatCollection()

QTextFormatCollection::~QTextFormatCollection ( )

Definition at line 3942 of file qtextformat.cpp.

Member Function Documentation

◆ blockFormat()

QTextBlockFormat QTextFormatCollection::blockFormat ( int index) const
inline

Definition at line 47 of file qtextformat_p.h.

References QTextFormat::toBlockFormat().

+ Here is the call graph for this function:

◆ charFormat()

QTextCharFormat QTextFormatCollection::charFormat ( int index) const
inline

Definition at line 49 of file qtextformat_p.h.

References QTextFormat::toCharFormat().

Referenced by QPlainTextEdit::anchorAt(), QTextCursorPrivate::canDelete(), QTextCursor::charFormat(), QAbstractTextDocumentLayout::format(), QTextEngine::itemize(), and QTextBlock::textFormats().

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

◆ clear()

void QTextFormatCollection::clear ( )

Definition at line 3946 of file qtextformat.cpp.

References QList< T >::clear(), QMultiHash< Key, T >::clear(), hashes, and objFormats.

+ Here is the call graph for this function:

◆ createObjectIndex()

int QTextFormatCollection::createObjectIndex ( const QTextFormat & f)

Definition at line 4007 of file qtextformat.cpp.

References QList< T >::append(), indexForFormat(), objFormats, and QList< T >::size().

+ Here is the call graph for this function:

◆ defaultFont()

QFont QTextFormatCollection::defaultFont ( ) const
inline

Definition at line 66 of file qtextformat_p.h.

Referenced by QTextEngine::itemize().

+ Here is the caller graph for this function:

◆ defaultTextFormat()

QTextCharFormat QTextFormatCollection::defaultTextFormat ( ) const
inline

Definition at line 73 of file qtextformat_p.h.

◆ format()

QTextFormat QTextFormatCollection::format ( int idx) const

Definition at line 4014 of file qtextformat.cpp.

Referenced by QAbstractTextDocumentLayout::formatAt().

+ Here is the caller graph for this function:

◆ hasFormatCached()

bool QTextFormatCollection::hasFormatCached ( const QTextFormat & format) const

Definition at line 3982 of file qtextformat.cpp.

References QMultiHash< Key, T >::constEnd(), QMultiHash< Key, T >::constFind(), getHash(), hash, hashes, and i.

+ Here is the call graph for this function:

◆ imageFormat()

QTextImageFormat QTextFormatCollection::imageFormat ( int index) const
inline

Definition at line 55 of file qtextformat_p.h.

References QTextFormat::toImageFormat().

+ Here is the call graph for this function:

◆ indexForFormat()

int QTextFormatCollection::indexForFormat ( const QTextFormat & f)

Definition at line 3953 of file qtextformat.cpp.

References QMultiHash< Key, T >::constEnd(), QMultiHash< Key, T >::constFind(), getHash(), hash, hashes, i, QMultiHash< Key, T >::insert(), QT_CATCH, QT_RETHROW, QT_TRY, and QTextFormatPrivate::resolveFont().

Referenced by createObjectIndex(), QTextTablePrivate::createTable(), QTextCursorPrivate::insertBlock(), QTextCursor::insertImage(), QTextCursor::insertText(), QTextCursor::mergeCharFormat(), and QTextCursor::setCharFormat().

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

◆ listFormat()

QTextListFormat QTextFormatCollection::listFormat ( int index) const
inline

Definition at line 51 of file qtextformat_p.h.

References QTextFormat::toListFormat().

+ Here is the call graph for this function:

◆ numFormats()

int QTextFormatCollection::numFormats ( ) const
inline

Definition at line 58 of file qtextformat_p.h.

◆ objectFormat()

QTextFormat QTextFormatCollection::objectFormat ( int objectIndex) const
inline

Definition at line 33 of file qtextformat_p.h.

◆ objectFormatIndex()

int QTextFormatCollection::objectFormatIndex ( int objectIndex) const

Definition at line 3995 of file qtextformat.cpp.

References QList< T >::at(), objFormats, and QList< T >::size().

+ Here is the call graph for this function:

◆ setBaselineOffset()

void QTextFormatCollection::setBaselineOffset ( qreal baseline)
inline

Definition at line 71 of file qtextformat_p.h.

◆ setDefaultFont()

void QTextFormatCollection::setDefaultFont ( const QFont & f)

Definition at line 4022 of file qtextformat.cpp.

References i.

◆ setObjectFormat()

void QTextFormatCollection::setObjectFormat ( int objectIndex,
const QTextFormat & format )
inline

Definition at line 35 of file qtextformat_p.h.

◆ setObjectFormatIndex()

void QTextFormatCollection::setObjectFormatIndex ( int objectIndex,
int formatIndex )

Definition at line 4002 of file qtextformat.cpp.

References objFormats.

◆ setSubScriptBaseline()

void QTextFormatCollection::setSubScriptBaseline ( qreal baseline)
inline

Definition at line 70 of file qtextformat_p.h.

◆ setSuperScriptBaseline()

void QTextFormatCollection::setSuperScriptBaseline ( qreal baseline)
inline

Definition at line 69 of file qtextformat_p.h.

◆ tableFormat()

QTextTableFormat QTextFormatCollection::tableFormat ( int index) const
inline

Definition at line 53 of file qtextformat_p.h.

References QTextFormat::toTableFormat().

+ Here is the call graph for this function:

Member Data Documentation

◆ formats

FormatVector QTextFormatCollection::formats

Definition at line 62 of file qtextformat_p.h.

◆ hashes

QMultiHash<size_t,int> QTextFormatCollection::hashes

Definition at line 64 of file qtextformat_p.h.

Referenced by clear(), hasFormatCached(), and indexForFormat().

◆ objFormats

QList<qint32> QTextFormatCollection::objFormats

Definition at line 63 of file qtextformat_p.h.

Referenced by clear(), createObjectIndex(), objectFormatIndex(), and setObjectFormatIndex().


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