QGIS API Documentation
2.6.0-Brighton
|
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 () | |
void | setText (const QString &text) |
bool | textIsSet () const |
const QString | text () const |
void | setFamily (const QString &family) |
bool | familyIsSet () const |
const QString | family () const |
void | setBold (bool enable) |
bool | boldIsSet () const |
bool | bold () const |
void | setItalic (bool enable) |
bool | italicIsSet () const |
bool | italic () const |
void | setUnderline (bool enable) |
bool | underlineIsSet () const |
bool | underline () const |
void | setStrikeOut (bool enable) |
bool | strikeOutIsSet () const |
bool | strikeOut () const |
void | setSize (double size, int type) |
bool | sizeIsSet () const |
int | sizeType () const |
double | size () const |
void | setColor (const QColor &color) |
bool | colorIsSet () const |
const QColor & | color () const |
void | setOffset (double x, double y, int type) |
bool | offsetIsSet () const |
int | offsetType () const |
double | xOffset () const |
double | yOffset () const |
void | setAngle (double angle) |
bool | angleIsSet () const |
double | angle () const |
bool | angleIsAuto () const |
void | setAutoAngle (bool state) |
void | setAlignment (int alignment) |
bool | alignmentIsSet () const |
int | alignment () const |
bool | bufferEnabled () const |
void | setBufferEnabled (bool useBufferFlag) |
void | setBufferSize (double size, int type) |
bool | bufferSizeIsSet () const |
int | bufferSizeType () const |
double | bufferSize () const |
void | setBufferColor (const QColor &color) |
bool | bufferColorIsSet () const |
QColor | bufferColor () const |
void | setBufferStyle (Qt::BrushStyle style) |
bool | bufferStyleIsSet () const |
Qt::BrushStyle | bufferStyle () const |
void | setBorderColor (const QColor &color) |
bool | borderColorIsSet () const |
QColor | borderColor () const |
void | setBorderWidth (int width) |
bool | borderWidthIsSet () const |
int | borderWidth () const |
void | setBorderStyle (Qt::PenStyle style) |
bool | borderStyleIsSet () const |
Qt::PenStyle | borderStyle () const |
bool | multilineEnabled () const |
void | setMultilineEnabled (bool useMultiline) |
bool | selectedOnly () const |
void | setSelectedOnly (bool selectedonly) |
Static Public Member Functions | |
static QString | unitsName (int units) |
static int | unitsCode (const QString &name) |
static QString | alignmentName (int alignment) |
static int | alignmentCode (const QString &name) |
Protected Attributes | |
QString | mText |
bool | mTextIsSet |
QFont | mFont |
Font (family, weight, italic, underline, strikeout) | |
bool | mFamilyIsSet |
bool | mBoldIsSet |
bool | mItalicIsSet |
bool | mUnderlineIsSet |
bool | mStrikeOutIsSet |
int | mSizeType |
Font size, size type. | |
double | mSize |
bool | mSizeIsSet |
QColor | mColor |
Color. | |
bool | mColorIsSet |
int | mOffsetType |
Offset. | |
double | mXOffset |
double | mYOffset |
bool | mOffsetIsSet |
double | mAngle |
Angle (degrees) | |
bool | mAngleIsSet |
bool | mAngleIsAuto |
int | mAlignment |
Alignment. | |
bool | mAlignmentIsSet |
bool | mBufferEnabledFlag |
Buffer enablement. | |
int | mBufferSizeType |
Buffer size, size type. | |
double | mBufferSize |
bool | mBufferSizeIsSet |
QBrush | mBufferBrush |
Buffer brush (color, style) | |
bool | mBufferColorIsSet |
bool | mBufferStyleIsSet |
QPen | mBorderPen |
Border pen (color, width, style) | |
bool | mBorderColorIsSet |
bool | mBorderWidthIsSet |
bool | mBorderStyleIsSet |
bool | mMultilineEnabledFlag |
Multiline enablement. | |
bool | mSelectedOnly |
Label only selected. |
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.
QgsLabelAttributes::QgsLabelAttributes | ( | bool | def = true | ) |
Constructor.
def | if true, defaults are set, if false all all attributes are unset |
QgsLabelAttributes::~QgsLabelAttributes | ( | ) |
int QgsLabelAttributes::alignment | ( | void | ) | const |
|
static |
bool QgsLabelAttributes::alignmentIsSet | ( | void | ) | const |
|
static |
double QgsLabelAttributes::angle | ( | void | ) | const |
bool QgsLabelAttributes::angleIsAuto | ( | ) | const |
bool QgsLabelAttributes::angleIsSet | ( | void | ) | const |
bool QgsLabelAttributes::bold | ( | void | ) | const |
bool QgsLabelAttributes::boldIsSet | ( | void | ) | const |
QColor QgsLabelAttributes::borderColor | ( | void | ) | const |
bool QgsLabelAttributes::borderColorIsSet | ( | void | ) | const |
Qt::PenStyle QgsLabelAttributes::borderStyle | ( | void | ) | const |
bool QgsLabelAttributes::borderStyleIsSet | ( | void | ) | const |
int QgsLabelAttributes::borderWidth | ( | void | ) | const |
bool QgsLabelAttributes::borderWidthIsSet | ( | void | ) | const |
QColor QgsLabelAttributes::bufferColor | ( | void | ) | const |
bool QgsLabelAttributes::bufferColorIsSet | ( | void | ) | const |
bool QgsLabelAttributes::bufferEnabled | ( | ) | const |
double QgsLabelAttributes::bufferSize | ( | void | ) | const |
bool QgsLabelAttributes::bufferSizeIsSet | ( | void | ) | const |
int QgsLabelAttributes::bufferSizeType | ( | void | ) | const |
Qt::BrushStyle QgsLabelAttributes::bufferStyle | ( | void | ) | const |
bool QgsLabelAttributes::bufferStyleIsSet | ( | void | ) | const |
const QColor & QgsLabelAttributes::color | ( | void | ) | const |
bool QgsLabelAttributes::colorIsSet | ( | void | ) | const |
const QString QgsLabelAttributes::family | ( | void | ) | const |
bool QgsLabelAttributes::familyIsSet | ( | void | ) | const |
bool QgsLabelAttributes::italic | ( | void | ) | const |
bool QgsLabelAttributes::italicIsSet | ( | void | ) | const |
bool QgsLabelAttributes::multilineEnabled | ( | ) | const |
bool QgsLabelAttributes::offsetIsSet | ( | void | ) | const |
int QgsLabelAttributes::offsetType | ( | void | ) | const |
bool QgsLabelAttributes::selectedOnly | ( | ) | const |
void QgsLabelAttributes::setAlignment | ( | int | alignment | ) |
void QgsLabelAttributes::setAngle | ( | double | angle | ) |
void QgsLabelAttributes::setAutoAngle | ( | bool | state | ) |
void QgsLabelAttributes::setBold | ( | bool | enable | ) |
void QgsLabelAttributes::setBorderColor | ( | const QColor & | color | ) |
void QgsLabelAttributes::setBorderStyle | ( | Qt::PenStyle | style | ) |
void QgsLabelAttributes::setBorderWidth | ( | int | width | ) |
void QgsLabelAttributes::setBufferColor | ( | const QColor & | color | ) |
void QgsLabelAttributes::setBufferEnabled | ( | bool | useBufferFlag | ) |
void QgsLabelAttributes::setBufferSize | ( | double | size, |
int | type | ||
) |
void QgsLabelAttributes::setBufferStyle | ( | Qt::BrushStyle | style | ) |
void QgsLabelAttributes::setColor | ( | const QColor & | color | ) |
void QgsLabelAttributes::setFamily | ( | const QString & | family | ) |
void QgsLabelAttributes::setItalic | ( | bool | enable | ) |
void QgsLabelAttributes::setMultilineEnabled | ( | bool | useMultiline | ) |
void QgsLabelAttributes::setOffset | ( | double | x, |
double | y, | ||
int | type | ||
) |
void QgsLabelAttributes::setSelectedOnly | ( | bool | selectedonly | ) |
void QgsLabelAttributes::setSize | ( | double | size, |
int | type | ||
) |
void QgsLabelAttributes::setStrikeOut | ( | bool | enable | ) |
void QgsLabelAttributes::setText | ( | const QString & | text | ) |
void QgsLabelAttributes::setUnderline | ( | bool | enable | ) |
double QgsLabelAttributes::size | ( | void | ) | const |
bool QgsLabelAttributes::sizeIsSet | ( | void | ) | const |
int QgsLabelAttributes::sizeType | ( | void | ) | const |
bool QgsLabelAttributes::strikeOut | ( | void | ) | const |
bool QgsLabelAttributes::strikeOutIsSet | ( | void | ) | const |
const QString QgsLabelAttributes::text | ( | void | ) | const |
bool QgsLabelAttributes::textIsSet | ( | void | ) | const |
bool QgsLabelAttributes::underline | ( | void | ) | const |
bool QgsLabelAttributes::underlineIsSet | ( | void | ) | const |
|
static |
|
static |
double QgsLabelAttributes::xOffset | ( | void | ) | const |
double QgsLabelAttributes::yOffset | ( | void | ) | const |
|
protected |
Alignment.
|
protected |
|
protected |
Angle (degrees)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Border pen (color, width, style)
|
protected |
|
protected |
|
protected |
Buffer brush (color, style)
|
protected |
|
protected |
Buffer enablement.
|
protected |
|
protected |
|
protected |
Buffer size, size type.
|
protected |
|
protected |
Color.
|
protected |
|
protected |
|
protected |
Font (family, weight, italic, underline, strikeout)
|
protected |
|
protected |
Multiline enablement.
|
protected |
|
protected |
Offset.
|
protected |
Label only selected.
|
protected |
|
protected |
|
protected |
Font size, size type.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |