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 )
64 mFont = QApplication::font();
186 mFont.setFamily( family );
197 return mFont.family();
203 mFont.setBold( enable );
220 mFont.setItalic( enable );
231 return mFont.italic();
237 mFont.setUnderline( enable );
248 return mFont.underline();
253 mFont.setStrikeOut( enable );
264 return mFont.strikeOut();
447 return QString(
"mu" );
450 return QString(
"pt" );
455 if ( name.compare(
"mu" ) == 0 )
466 QgsDebugMsg( QString(
"alignment=%1" ).arg( alignment ) );
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" );
477 return QString(
"center" );
482 QString lname = name.toLower();
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;