17 #ifndef QGSCOMPOSERLABEL_H
18 #define QGSCOMPOSERLABEL_H
41 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
44 void adjustSizeToText();
46 QString
text() {
return mText; }
47 void setText(
const QString& text );
50 void setHtmlState(
int state );
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; }
94 bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
100 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc );
106 void refreshExpressionContext();
110 void loadingHtmlFinished(
bool );
118 double mHtmlUnitsToMM;
119 double htmlUnitsToMM();
123 void itemShiftAdjustSize(
double newWidth,
double newHeight,
double& xShift,
double& yShift )
const;
135 Qt::AlignmentFlag mHAlignment;
138 Qt::AlignmentFlag mVAlignment;
141 void replaceDateText( QString& text )
const;
145 QMap<QString, QVariant> mSubstitutions;