QGIS API Documentation  2.3.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
QgsComposerLegendStyle Class Reference

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. More...
 
static Style styleFromName (QString styleName)
 Get style from name, used in project file. More...
 
static QString styleLabel (Style s)
 Get style label, translated, used in UI. More...
 

Private Attributes

QFont mFont
 
QMap< Side, double > mMarginMap
 

Detailed Description

Composer legend components style.

Definition at line 30 of file qgscomposerlegendstyle.h.

Member Enumeration Documentation

Enumerator
Top 
Bottom 
Left 
Right 

Definition at line 43 of file qgscomposerlegendstyle.h.

Enumerator
Undefined 
Hidden 
Title 
Group 
Subgroup 
Symbol 
SymbolLabel 

Definition at line 33 of file qgscomposerlegendstyle.h.

Constructor & Destructor Documentation

QgsComposerLegendStyle::QgsComposerLegendStyle ( )

Definition at line 28 of file qgscomposerlegendstyle.cpp.

References mFont.

QgsComposerLegendStyle::~QgsComposerLegendStyle ( )

Definition at line 39 of file qgscomposerlegendstyle.cpp.

Member Function Documentation

QFont QgsComposerLegendStyle::font ( ) const
inline

Definition at line 53 of file qgscomposerlegendstyle.h.

double QgsComposerLegendStyle::margin ( Side  side)
inline
void QgsComposerLegendStyle::readXML ( const QDomElement &  elem,
const QDomDocument &  doc 
)

Definition at line 69 of file qgscomposerlegendstyle.cpp.

References Bottom, Left, mFont, mMarginMap, Right, and Top.

Referenced by QgsComposerLegend::readXML().

QFont& QgsComposerLegendStyle::rfont ( )
inline
void QgsComposerLegendStyle::setFont ( const QFont &  font)
inline

Definition at line 55 of file qgscomposerlegendstyle.h.

Referenced by QgsComposerLegend::setStyleFont().

void QgsComposerLegendStyle::setMargin ( Side  side,
double  margin 
)
inline
void QgsComposerLegendStyle::setMargin ( double  margin)

Definition at line 43 of file qgscomposerlegendstyle.cpp.

References Bottom, Left, margin(), mMarginMap, Right, and Top.

QgsComposerLegendStyle::Style QgsComposerLegendStyle::styleFromName ( QString  styleName)
static

Get style from name, used in project file.

Definition at line 104 of file qgscomposerlegendstyle.cpp.

References Group, Hidden, Subgroup, Symbol, SymbolLabel, Title, and Undefined.

Referenced by QgsComposerLayerItem::readXML(), and QgsComposerGroupItem::readXML().

QString QgsComposerLegendStyle::styleLabel ( Style  s)
static

Get style label, translated, used in UI.

Definition at line 115 of file qgscomposerlegendstyle.cpp.

References Group, Hidden, Subgroup, Symbol, SymbolLabel, Title, tr, and Undefined.

Referenced by QgsComposerStyleItem::QgsComposerStyleItem().

QString QgsComposerLegendStyle::styleName ( Style  s)
static

Get name for style, used in project file.

Definition at line 82 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 51 of file qgscomposerlegendstyle.cpp.

References Bottom, Left, mFont, mMarginMap, Right, and Top.

Referenced by QgsComposerLegend::writeXML().

Member Data Documentation

QFont QgsComposerLegendStyle::mFont
private

Definition at line 77 of file qgscomposerlegendstyle.h.

Referenced by QgsComposerLegendStyle(), readXML(), and writeXML().

QMap<Side, double> QgsComposerLegendStyle::mMarginMap
private

Definition at line 79 of file qgscomposerlegendstyle.h.

Referenced by readXML(), setMargin(), and writeXML().


The documentation for this class was generated from the following files: