QGIS API Documentation
2.0.1-Dufour
|
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 26 of file qgscomposerlegendstyle.cpp.
QgsComposerLegendStyle::~QgsComposerLegendStyle | ( | ) |
Definition at line 30 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 60 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 34 of file qgscomposerlegendstyle.cpp.
References Bottom, Left, margin(), mMarginMap, Right, and Top.
|
static |
Get style from name, used in project file.
Definition at line 95 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 106 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 73 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 42 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 readXML(), and writeXML().
|
private |
Definition at line 79 of file qgscomposerlegendstyle.h.
Referenced by readXML(), setMargin(), and writeXML().