18#ifndef QGSLEGENDSTYLE_H
19#define QGSLEGENDSTYLE_H
25#include <QDomDocument>
77 Q_DECL_DEPRECATED
void setFont(
const QFont &font )
SIP_DEPRECATED;
107 double margin(
Side side ) {
return mMarginMap.value( side ); }
122 void setMargin(
double margin );
138 void setAlignment( Qt::Alignment alignment ) { mAlignment = alignment; }
146 double indent()
const {
return mIndent; }
176 static QString styleName( Style s );
182 static Style styleFromName(
const QString &styleName );
188 static QString styleLabel( Style s );
192 QMap<Side, double> mMarginMap;
193 Qt::Alignment mAlignment = Qt::AlignLeft;
Contains detailed styling information relating to how a layout legend should be rendered.
double margin(Side side)
Returns the margin (in mm) for the specified side of the component.
Q_DECL_DEPRECATED QFont font() const
Returns the font used for rendering this legend component.
void setIndent(double indent)
Sets the indent (in mm) of a group or subgroup.
Qt::Alignment alignment() const
Returns the alignment for the legend component.
void setAlignment(Qt::Alignment alignment)
Sets the alignment for the legend component.
QgsTextFormat & textFormat()
Returns the text format used for rendering this legend component.
void setMargin(Side side, double margin)
Sets the margin (in mm) for the specified side of the component.
QgsTextFormat textFormat() const
Returns the text format used for rendering this legend component.
Style
Component of legends which can be styled.
@ Group
Legend group title.
@ Symbol
Symbol icon (excluding label)
@ Undefined
Should not happen, only if corrupted project file.
@ Subgroup
Legend subgroup title.
@ Hidden
Special style, item is hidden including margins around.
@ SymbolLabel
Symbol label (excluding icon)
double indent() const
Returns the indent (in mm) of a group or subgroup.
void setTextFormat(const QgsTextFormat &format)
Sets the text format used for rendering this legend component.
The class is used as a container of context for various read/write operations on other objects.
Container for all settings relating to text rendering.