QGIS API Documentation
2.2.0-Valmiera
|
Composer legend components style. More...
#include <qgscomposerlegendstyle.h>
Public Types | |
enum | Style { Undefined, Hidden, Title, Group, Subgroup, Symbol, SymbolLabel } |
enum | Side { Top = 0, Bottom = 1, Left = 2, Right = 3 } |
Public Member Functions | |
QgsComposerLegendStyle () | |
~QgsComposerLegendStyle () | |
QFont | font () const |
QFont & | rfont () |
void | setFont (const QFont &font) |
double | margin (Side side) |
void | setMargin (Side side, double margin) |
void | setMargin (double margin) |
void | writeXML (QString name, QDomElement &elem, QDomDocument &doc) const |
void | readXML (const QDomElement &elem, const QDomDocument &doc) |
Static Public Member Functions | |
static QString | styleName (Style s) |
Get name for style, used in project file. | |
static Style | styleFromName (QString styleName) |
Get style from name, used in project file. | |
static QString | styleLabel (Style s) |
Get style label, translated, used in UI. |
Private Attributes | |
QFont | mFont |
QMap< Side, double > | mMarginMap |
Composer legend components style.
Definition at line 30 of file qgscomposerlegendstyle.h.
Definition at line 43 of file qgscomposerlegendstyle.h.
Definition at line 33 of file qgscomposerlegendstyle.h.
QgsComposerLegendStyle::QgsComposerLegendStyle | ( | ) |
Definition at line 27 of file qgscomposerlegendstyle.cpp.
References mFont.
QgsComposerLegendStyle::~QgsComposerLegendStyle | ( | ) |
Definition at line 38 of file qgscomposerlegendstyle.cpp.
|
inline |
Definition at line 53 of file qgscomposerlegendstyle.h.
|
inline |
Definition at line 57 of file qgscomposerlegendstyle.h.
Referenced by QgsComposerLegend::createAtomList(), QgsComposerLegend::drawAtom(), QgsComposerLegend::paintAndDetermineSize(), QgsComposerLegend::setColumns(), setMargin(), and QgsComposerLegend::spaceAboveAtom().
void QgsComposerLegendStyle::readXML | ( | const QDomElement & | elem, |
const QDomDocument & | doc | ||
) |
Definition at line 68 of file qgscomposerlegendstyle.cpp.
References Bottom, Left, mFont, mMarginMap, Right, and Top.
Referenced by QgsComposerLegend::readXML().
|
inline |
Definition at line 54 of file qgscomposerlegendstyle.h.
Referenced by QgsComposerLegend::QgsComposerLegend(), and QgsComposerLegend::readXML().
|
inline |
Definition at line 55 of file qgscomposerlegendstyle.h.
Referenced by QgsComposerLegend::setStyleFont().
|
inline |
Definition at line 58 of file qgscomposerlegendstyle.h.
Referenced by QgsComposerLegend::readXML(), and QgsComposerLegend::setStyleMargin().
void QgsComposerLegendStyle::setMargin | ( | double | margin | ) |
Definition at line 42 of file qgscomposerlegendstyle.cpp.
References Bottom, Left, margin(), mMarginMap, Right, and Top.
|
static |
Get style from name, used in project file.
Definition at line 103 of file qgscomposerlegendstyle.cpp.
References Group, Hidden, Subgroup, Symbol, SymbolLabel, Title, and Undefined.
Referenced by QgsComposerLayerItem::readXML(), and QgsComposerGroupItem::readXML().
|
static |
Get style label, translated, used in UI.
Definition at line 114 of file qgscomposerlegendstyle.cpp.
References Group, Hidden, Subgroup, Symbol, SymbolLabel, Title, tr, and Undefined.
Referenced by QgsComposerStyleItem::QgsComposerStyleItem().
|
static |
Get name for style, used in project file.
Definition at line 81 of file qgscomposerlegendstyle.cpp.
References Group, Hidden, Subgroup, Symbol, SymbolLabel, Title, and Undefined.
Referenced by QgsComposerLayerItem::writeXML(), and QgsComposerGroupItem::writeXML().
void QgsComposerLegendStyle::writeXML | ( | QString | name, |
QDomElement & | elem, | ||
QDomDocument & | doc | ||
) | const |
Definition at line 50 of file qgscomposerlegendstyle.cpp.
References Bottom, Left, mFont, mMarginMap, Right, and Top.
Referenced by QgsComposerLegend::writeXML().
|
private |
Definition at line 77 of file qgscomposerlegendstyle.h.
Referenced by QgsComposerLegendStyle(), readXML(), and writeXML().
|
private |
Definition at line 79 of file qgscomposerlegendstyle.h.
Referenced by readXML(), setMargin(), and writeXML().