QGIS API Documentation
2.8.2-Wien
|
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. | |
~QgsLabelAttributes () | |
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) |
Protected Attributes | |
int | mAlignment |
Alignment. | |
bool | mAlignmentIsSet |
double | mAngle |
Angle (degrees) | |
bool | mAngleIsAuto |
bool | mAngleIsSet |
bool | mBoldIsSet |
bool | mBorderColorIsSet |
QPen | mBorderPen |
Border pen (color, width, style) | |
bool | mBorderStyleIsSet |
bool | mBorderWidthIsSet |
QBrush | mBufferBrush |
Buffer brush (color, style) | |
bool | mBufferColorIsSet |
bool | mBufferEnabledFlag |
Buffer enablement. | |
double | mBufferSize |
bool | mBufferSizeIsSet |
int | mBufferSizeType |
Buffer size, size type. | |
bool | mBufferStyleIsSet |
QColor | mColor |
Color. | |
bool | mColorIsSet |
bool | mFamilyIsSet |
QFont | mFont |
Font (family, weight, italic, underline, strikeout) | |
bool | mItalicIsSet |
bool | mMultilineEnabledFlag |
Multiline enablement. | |
bool | mOffsetIsSet |
int | mOffsetType |
Offset. | |
bool | mSelectedOnly |
Label only selected. | |
double | mSize |
bool | mSizeIsSet |
int | mSizeType |
Font size, size type. | |
bool | mStrikeOutIsSet |
QString | mText |
bool | mTextIsSet |
bool | mUnderlineIsSet |
double | mXOffset |
double | mYOffset |
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.
Definition at line 87 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.
QgsLabelAttributes::~QgsLabelAttributes | ( | ) |
Definition at line 89 of file qgslabelattributes.cpp.
int QgsLabelAttributes::alignment | ( | void | ) | const |
Definition at line 178 of file qgslabelattributes.cpp.
|
static |
Definition at line 480 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::alignmentIsSet | ( | void | ) | const |
Definition at line 173 of file qgslabelattributes.cpp.
|
static |
Definition at line 464 of file qgslabelattributes.cpp.
double QgsLabelAttributes::angle | ( | void | ) | const |
Definition at line 151 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::angleIsAuto | ( | ) | const |
Definition at line 156 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::angleIsSet | ( | void | ) | const |
Definition at line 146 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bold | ( | void | ) | const |
Definition at line 212 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::boldIsSet | ( | void | ) | const |
Definition at line 207 of file qgslabelattributes.cpp.
QColor QgsLabelAttributes::borderColor | ( | void | ) | const |
Definition at line 384 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::borderColorIsSet | ( | void | ) | const |
Definition at line 379 of file qgslabelattributes.cpp.
Qt::PenStyle QgsLabelAttributes::borderStyle | ( | void | ) | const |
Definition at line 417 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::borderStyleIsSet | ( | void | ) | const |
Definition at line 412 of file qgslabelattributes.cpp.
int QgsLabelAttributes::borderWidth | ( | void | ) | const |
Definition at line 400 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::borderWidthIsSet | ( | void | ) | const |
Definition at line 395 of file qgslabelattributes.cpp.
QColor QgsLabelAttributes::bufferColor | ( | void | ) | const |
Definition at line 350 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferColorIsSet | ( | void | ) | const |
Definition at line 345 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferEnabled | ( | ) | const |
Definition at line 308 of file qgslabelattributes.cpp.
double QgsLabelAttributes::bufferSize | ( | void | ) | const |
Definition at line 333 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferSizeIsSet | ( | void | ) | const |
Definition at line 323 of file qgslabelattributes.cpp.
int QgsLabelAttributes::bufferSizeType | ( | void | ) | const |
Definition at line 328 of file qgslabelattributes.cpp.
Qt::BrushStyle QgsLabelAttributes::bufferStyle | ( | void | ) | const |
Definition at line 367 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::bufferStyleIsSet | ( | void | ) | const |
Definition at line 362 of file qgslabelattributes.cpp.
const QColor & QgsLabelAttributes::color | ( | void | ) | const |
Definition at line 302 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::colorIsSet | ( | void | ) | const |
Definition at line 297 of file qgslabelattributes.cpp.
const QString QgsLabelAttributes::family | ( | void | ) | const |
Definition at line 195 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::familyIsSet | ( | void | ) | const |
Definition at line 190 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::italic | ( | void | ) | const |
Definition at line 229 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::italicIsSet | ( | void | ) | const |
Definition at line 224 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::multilineEnabled | ( | ) | const |
Definition at line 423 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::offsetIsSet | ( | void | ) | const |
Definition at line 119 of file qgslabelattributes.cpp.
int QgsLabelAttributes::offsetType | ( | void | ) | const |
Definition at line 124 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::selectedOnly | ( | ) | const |
Definition at line 433 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setAlignment | ( | int | alignment | ) |
Definition at line 167 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setAngle | ( | double | angle | ) |
Definition at line 140 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setAutoAngle | ( | bool | state | ) |
Definition at line 161 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBold | ( | bool | enable | ) |
Definition at line 201 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBorderColor | ( | const QColor & | color | ) |
Definition at line 373 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBorderStyle | ( | Qt::PenStyle | style | ) |
Definition at line 406 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBorderWidth | ( | int | width | ) |
Definition at line 389 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferColor | ( | const QColor & | color | ) |
Definition at line 339 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferEnabled | ( | bool | useBufferFlag | ) |
Definition at line 312 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferSize | ( | double | size, |
int | type | ||
) |
Definition at line 316 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setBufferStyle | ( | Qt::BrushStyle | style | ) |
Definition at line 356 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setColor | ( | const QColor & | color | ) |
Definition at line 291 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setFamily | ( | const QString & | family | ) |
Definition at line 184 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setItalic | ( | bool | enable | ) |
Definition at line 218 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setMultilineEnabled | ( | bool | useMultiline | ) |
Definition at line 427 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setOffset | ( | double | x, |
double | y, | ||
int | type | ||
) |
Definition at line 111 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setSelectedOnly | ( | bool | selectedonly | ) |
Definition at line 437 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setSize | ( | double | size, |
int | type | ||
) |
Definition at line 268 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setStrikeOut | ( | bool | enable | ) |
Definition at line 251 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setText | ( | const QString & | text | ) |
Definition at line 93 of file qgslabelattributes.cpp.
void QgsLabelAttributes::setUnderline | ( | bool | enable | ) |
Definition at line 235 of file qgslabelattributes.cpp.
double QgsLabelAttributes::size | ( | void | ) | const |
Definition at line 285 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::sizeIsSet | ( | void | ) | const |
Definition at line 275 of file qgslabelattributes.cpp.
int QgsLabelAttributes::sizeType | ( | void | ) | const |
Definition at line 280 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::strikeOut | ( | void | ) | const |
Definition at line 262 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::strikeOutIsSet | ( | void | ) | const |
Definition at line 257 of file qgslabelattributes.cpp.
const QString QgsLabelAttributes::text | ( | void | ) | const |
Definition at line 104 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::textIsSet | ( | void | ) | const |
Definition at line 99 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::underline | ( | void | ) | const |
Definition at line 246 of file qgslabelattributes.cpp.
bool QgsLabelAttributes::underlineIsSet | ( | void | ) | const |
Definition at line 241 of file qgslabelattributes.cpp.
|
static |
Definition at line 453 of file qgslabelattributes.cpp.
|
static |
Definition at line 443 of file qgslabelattributes.cpp.
double QgsLabelAttributes::xOffset | ( | void | ) | const |
Definition at line 129 of file qgslabelattributes.cpp.
double QgsLabelAttributes::yOffset | ( | void | ) | const |
Definition at line 134 of file qgslabelattributes.cpp.
|
protected |
Alignment.
Definition at line 224 of file qgslabelattributes.h.
|
protected |
Definition at line 225 of file qgslabelattributes.h.
|
protected |
Angle (degrees)
Definition at line 219 of file qgslabelattributes.h.
|
protected |
Definition at line 221 of file qgslabelattributes.h.
|
protected |
Definition at line 220 of file qgslabelattributes.h.
|
protected |
Definition at line 198 of file qgslabelattributes.h.
|
protected |
Definition at line 241 of file qgslabelattributes.h.
|
protected |
Border pen (color, width, style)
Definition at line 240 of file qgslabelattributes.h.
|
protected |
Definition at line 243 of file qgslabelattributes.h.
|
protected |
Definition at line 242 of file qgslabelattributes.h.
|
protected |
Buffer brush (color, style)
Definition at line 235 of file qgslabelattributes.h.
|
protected |
Definition at line 236 of file qgslabelattributes.h.
|
protected |
Buffer enablement.
Definition at line 228 of file qgslabelattributes.h.
|
protected |
Definition at line 231 of file qgslabelattributes.h.
|
protected |
Definition at line 232 of file qgslabelattributes.h.
|
protected |
Buffer size, size type.
Definition at line 230 of file qgslabelattributes.h.
|
protected |
Definition at line 237 of file qgslabelattributes.h.
|
protected |
Color.
Definition at line 209 of file qgslabelattributes.h.
|
protected |
Definition at line 210 of file qgslabelattributes.h.
|
protected |
Definition at line 197 of file qgslabelattributes.h.
|
protected |
Font (family, weight, italic, underline, strikeout)
Definition at line 196 of file qgslabelattributes.h.
|
protected |
Definition at line 199 of file qgslabelattributes.h.
|
protected |
Multiline enablement.
Definition at line 246 of file qgslabelattributes.h.
|
protected |
Definition at line 216 of file qgslabelattributes.h.
|
protected |
Offset.
Definition at line 213 of file qgslabelattributes.h.
|
protected |
Label only selected.
Definition at line 249 of file qgslabelattributes.h.
|
protected |
Definition at line 205 of file qgslabelattributes.h.
|
protected |
Definition at line 206 of file qgslabelattributes.h.
|
protected |
Font size, size type.
Definition at line 204 of file qgslabelattributes.h.
|
protected |
Definition at line 201 of file qgslabelattributes.h.
|
protected |
Definition at line 192 of file qgslabelattributes.h.
|
protected |
Definition at line 193 of file qgslabelattributes.h.
|
protected |
Definition at line 200 of file qgslabelattributes.h.
|
protected |
Definition at line 214 of file qgslabelattributes.h.
|
protected |
Definition at line 215 of file qgslabelattributes.h.