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 )
455 if ( name.
compare(
"mu" ) == 0 )
467 if ( !alignment )
return QString(
"center" );
468 if ( alignment == ( Qt::AlignRight | Qt::AlignBottom ) )
return QString(
"aboveleft" );
469 if ( alignment == ( Qt::AlignRight | Qt::AlignTop ) )
return QString(
"belowleft" );
470 if ( alignment == ( Qt::AlignLeft | Qt::AlignBottom ) )
return QString(
"aboveright" );
471 if ( alignment == ( Qt::AlignLeft | Qt::AlignTop ) )
return QString(
"belowright" );
472 if ( alignment == ( Qt::AlignRight | Qt::AlignVCenter ) )
return QString(
"left" );
473 if ( alignment == ( Qt::AlignLeft | Qt::AlignVCenter ) )
return QString(
"right" );
474 if ( alignment == ( Qt::AlignBottom | Qt::AlignHCenter ) )
return QString(
"above" );
475 if ( alignment == ( Qt::AlignTop | Qt::AlignHCenter ) )
return QString(
"below" );
476 if ( alignment == ( Qt::AlignCenter ) )
return QString(
"center" );
483 if ( lname.
compare(
"aboveleft" ) == 0 )
return Qt::AlignRight | Qt::AlignBottom;
484 if ( lname.
compare(
"belowleft" ) == 0 )
return Qt::AlignRight | Qt::AlignTop;
485 if ( lname.
compare(
"aboveright" ) == 0 )
return Qt::AlignLeft | Qt::AlignBottom;
486 if ( lname.
compare(
"belowright" ) == 0 )
return Qt::AlignLeft | Qt::AlignTop;
487 if ( lname.
compare(
"left" ) == 0 )
return Qt::AlignRight | Qt::AlignVCenter;
488 if ( lname.
compare(
"right" ) == 0 )
return Qt::AlignLeft | Qt::AlignVCenter;
489 if ( lname.
compare(
"above" ) == 0 )
return Qt::AlignBottom | Qt::AlignHCenter;
490 if ( lname.
compare(
"below" ) == 0 )
return Qt::AlignTop | Qt::AlignHCenter;
491 if ( lname.
compare(
"center" ) == 0 )
return Qt::AlignCenter;
494 return Qt::AlignCenter;
void setBufferColor(const QColor &color)
double bufferSize() const
bool borderColorIsSet() const
void setMultilineEnabled(bool useMultiline)
Qt::PenStyle style() const
void setStyle(Qt::PenStyle style)
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)
void setFamily(const QString &family)
bool alignmentIsSet() const
Qt::BrushStyle style() const
static QString alignmentName(int alignment)
bool selectedOnly() const
void setUnderline(bool enable)
bool bufferEnabled() const
int bufferSizeType() 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)
const QColor & color() const
void setAutoAngle(bool state)
void setBold(bool enable)
static QString unitsName(int units)
QColor bufferColor() const
int mSizeType
Font size, size type.
void setBufferStyle(Qt::BrushStyle style)
static int alignmentCode(const QString &name)
const QColor & color() const
void setBufferSize(double size, int type)
double mAngle
Angle (degrees)
bool borderWidthIsSet() const
void setBorderColor(const QColor &color)
QgsLabelAttributes(bool def=true)
Constructor.
void setColor(const QColor &color)
void setText(const QString &text)
bool multilineEnabled() const
void setAngle(double angle)
bool mBufferEnabledFlag
Buffer enablement.
bool mMultilineEnabledFlag
Multiline enablement.
bool bufferSizeIsSet() const
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
const QString family() const
void setItalic(bool enable)
void setStrikeOut(bool enable)
Qt::BrushStyle bufferStyle() const
Qt::PenStyle borderStyle() const
QFont mFont
Font (family, weight, italic, underline, strikeout)
void setAlignment(int alignment)
void setOffset(double x, double y, int type)
bool strikeOutIsSet() const
void setFamily(const QString &family)
bool borderStyleIsSet() const
QPen mBorderPen
Border pen (color, width, style)
void setStrikeOut(bool enable)
bool underlineIsSet() const
int mBufferSizeType
Buffer size, size type.
bool bufferStyleIsSet() const
void setColor(const QColor &color)
QColor borderColor() const
int compare(const QString &other) const
void setColor(const QColor &color)
void setBufferEnabled(bool useBufferFlag)
bool bufferColorIsSet() const
void setBorderWidth(int width)
void setItalic(bool enable)
const QString text() const