17 #include <QApplication> 29 , mFamilyIsSet( false )
31 , mItalicIsSet( false )
32 , mUnderlineIsSet( false )
33 , mStrikeOutIsSet( false )
37 , mColorIsSet( false )
41 , mOffsetIsSet( false )
43 , mAngleIsSet( false )
44 , mAngleIsAuto( false )
46 , mAlignmentIsSet( false )
47 , mBufferEnabledFlag( false )
48 , mBufferSizeType( 0 )
50 , mBufferSizeIsSet( false )
51 , mBufferColorIsSet( false )
52 , mBufferStyleIsSet( false )
53 , mBorderColorIsSet( false )
54 , mBorderWidthIsSet( false )
55 , mBorderStyleIsSet( false )
56 , mMultilineEnabledFlag( false )
57 , mSelectedOnly( false )
452 if ( name.
compare(
"mu" ) == 0 )
464 if ( !alignment )
return QString(
"center" );
465 if ( alignment == ( Qt::AlignRight | Qt::AlignBottom ) )
return QString(
"aboveleft" );
466 if ( alignment == ( Qt::AlignRight | Qt::AlignTop ) )
return QString(
"belowleft" );
467 if ( alignment == ( Qt::AlignLeft | Qt::AlignBottom ) )
return QString(
"aboveright" );
468 if ( alignment == ( Qt::AlignLeft | Qt::AlignTop ) )
return QString(
"belowright" );
469 if ( alignment == ( Qt::AlignRight | Qt::AlignVCenter ) )
return QString(
"left" );
470 if ( alignment == ( Qt::AlignLeft | Qt::AlignVCenter ) )
return QString(
"right" );
471 if ( alignment == ( Qt::AlignBottom | Qt::AlignHCenter ) )
return QString(
"above" );
472 if ( alignment == ( Qt::AlignTop | Qt::AlignHCenter ) )
return QString(
"below" );
473 if ( alignment == ( Qt::AlignCenter ) )
return QString(
"center" );
480 if ( lname.
compare(
"aboveleft" ) == 0 )
return Qt::AlignRight | Qt::AlignBottom;
481 if ( lname.
compare(
"belowleft" ) == 0 )
return Qt::AlignRight | Qt::AlignTop;
482 if ( lname.
compare(
"aboveright" ) == 0 )
return Qt::AlignLeft | Qt::AlignBottom;
483 if ( lname.
compare(
"belowright" ) == 0 )
return Qt::AlignLeft | Qt::AlignTop;
484 if ( lname.
compare(
"left" ) == 0 )
return Qt::AlignRight | Qt::AlignVCenter;
485 if ( lname.
compare(
"right" ) == 0 )
return Qt::AlignLeft | Qt::AlignVCenter;
486 if ( lname.
compare(
"above" ) == 0 )
return Qt::AlignBottom | Qt::AlignHCenter;
487 if ( lname.
compare(
"below" ) == 0 )
return Qt::AlignTop | Qt::AlignHCenter;
488 if ( lname.
compare(
"center" ) == 0 )
return Qt::AlignCenter;
491 return Qt::AlignCenter;
void setBufferColor(const QColor &color)
void setMultilineEnabled(bool useMultiline)
Qt::PenStyle style() const
bool borderStyleIsSet() const
void setStyle(Qt::PenStyle style)
bool bufferStyleIsSet() const
void setBold(bool enable)
void setSize(double size, int type)
bool mSelectedOnly
Label only selected.
void setUnderline(bool enable)
void setSelectedOnly(bool selectedonly)
static int unitsCode(const QString &name)
bool strikeOutIsSet() const
void setFamily(const QString &family)
Qt::BrushStyle style() const
int bufferSizeType() const
const QColor & color() const
static QString alignmentName(int alignment)
void setUnderline(bool enable)
QColor bufferColor() const
bool alignmentIsSet() const
bool borderWidthIsSet() const
const QString text() const
QBrush mBufferBrush
Buffer brush (color, style)
void setStyle(Qt::BrushStyle style)
QString tr(const char *sourceText, const char *disambiguation, int n)
void setBorderStyle(Qt::PenStyle style)
QColor borderColor() const
Qt::BrushStyle bufferStyle() const
const QColor & color() const
void setAutoAngle(bool state)
void setBold(bool enable)
static QString unitsName(int units)
int mSizeType
Font size, size type.
const QString family() const
void setBufferStyle(Qt::BrushStyle style)
Qt::PenStyle borderStyle() const
bool bufferColorIsSet() const
static int alignmentCode(const QString &name)
void setBufferSize(double size, int type)
double mAngle
Angle (degrees)
void setBorderColor(const QColor &color)
QgsLabelAttributes(bool def=true)
Constructor.
void setColor(const QColor &color)
void setText(const QString &text)
void setAngle(double angle)
bool selectedOnly() const
bool mBufferEnabledFlag
Buffer enablement.
bool mMultilineEnabledFlag
Multiline enablement.
bool bufferSizeIsSet() const
void setItalic(bool enable)
void setStrikeOut(bool enable)
QFont mFont
Font (family, weight, italic, underline, strikeout)
bool bufferEnabled() const
void setAlignment(int alignment)
void setOffset(double x, double y, int type)
void setFamily(const QString &family)
QPen mBorderPen
Border pen (color, width, style)
void setStrikeOut(bool enable)
int mBufferSizeType
Buffer size, size type.
void setColor(const QColor &color)
int compare(const QString &other) const
void setColor(const QColor &color)
void setBufferEnabled(bool useBufferFlag)
bool underlineIsSet() const
void setBorderWidth(int width)
void setItalic(bool enable)
double bufferSize() const
bool multilineEnabled() const
bool borderColorIsSet() const