18 #ifndef QGSLEGENDSTYLE_H 
   19 #define QGSLEGENDSTYLE_H 
   24 #include <QDomElement> 
   25 #include <QDomDocument> 
   27 #include "qgis_core.h" 
   68     QFont 
font()
 const { 
return mFont; }
 
   74     void setFont( 
const QFont &font ) { mFont = font; }
 
   91     double margin( 
Side side ) { 
return mMarginMap.value( side ); }
 
  106     void setMargin( 
double margin );
 
  122     void setAlignment( Qt::Alignment alignment ) { mAlignment = alignment; }
 
  160     static QString styleName( Style s );
 
  166     static Style styleFromName( 
const QString &styleName );
 
  172     static QString styleLabel( Style s );
 
  176     QMap<Side, double> mMarginMap;
 
  177     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.
double indent()
Returns the indent (in mm) of a group or subgroup.
void setIndent(double indent)
Sets the indent (in mm) of a group or subgroup.
QFont & rfont()
Returns a modifiable reference to the component's font.
Qt::Alignment alignment() const
Returns the alignment for the legend component.
void setAlignment(Qt::Alignment alignment)
Sets the alignment for the legend component.
QFont font() const
Returns the font used for rendering this legend component.
void setMargin(Side side, double margin)
Sets the margin (in mm) for the specified side of the 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)
void setFont(const QFont &font)
Sets the font used for rendering this legend component.
The class is used as a container of context for various read/write operations on other objects.