QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgstextcharacterformat.h>
Public Types | |
enum | BooleanValue { BooleanValue::NotSet, BooleanValue::SetTrue, BooleanValue::SetFalse } |
Status values for boolean format properties. More... | |
Public Member Functions | |
QgsTextCharacterFormat ()=default | |
Constructor for QgsTextCharacterFormat. More... | |
QgsTextCharacterFormat (const QTextCharFormat &format) | |
Constructor for QgsTextCharacterFormat, based on the specified QTextCharFormat format. More... | |
BooleanValue | overline () const |
Returns whether the format has overline enabled. More... | |
void | setOverline (BooleanValue enabled) |
Sets whether the format has overline enabled. More... | |
void | setStrikeOut (BooleanValue enabled) |
Sets whether the format has strikethrough enabled. More... | |
void | setTextColor (const QColor &textColor) |
Sets the character's text color. More... | |
void | setUnderline (BooleanValue enabled) |
Sets whether the format has underline enabled. More... | |
BooleanValue | strikeOut () const |
Returns whether the format has strikethrough enabled. More... | |
QColor | textColor () const |
Returns the character's text color, or an invalid color if no color override is set and the default format color should be used. More... | |
BooleanValue | underline () const |
Returns whether the format has underline enabled. More... | |
void | updateFontForFormat (QFont &font) const |
Updates the specified font in place, applying character formatting options which are applicable on a font level. More... | |
Stores information relating to individual character formatting.
These options encapsulate formatting options which override the default settings from a QgsTextFormat for individual characters (or sets of characters).
Definition at line 39 of file qgstextcharacterformat.h.
|
strong |
Status values for boolean format properties.
Enumerator | |
---|---|
NotSet | Property is not set. |
SetTrue | Property is set and |
SetFalse | Property is set and |
Definition at line 54 of file qgstextcharacterformat.h.
|
default |
Constructor for QgsTextCharacterFormat.
QgsTextCharacterFormat::QgsTextCharacterFormat | ( | const QTextCharFormat & | format | ) |
Constructor for QgsTextCharacterFormat, based on the specified QTextCharFormat format.
Definition at line 20 of file qgstextcharacterformat.cpp.
QgsTextCharacterFormat::BooleanValue QgsTextCharacterFormat::overline | ( | ) | const |
Returns whether the format has overline enabled.
Definition at line 65 of file qgstextcharacterformat.cpp.
void QgsTextCharacterFormat::setOverline | ( | QgsTextCharacterFormat::BooleanValue | enabled | ) |
Sets whether the format has overline enabled.
Definition at line 70 of file qgstextcharacterformat.cpp.
void QgsTextCharacterFormat::setStrikeOut | ( | BooleanValue | enabled | ) |
Sets whether the format has strikethrough enabled.
Definition at line 50 of file qgstextcharacterformat.cpp.
void QgsTextCharacterFormat::setTextColor | ( | const QColor & | textColor | ) |
Sets the character's text color.
Set color to an invalid color if no color override is desired and the default format color should be used.
Definition at line 40 of file qgstextcharacterformat.cpp.
void QgsTextCharacterFormat::setUnderline | ( | BooleanValue | enabled | ) |
Sets whether the format has underline enabled.
Definition at line 60 of file qgstextcharacterformat.cpp.
QgsTextCharacterFormat::BooleanValue QgsTextCharacterFormat::strikeOut | ( | ) | const |
Returns whether the format has strikethrough enabled.
Definition at line 45 of file qgstextcharacterformat.cpp.
QColor QgsTextCharacterFormat::textColor | ( | ) | const |
Returns the character's text color, or an invalid color if no color override is set and the default format color should be used.
Definition at line 35 of file qgstextcharacterformat.cpp.
QgsTextCharacterFormat::BooleanValue QgsTextCharacterFormat::underline | ( | ) | const |
Returns whether the format has underline enabled.
Definition at line 55 of file qgstextcharacterformat.cpp.
void QgsTextCharacterFormat::updateFontForFormat | ( | QFont & | font | ) | const |
Updates the specified font in place, applying character formatting options which are applicable on a font level.
Definition at line 75 of file qgstextcharacterformat.cpp.