17 #ifndef QGSCOMPOSERLABEL_H
18 #define QGSCOMPOSERLABEL_H
40 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
43 void adjustSizeToText();
45 QString
text() {
return mText; }
46 void setText(
const QString& text );
53 QString displayText()
const;
56 void setExpressionContext(
QgsFeature* feature,
QgsVectorLayer* layer, QMap<QString, QVariant> substitutions = ( QMap<QString, QVariant>() ) );
59 void setFont(
const QFont& f );
63 Qt::AlignmentFlag
vAlign()
const {
return mVAlignment; }
67 Qt::AlignmentFlag
hAlign()
const {
return mHAlignment; }
72 void setHAlign( Qt::AlignmentFlag a ) {mHAlignment = a;}
77 void setVAlign( Qt::AlignmentFlag a ) {mVAlignment = a;}
96 bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
102 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc );
108 void loadingHtmlFinished(
bool );
117 double htmlUnitsToMM();
121 void itemShiftAdjustSize(
double newWidth,
double newHeight,
double& xShift,
double& yShift )
const;
139 void replaceDateText( QString& text )
const;