QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgstextblock.h>
Public Member Functions | |
QgsTextBlock ()=default | |
Constructor for an empty text block. More... | |
QgsTextBlock (const QgsTextFragment &fragment) | |
Constructor for a QgsTextBlock consisting of a single text fragment. More... | |
void | append (const QgsTextFragment &fragment) |
Appends a fragment to the block. More... | |
void | append (QgsTextFragment &&fragment) |
Appends a fragment to the block. More... | |
const QgsTextFragment & | at (int index) const |
Returns the fragment at the specified index. More... | |
void | clear () |
Clears the block, removing all its contents. More... | |
bool | empty () const |
Returns true if the block is empty. More... | |
QgsTextFragment & | operator[] (int index) |
Returns the fragment at the specified index. More... | |
int | size () const |
Returns the number of fragments in the block. More... | |
Represents a block of text consisting of one or more QgsTextFragment objects.
Definition at line 34 of file qgstextblock.h.
|
default |
Constructor for an empty text block.
|
explicit |
Constructor for a QgsTextBlock consisting of a single text fragment.
Definition at line 19 of file qgstextblock.cpp.
void QgsTextBlock::append | ( | const QgsTextFragment & | fragment | ) |
Appends a fragment to the block.
Definition at line 24 of file qgstextblock.cpp.
void QgsTextBlock::append | ( | QgsTextFragment && | fragment | ) |
Appends a fragment to the block.
Definition at line 29 of file qgstextblock.cpp.
const QgsTextFragment & QgsTextBlock::at | ( | int | index | ) | const |
Returns the fragment at the specified index.
Definition at line 49 of file qgstextblock.cpp.
void QgsTextBlock::clear | ( | ) |
Clears the block, removing all its contents.
Definition at line 34 of file qgstextblock.cpp.
bool QgsTextBlock::empty | ( | ) | const |
Returns true
if the block is empty.
Definition at line 39 of file qgstextblock.cpp.
QgsTextFragment & QgsTextBlock::operator[] | ( | int | index | ) |
Returns the fragment at the specified index.
Definition at line 54 of file qgstextblock.cpp.
int QgsTextBlock::size | ( | ) | const |
Returns the number of fragments in the block.
Definition at line 44 of file qgstextblock.cpp.