Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQuickStyledTextPrivate Class Reference
Collaboration diagram for QQuickStyledTextPrivate:

Classes

struct  List

Public Types

enum  ListType { Ordered , Unordered , Ordered , Unordered }
enum  ListFormat {
  Bullet , Disc , Square , Decimal ,
  LowerAlpha , UpperAlpha , LowerRoman , UpperRoman ,
  Bullet , Disc , Square , Decimal ,
  LowerAlpha , UpperAlpha , LowerRoman , UpperRoman
}
enum  ListType { Ordered , Unordered , Ordered , Unordered }
enum  ListFormat {
  Bullet , Disc , Square , Decimal ,
  LowerAlpha , UpperAlpha , LowerRoman , UpperRoman ,
  Bullet , Disc , Square , Decimal ,
  LowerAlpha , UpperAlpha , LowerRoman , UpperRoman
}

Public Member Functions

 QQuickStyledTextPrivate (const QString &t, QTextLayout &l, QList< QQuickStyledTextImgTag * > &imgTags, const QUrl &baseUrl, QQmlContext *context, bool preloadImages, bool *fontSizeModified)
void parse ()
void appendText (const QString &textIn, int start, int length, QString &textOut)
bool parseTag (const QChar *&ch, const QString &textIn, QString &textOut, QTextCharFormat &format)
bool parseCloseTag (const QChar *&ch, const QString &textIn, QString &textOut)
void parseEntity (const QChar *&ch, const QString &textIn, QString &textOut)
bool parseFontAttributes (const QChar *&ch, const QString &textIn, QTextCharFormat &format)
bool parseOrderedListAttributes (const QChar *&ch, const QString &textIn)
bool parseUnorderedListAttributes (const QChar *&ch, const QString &textIn)
bool parseAnchorAttributes (const QChar *&ch, const QString &textIn, QTextCharFormat &format)
void parseImageAttributes (const QChar *&ch, const QString &textIn, QString &textOut)
std::pair< QStringView, QStringViewparseAttribute (const QChar *&ch, const QString &textIn)
QStringView parseValue (const QChar *&ch, const QString &textIn)
void setFontSize (int size, QTextCharFormat &format)
void skipSpace (const QChar *&ch)
 QQuickStyledTextPrivate (const QString &t, QTextLayout &l, QList< QQuickStyledTextImgTag * > &imgTags, const QUrl &baseUrl, QQmlContext *context, bool preloadImages, bool *fontSizeModified)
void parse ()
void appendText (const QString &textIn, int start, int length, QString &textOut)
bool parseTag (const QChar *&ch, const QString &textIn, QString &textOut, QTextCharFormat &format)
bool parseCloseTag (const QChar *&ch, const QString &textIn, QString &textOut)
void parseEntity (const QChar *&ch, const QString &textIn, QString &textOut)
bool parseFontAttributes (const QChar *&ch, const QString &textIn, QTextCharFormat &format)
bool parseOrderedListAttributes (const QChar *&ch, const QString &textIn)
bool parseUnorderedListAttributes (const QChar *&ch, const QString &textIn)
bool parseAnchorAttributes (const QChar *&ch, const QString &textIn, QTextCharFormat &format)
void parseImageAttributes (const QChar *&ch, const QString &textIn, QString &textOut)
std::pair< QStringView, QStringViewparseAttribute (const QChar *&ch, const QString &textIn)
QStringView parseValue (const QChar *&ch, const QString &textIn)
void setFontSize (int size, QTextCharFormat &format)
void skipSpace (const QChar *&ch)

Static Public Member Functions

static QString toAlpha (int value, bool upper)
static QString toRoman (int value, bool upper)
static QString toAlpha (int value, bool upper)
static QString toRoman (int value, bool upper)

Public Attributes

QString text
QTextLayoutlayout
QList< QQuickStyledTextImgTag * > * imgTags
QFont baseFont
QStack< ListlistStack
QUrl baseUrl
bool * fontSizeModified
QQmlContextcontext
int nbImages = 0
bool hasNewLine = true
bool updateImagePositions = false
bool preFormat = false
bool prependSpace = false
bool hasSpace = true
bool preloadImages

Static Public Attributes

static const QChar lessThan
static const QChar greaterThan
static const QChar equals
static const QChar singleQuote
static const QChar doubleQuote
static const QChar slash
static const QChar ampersand
static const QChar bullet
static const QChar disc
static const QChar square
static const QChar lineFeed
static const QChar space
static const int tabsize = 6

Detailed Description

Definition at line 42 of file qquickstyledtext.cpp.

Member Enumeration Documentation

◆ ListFormat [1/2]

Enumerator
Bullet 
Disc 
Square 
Decimal 
LowerAlpha 
UpperAlpha 
LowerRoman 
UpperRoman 
Bullet 
Disc 
Square 
Decimal 
LowerAlpha 
UpperAlpha 
LowerRoman 
UpperRoman 

Definition at line 46 of file qquickstyledtext.cpp.

◆ ListFormat [2/2]

Enumerator
Bullet 
Disc 
Square 
Decimal 
LowerAlpha 
UpperAlpha 
LowerRoman 
UpperRoman 
Bullet 
Disc 
Square 
Decimal 
LowerAlpha 
UpperAlpha 
LowerRoman 
UpperRoman 

Definition at line 46 of file qquickstyledtext.cpp.

◆ ListType [1/2]

Enumerator
Ordered 
Unordered 
Ordered 
Unordered 

Definition at line 45 of file qquickstyledtext.cpp.

◆ ListType [2/2]

Enumerator
Ordered 
Unordered 
Ordered 
Unordered 

Definition at line 45 of file qquickstyledtext.cpp.

Constructor & Destructor Documentation

◆ QQuickStyledTextPrivate() [1/2]

QQuickStyledTextPrivate::QQuickStyledTextPrivate ( const QString & t,
QTextLayout & l,
QList< QQuickStyledTextImgTag * > & imgTags,
const QUrl & baseUrl,
QQmlContext * context,
bool preloadImages,
bool * fontSizeModified )
inline

Definition at line 54 of file qquickstyledtext.cpp.

References QQuickStyledTextPrivate(), context, fontSizeModified, and preloadImages.

Referenced by QQuickStyledTextPrivate().

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

◆ QQuickStyledTextPrivate() [2/2]

QQuickStyledTextPrivate::QQuickStyledTextPrivate ( const QString & t,
QTextLayout & l,
QList< QQuickStyledTextImgTag * > & imgTags,
const QUrl & baseUrl,
QQmlContext * context,
bool preloadImages,
bool * fontSizeModified )
inline

Definition at line 54 of file qquickstyledtext.cpp.

Member Function Documentation

◆ appendText() [1/2]

void QQuickStyledTextPrivate::appendText ( const QString & textIn,
int start,
int length,
QString & textOut )

Definition at line 272 of file qquickstyledtext.cpp.

References hasNewLine, hasSpace, and prependSpace.

◆ appendText() [2/2]

void QQuickStyledTextPrivate::appendText ( const QString & textIn,
int start,
int length,
QString & textOut )

◆ parse() [1/2]

void QQuickStyledTextPrivate::parse ( )

Definition at line 166 of file qquickstyledtext.cpp.

References hasNewLine, hasSpace, preFormat, and prependSpace.

◆ parse() [2/2]

void QQuickStyledTextPrivate::parse ( )

◆ parseAnchorAttributes() [1/2]

bool QQuickStyledTextPrivate::parseAnchorAttributes ( const QChar *& ch,
const QString & textIn,
QTextCharFormat & format )

Definition at line 628 of file qquickstyledtext.cpp.

◆ parseAnchorAttributes() [2/2]

bool QQuickStyledTextPrivate::parseAnchorAttributes ( const QChar *& ch,
const QString & textIn,
QTextCharFormat & format )

◆ parseAttribute() [1/2]

std::pair< QStringView, QStringView > QQuickStyledTextPrivate::parseAttribute ( const QChar *& ch,
const QString & textIn )

Definition at line 719 of file qquickstyledtext.cpp.

◆ parseAttribute() [2/2]

std::pair< QStringView, QStringView > QQuickStyledTextPrivate::parseAttribute ( const QChar *& ch,
const QString & textIn )

◆ parseCloseTag() [1/2]

bool QQuickStyledTextPrivate::parseCloseTag ( const QChar *& ch,
const QString & textIn,
QString & textOut )

Definition at line 443 of file qquickstyledtext.cpp.

References hasNewLine, hasSpace, and preFormat.

◆ parseCloseTag() [2/2]

bool QQuickStyledTextPrivate::parseCloseTag ( const QChar *& ch,
const QString & textIn,
QString & textOut )

◆ parseEntity() [1/2]

void QQuickStyledTextPrivate::parseEntity ( const QChar *& ch,
const QString & textIn,
QString & textOut )

Definition at line 527 of file qquickstyledtext.cpp.

◆ parseEntity() [2/2]

void QQuickStyledTextPrivate::parseEntity ( const QChar *& ch,
const QString & textIn,
QString & textOut )

◆ parseFontAttributes() [1/2]

bool QQuickStyledTextPrivate::parseFontAttributes ( const QChar *& ch,
const QString & textIn,
QTextCharFormat & format )

Definition at line 552 of file qquickstyledtext.cpp.

◆ parseFontAttributes() [2/2]

bool QQuickStyledTextPrivate::parseFontAttributes ( const QChar *& ch,
const QString & textIn,
QTextCharFormat & format )

◆ parseImageAttributes() [1/2]

void QQuickStyledTextPrivate::parseImageAttributes ( const QChar *& ch,
const QString & textIn,
QString & textOut )

Definition at line 646 of file qquickstyledtext.cpp.

References nbImages, preloadImages, and updateImagePositions.

◆ parseImageAttributes() [2/2]

void QQuickStyledTextPrivate::parseImageAttributes ( const QChar *& ch,
const QString & textIn,
QString & textOut )

◆ parseOrderedListAttributes() [1/2]

bool QQuickStyledTextPrivate::parseOrderedListAttributes ( const QChar *& ch,
const QString & textIn )

◆ parseOrderedListAttributes() [2/2]

bool QQuickStyledTextPrivate::parseOrderedListAttributes ( const QChar *& ch,
const QString & textIn )

◆ parseTag() [1/2]

bool QQuickStyledTextPrivate::parseTag ( const QChar *& ch,
const QString & textIn,
QString & textOut,
QTextCharFormat & format )

Definition at line 296 of file qquickstyledtext.cpp.

References Bullet, Decimal, Disc, QQuickStyledTextPrivate::List::format, hasSpace, QQuickStyledTextPrivate::List::level, LowerAlpha, LowerRoman, Ordered, preFormat, prependSpace, Square, toAlpha(), toRoman(), QQuickStyledTextPrivate::List::type, Unordered, UpperAlpha, and UpperRoman.

Here is the call graph for this function:

◆ parseTag() [2/2]

bool QQuickStyledTextPrivate::parseTag ( const QChar *& ch,
const QString & textIn,
QString & textOut,
QTextCharFormat & format )

◆ parseUnorderedListAttributes() [1/2]

bool QQuickStyledTextPrivate::parseUnorderedListAttributes ( const QChar *& ch,
const QString & textIn )

◆ parseUnorderedListAttributes() [2/2]

bool QQuickStyledTextPrivate::parseUnorderedListAttributes ( const QChar *& ch,
const QString & textIn )

◆ parseValue() [1/2]

QStringView QQuickStyledTextPrivate::parseValue ( const QChar *& ch,
const QString & textIn )

Definition at line 752 of file qquickstyledtext.cpp.

◆ parseValue() [2/2]

QStringView QQuickStyledTextPrivate::parseValue ( const QChar *& ch,
const QString & textIn )

◆ setFontSize() [1/2]

void QQuickStyledTextPrivate::setFontSize ( int size,
QTextCharFormat & format )

Definition at line 286 of file qquickstyledtext.cpp.

References fontSizeModified.

◆ setFontSize() [2/2]

void QQuickStyledTextPrivate::setFontSize ( int size,
QTextCharFormat & format )

◆ skipSpace() [1/2]

void QQuickStyledTextPrivate::skipSpace ( const QChar *& ch)
inline

Definition at line 79 of file qquickstyledtext.cpp.

◆ skipSpace() [2/2]

void QQuickStyledTextPrivate::skipSpace ( const QChar *& ch)
inline

Definition at line 79 of file qquickstyledtext.cpp.

◆ toAlpha() [1/2]

QString QQuickStyledTextPrivate::toAlpha ( int value,
bool upper )
static

Definition at line 767 of file qquickstyledtext.cpp.

Referenced by parseTag().

Here is the caller graph for this function:

◆ toAlpha() [2/2]

QString QQuickStyledTextPrivate::toAlpha ( int value,
bool upper )
static

◆ toRoman() [1/2]

QString QQuickStyledTextPrivate::toRoman ( int value,
bool upper )
static

Definition at line 781 of file qquickstyledtext.cpp.

Referenced by parseTag().

Here is the caller graph for this function:

◆ toRoman() [2/2]

QString QQuickStyledTextPrivate::toRoman ( int value,
bool upper )
static

Member Data Documentation

◆ ampersand

const QChar QQuickStyledTextPrivate::ampersand
static

Definition at line 109 of file qquickstyledtext.cpp.

◆ baseFont

QFont QQuickStyledTextPrivate::baseFont

Definition at line 90 of file qquickstyledtext.cpp.

◆ baseUrl

QUrl QQuickStyledTextPrivate::baseUrl

Definition at line 92 of file qquickstyledtext.cpp.

◆ bullet

const QChar QQuickStyledTextPrivate::bullet
static

Definition at line 110 of file qquickstyledtext.cpp.

◆ context

◆ disc

const QChar QQuickStyledTextPrivate::disc
static

Definition at line 111 of file qquickstyledtext.cpp.

◆ doubleQuote

const QChar QQuickStyledTextPrivate::doubleQuote
static

Definition at line 107 of file qquickstyledtext.cpp.

◆ equals

const QChar QQuickStyledTextPrivate::equals
static

Definition at line 105 of file qquickstyledtext.cpp.

◆ fontSizeModified

bool * QQuickStyledTextPrivate::fontSizeModified

Definition at line 93 of file qquickstyledtext.cpp.

Referenced by QQuickStyledTextPrivate(), and setFontSize().

◆ greaterThan

const QChar QQuickStyledTextPrivate::greaterThan
static

Definition at line 104 of file qquickstyledtext.cpp.

◆ hasNewLine

bool QQuickStyledTextPrivate::hasNewLine = true

Definition at line 96 of file qquickstyledtext.cpp.

Referenced by appendText(), parse(), and parseCloseTag().

◆ hasSpace

bool QQuickStyledTextPrivate::hasSpace = true

Definition at line 100 of file qquickstyledtext.cpp.

Referenced by appendText(), parse(), parseCloseTag(), and parseTag().

◆ imgTags

QList< QQuickStyledTextImgTag * > * QQuickStyledTextPrivate::imgTags

Definition at line 89 of file qquickstyledtext.cpp.

◆ layout

QTextLayout & QQuickStyledTextPrivate::layout

Definition at line 88 of file qquickstyledtext.cpp.

◆ lessThan

const QChar QQuickStyledTextPrivate::lessThan
static

Definition at line 103 of file qquickstyledtext.cpp.

◆ lineFeed

const QChar QQuickStyledTextPrivate::lineFeed
static

Definition at line 113 of file qquickstyledtext.cpp.

◆ listStack

QStack< List > QQuickStyledTextPrivate::listStack

Definition at line 91 of file qquickstyledtext.cpp.

◆ nbImages

int QQuickStyledTextPrivate::nbImages = 0

Definition at line 95 of file qquickstyledtext.cpp.

Referenced by parseImageAttributes().

◆ preFormat

bool QQuickStyledTextPrivate::preFormat = false

Definition at line 98 of file qquickstyledtext.cpp.

Referenced by parse(), parseCloseTag(), and parseTag().

◆ preloadImages

bool QQuickStyledTextPrivate::preloadImages

Definition at line 101 of file qquickstyledtext.cpp.

Referenced by QQuickStyledTextPrivate(), and parseImageAttributes().

◆ prependSpace

bool QQuickStyledTextPrivate::prependSpace = false

Definition at line 99 of file qquickstyledtext.cpp.

Referenced by appendText(), parse(), and parseTag().

◆ singleQuote

const QChar QQuickStyledTextPrivate::singleQuote
static

Definition at line 106 of file qquickstyledtext.cpp.

◆ slash

const QChar QQuickStyledTextPrivate::slash
static

Definition at line 108 of file qquickstyledtext.cpp.

◆ space

const QChar QQuickStyledTextPrivate::space
static

Definition at line 114 of file qquickstyledtext.cpp.

◆ square

const QChar QQuickStyledTextPrivate::square
static

Definition at line 112 of file qquickstyledtext.cpp.

◆ tabsize

const int QQuickStyledTextPrivate::tabsize = 6
static

Definition at line 115 of file qquickstyledtext.cpp.

◆ text

QString QQuickStyledTextPrivate::text

Definition at line 87 of file qquickstyledtext.cpp.

◆ updateImagePositions

bool QQuickStyledTextPrivate::updateImagePositions = false

Definition at line 97 of file qquickstyledtext.cpp.

Referenced by parseImageAttributes().


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