18 #ifndef QGSLEGENDSTYLE_H 19 #define QGSLEGENDSTYLE_H 24 #include <QDomElement> 25 #include <QDomDocument> 27 #include "qgis_core.h" 67 QFont
font()
const {
return mFont; }
73 void setFont(
const QFont &font ) { mFont = font; }
90 double margin(
Side side ) {
return mMarginMap.value( side ); }
99 void setMargin(
Side side,
double margin ) { mMarginMap[side] = margin; }
105 void setMargin(
double margin );
121 void setAlignment( Qt::Alignment alignment ) { mAlignment = alignment; }
127 void writeXml(
const QString &name, QDomElement &elem, QDomDocument &doc )
const;
133 void readXml(
const QDomElement &elem,
const QDomDocument &doc );
143 static QString styleName(
Style s );
149 static Style styleFromName(
const QString &styleName );
155 static QString styleLabel(
Style s );
159 QMap<Side, double> mMarginMap;
160 Qt::Alignment mAlignment = Qt::AlignLeft;
double margin(Side side)
Returns the margin (in mm) for the specified side of the component.
QFont font() const
Returns the font used for rendering this legend component.
void setAlignment(Qt::Alignment alignment)
Sets the alignment for the legend component.
Contains detailed styling information relating to how a layout legend should be rendered.
Should not happen, only if corrupted project file.
void setFont(const QFont &font)
Sets the font used for rendering this legend component.
Symbol icon (excluding label)
void setMargin(Side side, double margin)
Sets the margin (in mm) for the specified side of the component.
Qt::Alignment alignment() const
Returns the alignment for the legend component.
Style
Component of legends which can be styled.
Special style, item is hidden including margins around.
QFont & rfont()
Returns a modifiable reference to the component's font.
Symbol label (excluding icon)