QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsComposerLegendStyle Class Reference

Composer legend components style. More...

#include <qgscomposerlegendstyle.h>

Public Types

enum  Side { Top = 0, Bottom = 1, Left = 2, Right = 3 }
 
enum  Style {
  Undefined, Hidden, Title, Group,
  Subgroup, Symbol, SymbolLabel
}
 

Public Member Functions

 QgsComposerLegendStyle ()
 
QFont font () const
 
double margin (Side side)
 
void readXML (const QDomElement &elem, const QDomDocument &doc)
 
QFontrfont ()
 
void setFont (const QFont &font)
 
void setMargin (Side side, double margin)
 
void setMargin (double margin)
 
void writeXML (const QString &name, QDomElement &elem, QDomDocument &doc) const
 

Static Public Member Functions

static Style styleFromName (const QString &styleName)
 Get style from name, used in project file. More...
 
static QString styleLabel (Style s)
 Get style label, translated, used in UI. More...
 
static QString styleName (Style s)
 Get name for style, used in project file. More...
 

Detailed Description

Composer legend components style.

Definition at line 30 of file qgscomposerlegendstyle.h.

Member Enumeration Documentation

◆ Side

Enumerator
Top 
Bottom 
Left 
Right 

Definition at line 43 of file qgscomposerlegendstyle.h.

◆ Style

Enumerator
Undefined 
Hidden 
Title 
Group 
Subgroup 
Symbol 
SymbolLabel 

Definition at line 33 of file qgscomposerlegendstyle.h.

Constructor & Destructor Documentation

◆ QgsComposerLegendStyle()

QgsComposerLegendStyle::QgsComposerLegendStyle ( )

Definition at line 29 of file qgscomposerlegendstyle.cpp.

Member Function Documentation

◆ font()

QFont QgsComposerLegendStyle::font ( ) const
inline

Definition at line 52 of file qgscomposerlegendstyle.h.

◆ margin()

double QgsComposerLegendStyle::margin ( Side  side)
inline

Definition at line 56 of file qgscomposerlegendstyle.h.

◆ readXML()

void QgsComposerLegendStyle::readXML ( const QDomElement elem,
const QDomDocument doc 
)

Definition at line 66 of file qgscomposerlegendstyle.cpp.

◆ rfont()

QFont& QgsComposerLegendStyle::rfont ( )
inline

Definition at line 53 of file qgscomposerlegendstyle.h.

◆ setFont()

void QgsComposerLegendStyle::setFont ( const QFont font)
inline

Definition at line 54 of file qgscomposerlegendstyle.h.

◆ setMargin() [1/2]

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

Definition at line 57 of file qgscomposerlegendstyle.h.

◆ setMargin() [2/2]

void QgsComposerLegendStyle::setMargin ( double  margin)

Definition at line 40 of file qgscomposerlegendstyle.cpp.

◆ styleFromName()

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

Get style from name, used in project file.

Definition at line 104 of file qgscomposerlegendstyle.cpp.

◆ styleLabel()

QString QgsComposerLegendStyle::styleLabel ( Style  s)
static

Get style label, translated, used in UI.

Definition at line 115 of file qgscomposerlegendstyle.cpp.

◆ styleName()

QString QgsComposerLegendStyle::styleName ( Style  s)
static

Get name for style, used in project file.

Definition at line 82 of file qgscomposerlegendstyle.cpp.

◆ writeXML()

void QgsComposerLegendStyle::writeXML ( const QString name,
QDomElement elem,
QDomDocument doc 
) const

Definition at line 48 of file qgscomposerlegendstyle.cpp.


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