QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
A class to store attributes needed for label rendering. More...
#include <qgslabelattributes.h>
Public Types | |
enum | Units { MapUnits = 0, PointUnits } |
Public Member Functions | |
QgsLabelAttributes (bool def=true) | |
Constructor. More... | |
int | alignment () const |
bool | alignmentIsSet () const |
double | angle () const |
bool | angleIsAuto () const |
bool | angleIsSet () const |
bool | bold () const |
bool | boldIsSet () const |
QColor | borderColor () const |
bool | borderColorIsSet () const |
Qt::PenStyle | borderStyle () const |
bool | borderStyleIsSet () const |
int | borderWidth () const |
bool | borderWidthIsSet () const |
QColor | bufferColor () const |
bool | bufferColorIsSet () const |
bool | bufferEnabled () const |
double | bufferSize () const |
bool | bufferSizeIsSet () const |
int | bufferSizeType () const |
Qt::BrushStyle | bufferStyle () const |
bool | bufferStyleIsSet () const |
const QColor & | color () const |
bool | colorIsSet () const |
const QString | family () const |
bool | familyIsSet () const |
bool | italic () const |
bool | italicIsSet () const |
bool | multilineEnabled () const |
bool | offsetIsSet () const |
int | offsetType () const |
bool | selectedOnly () const |
void | setAlignment (int alignment) |
void | setAngle (double angle) |
void | setAutoAngle (bool state) |
void | setBold (bool enable) |
void | setBorderColor (const QColor &color) |
void | setBorderStyle (Qt::PenStyle style) |
void | setBorderWidth (int width) |
void | setBufferColor (const QColor &color) |
void | setBufferEnabled (bool useBufferFlag) |
void | setBufferSize (double size, int type) |
void | setBufferStyle (Qt::BrushStyle style) |
void | setColor (const QColor &color) |
void | setFamily (const QString &family) |
void | setItalic (bool enable) |
void | setMultilineEnabled (bool useMultiline) |
void | setOffset (double x, double y, int type) |
void | setSelectedOnly (bool selectedonly) |
void | setSize (double size, int type) |
void | setStrikeOut (bool enable) |
void | setText (const QString &text) |
void | setUnderline (bool enable) |
double | size () const |
bool | sizeIsSet () const |
int | sizeType () const |
bool | strikeOut () const |
bool | strikeOutIsSet () const |
const QString | text () const |
bool | textIsSet () const |
bool | underline () const |
bool | underlineIsSet () const |
double | xOffset () const |
double | yOffset () const |
Static Public Member Functions | |
static int | alignmentCode (const QString &name) |
static QString | alignmentName (int alignment) |
static int | unitsCode (const QString &name) |
static QString | unitsName (int units) |
A class to store attributes needed for label rendering.
Label attributes: border (color, width, style) / / text bounding box / / +--------—/–+ buffer (color, pattern) | / | / | +-—+ |/ –+ | |Text| / |— text size | +-—+ /| –+ | | +-----------—+ | | | | >|-—|<— buffer width | >|<— border width
Text:
Position:
Buffer:
Border:
Each attribute is either set or unset.
Definition at line 76 of file qgslabelattributes.h.
Enumerator | |
---|---|
MapUnits | |
PointUnits |
Definition at line 85 of file qgslabelattributes.h.
QgsLabelAttributes::QgsLabelAttributes | ( | bool | def = true | ) |
Constructor.
def | if true, defaults are set, if false all all attributes are unset |
Definition at line 27 of file qgslabelattributes.cpp.
int QgsLabelAttributes::alignment | ( | ) | const |
Definition at line 175 of file qgslabelattributes.cpp.
|
static |
Definition at line 477 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::alignmentIsSet | ( | ) | const |
Definition at line 170 of file qgslabelattributes.cpp.
|
static |
Definition at line 461 of file qgslabelattributes.cpp.
double QgsLabelAttributes::angle | ( | ) | const |
Definition at line 148 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::angleIsAuto | ( | ) | const |
Definition at line 153 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::angleIsSet | ( | ) | const |
Definition at line 143 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bold | ( | ) | const |
Definition at line 209 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::boldIsSet | ( | ) | const |
Definition at line 204 of file qgslabelattributes.cpp.
QColor QgsLabelAttributes::borderColor | ( | ) | const |
Definition at line 381 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::borderColorIsSet | ( | ) | const |
Definition at line 376 of file qgslabelattributes.cpp.
Qt::PenStyle QgsLabelAttributes::borderStyle | ( | ) | const |
Definition at line 414 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::borderStyleIsSet | ( | ) | const |
Definition at line 409 of file qgslabelattributes.cpp.
int QgsLabelAttributes::borderWidth | ( | ) | const |
Definition at line 397 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::borderWidthIsSet | ( | ) | const |
Definition at line 392 of file qgslabelattributes.cpp.
QColor QgsLabelAttributes::bufferColor | ( | ) | const |
Definition at line 347 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferColorIsSet | ( | ) | const |
Definition at line 342 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferEnabled | ( | ) | const |
Definition at line 305 of file qgslabelattributes.cpp.
double QgsLabelAttributes::bufferSize | ( | ) | const |
Definition at line 330 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferSizeIsSet | ( | ) | const |
Definition at line 320 of file qgslabelattributes.cpp.
int QgsLabelAttributes::bufferSizeType | ( | ) | const |
Definition at line 325 of file qgslabelattributes.cpp.
Qt::BrushStyle QgsLabelAttributes::bufferStyle | ( | ) | const |
Definition at line 364 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferStyleIsSet | ( | ) | const |
Definition at line 359 of file qgslabelattributes.cpp.
const QColor & QgsLabelAttributes::color | ( | ) | const |
Definition at line 299 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::colorIsSet | ( | ) | const |
Definition at line 294 of file qgslabelattributes.cpp.
const QString QgsLabelAttributes::family | ( | ) | const |
Definition at line 192 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::familyIsSet | ( | ) | const |
Definition at line 187 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::italic | ( | ) | const |
Definition at line 226 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::italicIsSet | ( | ) | const |
Definition at line 221 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::multilineEnabled | ( | ) | const |
Definition at line 420 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::offsetIsSet | ( | ) | const |
Definition at line 116 of file qgslabelattributes.cpp.
int QgsLabelAttributes::offsetType | ( | ) | const |
Definition at line 121 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::selectedOnly | ( | ) | const |
Definition at line 430 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setAlignment | ( | int | alignment | ) |
Definition at line 164 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setAngle | ( | double | angle | ) |
Definition at line 137 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setAutoAngle | ( | bool | state | ) |
Definition at line 158 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBold | ( | bool | enable | ) |
Definition at line 198 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBorderColor | ( | const QColor & | color | ) |
Definition at line 370 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBorderStyle | ( | Qt::PenStyle | style | ) |
Definition at line 403 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBorderWidth | ( | int | width | ) |
Definition at line 386 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferColor | ( | const QColor & | color | ) |
Definition at line 336 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferEnabled | ( | bool | useBufferFlag | ) |
Definition at line 309 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferSize | ( | double | size, |
int | type | ||
) |
Definition at line 313 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferStyle | ( | Qt::BrushStyle | style | ) |
Definition at line 353 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setColor | ( | const QColor & | color | ) |
Definition at line 288 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setFamily | ( | const QString & | family | ) |
Definition at line 181 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setItalic | ( | bool | enable | ) |
Definition at line 215 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setMultilineEnabled | ( | bool | useMultiline | ) |
Definition at line 424 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setOffset | ( | double | x, |
double | y, | ||
int | type | ||
) |
Definition at line 108 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setSelectedOnly | ( | bool | selectedonly | ) |
Definition at line 434 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setSize | ( | double | size, |
int | type | ||
) |
Definition at line 265 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setStrikeOut | ( | bool | enable | ) |
Definition at line 248 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setText | ( | const QString & | text | ) |
Definition at line 90 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setUnderline | ( | bool | enable | ) |
Definition at line 232 of file qgslabelattributes.cpp.
double QgsLabelAttributes::size | ( | ) | const |
Definition at line 282 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::sizeIsSet | ( | ) | const |
Definition at line 272 of file qgslabelattributes.cpp.
int QgsLabelAttributes::sizeType | ( | ) | const |
Definition at line 277 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::strikeOut | ( | ) | const |
Definition at line 259 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::strikeOutIsSet | ( | ) | const |
Definition at line 254 of file qgslabelattributes.cpp.
const QString QgsLabelAttributes::text | ( | ) | const |
Definition at line 101 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::textIsSet | ( | ) | const |
Definition at line 96 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::underline | ( | ) | const |
Definition at line 243 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::underlineIsSet | ( | ) | const |
Definition at line 238 of file qgslabelattributes.cpp.
|
static |
Definition at line 450 of file qgslabelattributes.cpp.
|
static |
Definition at line 440 of file qgslabelattributes.cpp.
double QgsLabelAttributes::xOffset | ( | ) | const |
Definition at line 126 of file qgslabelattributes.cpp.
double QgsLabelAttributes::yOffset | ( | ) | const |
Definition at line 131 of file qgslabelattributes.cpp.
|
protected |
Alignment.
Definition at line 222 of file qgslabelattributes.h.
|
protected |
Definition at line 223 of file qgslabelattributes.h.
|
protected |
Angle (degrees)
Definition at line 217 of file qgslabelattributes.h.
|
protected |
Definition at line 219 of file qgslabelattributes.h.
|
protected |
Definition at line 218 of file qgslabelattributes.h.
|
protected |
Definition at line 196 of file qgslabelattributes.h.
|
protected |
Definition at line 239 of file qgslabelattributes.h.
|
protected |
Border pen (color, width, style)
Definition at line 238 of file qgslabelattributes.h.
|
protected |
Definition at line 241 of file qgslabelattributes.h.
|
protected |
Definition at line 240 of file qgslabelattributes.h.
|
protected |
Buffer brush (color, style)
Definition at line 233 of file qgslabelattributes.h.
|
protected |
Definition at line 234 of file qgslabelattributes.h.
|
protected |
Buffer enablement.
Definition at line 226 of file qgslabelattributes.h.
|
protected |
Definition at line 229 of file qgslabelattributes.h.
|
protected |
Definition at line 230 of file qgslabelattributes.h.
|
protected |
Buffer size, size type.
Definition at line 228 of file qgslabelattributes.h.
|
protected |
Definition at line 235 of file qgslabelattributes.h.
|
protected |
Color.
Definition at line 207 of file qgslabelattributes.h.
|
protected |
Definition at line 208 of file qgslabelattributes.h.
|
protected |
Definition at line 195 of file qgslabelattributes.h.
|
protected |
Font (family, weight, italic, underline, strikeout)
Definition at line 194 of file qgslabelattributes.h.
|
protected |
Definition at line 197 of file qgslabelattributes.h.
|
protected |
Multiline enablement.
Definition at line 244 of file qgslabelattributes.h.
|
protected |
Definition at line 214 of file qgslabelattributes.h.
|
protected |
Offset.
Definition at line 211 of file qgslabelattributes.h.
|
protected |
Label only selected.
Definition at line 247 of file qgslabelattributes.h.
|
protected |
Definition at line 203 of file qgslabelattributes.h.
|
protected |
Definition at line 204 of file qgslabelattributes.h.
|
protected |
Font size, size type.
Definition at line 202 of file qgslabelattributes.h.
|
protected |
Definition at line 199 of file qgslabelattributes.h.
|
protected |
Definition at line 190 of file qgslabelattributes.h.
|
protected |
Definition at line 191 of file qgslabelattributes.h.
|
protected |
Definition at line 198 of file qgslabelattributes.h.
|
protected |
Definition at line 212 of file qgslabelattributes.h.
|
protected |
Definition at line 213 of file qgslabelattributes.h.