QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsComposerLegendItem Class Referenceabstract

Abstract base class for the legend item types. More...

#include <qgscomposerlegenditem.h>

Inheritance diagram for QgsComposerLegendItem:
Inheritance graph
[legend]

Public Types

enum  ItemType {
  GroupItem = QStandardItem::UserType, LayerItem, SymbologyV2Item, RasterSymbolItem,
  StyleItem
}
 

Public Member Functions

 QgsComposerLegendItem (QgsComposerLegendStyle::Style s=QgsComposerLegendStyle::Undefined)
 
 QgsComposerLegendItem (const QString &text, QgsComposerLegendStyle::Style s=QgsComposerLegendStyle::Undefined)
 
 QgsComposerLegendItem (const QIcon &icon, const QString &text, QgsComposerLegendStyle::Style s=QgsComposerLegendStyle::Undefined)
 
virtual ~QgsComposerLegendItem ()
 
virtual void writeXML (QDomElement &elem, QDomDocument &doc) const =0
 
virtual void readXML (const QDomElement &itemElem, bool xServerAvailable=true)=0
 Read item content from xml. More...
 
virtual ItemType itemType () const =0
 
virtual QStandardItem * clone () const =0
 
QgsComposerLegendStyle::Style style () const
 
void setStyle (QgsComposerLegendStyle::Style style)
 
virtual QString userText () const
 
virtual void setUserText (const QString &text)
 

Protected Member Functions

void writeXMLChildren (QDomElement &elem, QDomDocument &doc) const
 

Protected Attributes

QgsComposerLegendStyle::Style mStyle
 
QString mUserText
 

Detailed Description

Abstract base class for the legend item types.

Member Enumeration Documentation

Enumerator
GroupItem 
LayerItem 
SymbologyV2Item 
RasterSymbolItem 
StyleItem 

Constructor & Destructor Documentation

QgsComposerLegendItem::QgsComposerLegendItem ( QgsComposerLegendStyle::Style  s = QgsComposerLegendStyle::Undefined)
QgsComposerLegendItem::QgsComposerLegendItem ( const QString &  text,
QgsComposerLegendStyle::Style  s = QgsComposerLegendStyle::Undefined 
)
QgsComposerLegendItem::QgsComposerLegendItem ( const QIcon &  icon,
const QString &  text,
QgsComposerLegendStyle::Style  s = QgsComposerLegendStyle::Undefined 
)
QgsComposerLegendItem::~QgsComposerLegendItem ( )
virtual

Member Function Documentation

virtual QStandardItem* QgsComposerLegendItem::clone ( ) const
pure virtual
virtual ItemType QgsComposerLegendItem::itemType ( ) const
pure virtual
virtual void QgsComposerLegendItem::readXML ( const QDomElement &  itemElem,
bool  xServerAvailable = true 
)
pure virtual

Read item content from xml.

Parameters
itemElemitem to read from
xServerAvailableRead item icons if true (QIcon needs x-server)

Implemented in QgsComposerGroupItem, QgsComposerLayerItem, QgsComposerRasterSymbolItem, and QgsComposerSymbolV2Item.

void QgsComposerLegendItem::setStyle ( QgsComposerLegendStyle::Style  style)
inline
virtual void QgsComposerLegendItem::setUserText ( const QString &  text)
inlinevirtual
QgsComposerLegendStyle::Style QgsComposerLegendItem::style ( ) const
inline
virtual QString QgsComposerLegendItem::userText ( ) const
inlinevirtual
virtual void QgsComposerLegendItem::writeXML ( QDomElement &  elem,
QDomDocument &  doc 
) const
pure virtual
void QgsComposerLegendItem::writeXMLChildren ( QDomElement &  elem,
QDomDocument &  doc 
) const
protected

Member Data Documentation

QgsComposerLegendStyle::Style QgsComposerLegendItem::mStyle
protected
QString QgsComposerLegendItem::mUserText
protected

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