QGIS API Documentation  2.14.0-Essen
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsLabelAttributes Class Reference

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 QColorcolor () 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. More...
bool mAlignmentIsSet
double mAngle
 Angle (degrees) More...
bool mAngleIsAuto
bool mAngleIsSet
bool mBoldIsSet
bool mBorderColorIsSet
QPen mBorderPen
 Border pen (color, width, style) More...
bool mBorderStyleIsSet
bool mBorderWidthIsSet
QBrush mBufferBrush
 Buffer brush (color, style) More...
bool mBufferColorIsSet
bool mBufferEnabledFlag
 Buffer enablement. More...
double mBufferSize
bool mBufferSizeIsSet
int mBufferSizeType
 Buffer size, size type. More...
bool mBufferStyleIsSet
QColor mColor
 Color. More...
bool mColorIsSet
bool mFamilyIsSet
QFont mFont
 Font (family, weight, italic, underline, strikeout) More...
bool mItalicIsSet
bool mMultilineEnabledFlag
 Multiline enablement. More...
bool mOffsetIsSet
int mOffsetType
 Offset. More...
bool mSelectedOnly
 Label only selected. More...
double mSize
bool mSizeIsSet
int mSizeType
 Font size, size type. More...
bool mStrikeOutIsSet
QString mText
bool mTextIsSet
bool mUnderlineIsSet
double mXOffset
double mYOffset

Detailed Description

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





Each attribute is either set or unset.

Definition at line 76 of file qgslabelattributes.h.

Member Enumeration Documentation


Definition at line 85 of file qgslabelattributes.h.

Constructor & Destructor Documentation

QgsLabelAttributes::QgsLabelAttributes ( bool  def = true)


defif true, defaults are set, if false all all attributes are unset

Definition at line 27 of file qgslabelattributes.cpp.

Member Function Documentation

int QgsLabelAttributes::alignment ( void  ) const

Definition at line 175 of file qgslabelattributes.cpp.

int QgsLabelAttributes::alignmentCode ( const QString name)

Definition at line 477 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::alignmentIsSet ( void  ) const

Definition at line 170 of file qgslabelattributes.cpp.

QString QgsLabelAttributes::alignmentName ( int  alignment)

Definition at line 461 of file qgslabelattributes.cpp.

double QgsLabelAttributes::angle ( void  ) const

Definition at line 148 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::angleIsAuto ( ) const

Definition at line 153 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::angleIsSet ( void  ) const

Definition at line 143 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::bold ( void  ) const

Definition at line 209 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::boldIsSet ( void  ) const

Definition at line 204 of file qgslabelattributes.cpp.

QColor QgsLabelAttributes::borderColor ( void  ) const

Definition at line 381 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::borderColorIsSet ( void  ) const

Definition at line 376 of file qgslabelattributes.cpp.

Qt::PenStyle QgsLabelAttributes::borderStyle ( void  ) const

Definition at line 414 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::borderStyleIsSet ( void  ) const

Definition at line 409 of file qgslabelattributes.cpp.

int QgsLabelAttributes::borderWidth ( void  ) const

Definition at line 397 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::borderWidthIsSet ( void  ) const

Definition at line 392 of file qgslabelattributes.cpp.

QColor QgsLabelAttributes::bufferColor ( void  ) const

Definition at line 347 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::bufferColorIsSet ( void  ) const

Definition at line 342 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::bufferEnabled ( ) const

Definition at line 305 of file qgslabelattributes.cpp.

double QgsLabelAttributes::bufferSize ( void  ) const

Definition at line 330 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::bufferSizeIsSet ( void  ) const

Definition at line 320 of file qgslabelattributes.cpp.

int QgsLabelAttributes::bufferSizeType ( void  ) const

Definition at line 325 of file qgslabelattributes.cpp.

Qt::BrushStyle QgsLabelAttributes::bufferStyle ( void  ) const

Definition at line 364 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::bufferStyleIsSet ( void  ) const

Definition at line 359 of file qgslabelattributes.cpp.

const QColor & QgsLabelAttributes::color ( void  ) const

Definition at line 299 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::colorIsSet ( void  ) const

Definition at line 294 of file qgslabelattributes.cpp.

const QString QgsLabelAttributes::family ( void  ) const

Definition at line 192 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::familyIsSet ( void  ) const

Definition at line 187 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::italic ( void  ) const

Definition at line 226 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::italicIsSet ( void  ) const

Definition at line 221 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::multilineEnabled ( ) const

Definition at line 420 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::offsetIsSet ( void  ) const

Definition at line 116 of file qgslabelattributes.cpp.

int QgsLabelAttributes::offsetType ( void  ) 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 ( void  ) const

Definition at line 282 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::sizeIsSet ( void  ) const

Definition at line 272 of file qgslabelattributes.cpp.

int QgsLabelAttributes::sizeType ( void  ) const

Definition at line 277 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::strikeOut ( void  ) const

Definition at line 259 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::strikeOutIsSet ( void  ) const

Definition at line 254 of file qgslabelattributes.cpp.

const QString QgsLabelAttributes::text ( void  ) const

Definition at line 101 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::textIsSet ( void  ) const

Definition at line 96 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::underline ( void  ) const

Definition at line 243 of file qgslabelattributes.cpp.

bool QgsLabelAttributes::underlineIsSet ( void  ) const

Definition at line 238 of file qgslabelattributes.cpp.

int QgsLabelAttributes::unitsCode ( const QString name)

Definition at line 450 of file qgslabelattributes.cpp.

QString QgsLabelAttributes::unitsName ( int  units)

Definition at line 440 of file qgslabelattributes.cpp.

double QgsLabelAttributes::xOffset ( void  ) const

Definition at line 126 of file qgslabelattributes.cpp.

double QgsLabelAttributes::yOffset ( void  ) const

Definition at line 131 of file qgslabelattributes.cpp.

Member Data Documentation

int QgsLabelAttributes::mAlignment


Definition at line 222 of file qgslabelattributes.h.

bool QgsLabelAttributes::mAlignmentIsSet

Definition at line 223 of file qgslabelattributes.h.

double QgsLabelAttributes::mAngle

Angle (degrees)

Definition at line 217 of file qgslabelattributes.h.

bool QgsLabelAttributes::mAngleIsAuto

Definition at line 219 of file qgslabelattributes.h.

bool QgsLabelAttributes::mAngleIsSet

Definition at line 218 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBoldIsSet

Definition at line 196 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBorderColorIsSet

Definition at line 239 of file qgslabelattributes.h.

QPen QgsLabelAttributes::mBorderPen

Border pen (color, width, style)

Definition at line 238 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBorderStyleIsSet

Definition at line 241 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBorderWidthIsSet

Definition at line 240 of file qgslabelattributes.h.

QBrush QgsLabelAttributes::mBufferBrush

Buffer brush (color, style)

Definition at line 233 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBufferColorIsSet

Definition at line 234 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBufferEnabledFlag

Buffer enablement.

Definition at line 226 of file qgslabelattributes.h.

double QgsLabelAttributes::mBufferSize

Definition at line 229 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBufferSizeIsSet

Definition at line 230 of file qgslabelattributes.h.

int QgsLabelAttributes::mBufferSizeType

Buffer size, size type.

Definition at line 228 of file qgslabelattributes.h.

bool QgsLabelAttributes::mBufferStyleIsSet

Definition at line 235 of file qgslabelattributes.h.

QColor QgsLabelAttributes::mColor


Definition at line 207 of file qgslabelattributes.h.

bool QgsLabelAttributes::mColorIsSet

Definition at line 208 of file qgslabelattributes.h.

bool QgsLabelAttributes::mFamilyIsSet

Definition at line 195 of file qgslabelattributes.h.

QFont QgsLabelAttributes::mFont

Font (family, weight, italic, underline, strikeout)

Definition at line 194 of file qgslabelattributes.h.

bool QgsLabelAttributes::mItalicIsSet

Definition at line 197 of file qgslabelattributes.h.

bool QgsLabelAttributes::mMultilineEnabledFlag

Multiline enablement.

Definition at line 244 of file qgslabelattributes.h.

bool QgsLabelAttributes::mOffsetIsSet

Definition at line 214 of file qgslabelattributes.h.

int QgsLabelAttributes::mOffsetType


Definition at line 211 of file qgslabelattributes.h.

bool QgsLabelAttributes::mSelectedOnly

Label only selected.

Definition at line 247 of file qgslabelattributes.h.

double QgsLabelAttributes::mSize

Definition at line 203 of file qgslabelattributes.h.

bool QgsLabelAttributes::mSizeIsSet

Definition at line 204 of file qgslabelattributes.h.

int QgsLabelAttributes::mSizeType

Font size, size type.

Definition at line 202 of file qgslabelattributes.h.

bool QgsLabelAttributes::mStrikeOutIsSet

Definition at line 199 of file qgslabelattributes.h.

QString QgsLabelAttributes::mText

Definition at line 190 of file qgslabelattributes.h.

bool QgsLabelAttributes::mTextIsSet

Definition at line 191 of file qgslabelattributes.h.

bool QgsLabelAttributes::mUnderlineIsSet

Definition at line 198 of file qgslabelattributes.h.

double QgsLabelAttributes::mXOffset

Definition at line 212 of file qgslabelattributes.h.

double QgsLabelAttributes::mYOffset

Definition at line 213 of file qgslabelattributes.h.

The documentation for this class was generated from the following files: