17 #ifndef QGSCOMPOSERLABEL_H
18 #define QGSCOMPOSERLABEL_H
44 void adjustSizeToText();
47 void setText(
const QString& text );
50 void setHtmlState(
int state );
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; }
83 Q_DECL_DEPRECATED
double margin() {
return mMarginX; }
90 double marginX()
const {
return mMarginX; }
97 double marginY()
const {
return mMarginY; }
107 void setMargin(
const double m );
116 void setMarginX(
const double margin );
125 void setMarginY(
const double margin );
161 void refreshExpressionContext();
165 void loadingHtmlFinished(
bool );
173 double mHtmlUnitsToMM;
174 double htmlUnitsToMM();
178 void itemShiftAdjustSize(
double newWidth,
double newHeight,
double& xShift,
double& yShift )
const;
192 Qt::AlignmentFlag mHAlignment;
195 Qt::AlignmentFlag mVAlignment;
198 void replaceDateText(
QString& text )
const;
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
QColor fontColor() const
Get font color.
double marginY() const
Returns the vertical margin between the edge of the frame and the label contents. ...
A item that forms part of a map composition.
virtual void setFrameEnabled(const bool drawFrame)
Set whether this item has a frame drawn around it or not.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setFontColor(const QColor &c)
Sets text color.
Qt::AlignmentFlag vAlign() const
Accessor for the vertical alignment of the label.
double marginX() const
Returns the horizontal margin between the edge of the frame and the label contents.
virtual QRectF boundingRect() const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Graphics scene for map printing.
virtual QString displayName() const
Get item display name.
virtual void setFrameOutlineWidth(const double outlineWidth)
Sets frame outline width.
General purpose distance and area calculator.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Sets item state from DOM element.
virtual int type() const override
return correct graphics item type.
void setVAlign(Qt::AlignmentFlag a)
Mutator for the vertical alignment of the label.
Q_DECL_DEPRECATED double margin()
Returns the margin between the edge of the frame and the label contents.
A label that can be placed onto a map composition.
void setHAlign(Qt::AlignmentFlag a)
Mutator for the horizontal alignment of the label.
Represents a vector layer which manages a vector based data sets.
Qt::AlignmentFlag hAlign() const
Accessor for the horizontal alignment of the label.