int size() const
Returns the number of fragments in the block.
QString toPlainText() const
Converts the block to plain text.
QgsTextFragment & operator[](int index)
Returns the fragment at the specified index.
void clear()
Clears the block, removing all its contents.
QgsTextBlock()=default
Constructor for an empty text block.
void append(const QgsTextFragment &fragment)
Appends a fragment to the block.
const QgsTextFragment & at(int index) const
Returns the fragment at the specified index.
void applyCapitalization(QgsStringUtils::Capitalization capitalization)
Applies a capitalization style to the block's text.
bool empty() const
Returns true if the block is empty.
Stores a fragment of text along with formatting overrides to be used when rendering the fragment.