Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | 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]
Collaboration diagram for QgsComposerLegendItem:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 QgsComposerLegendItem ()
 
 QgsComposerLegendItem (const QString &text)
 
 QgsComposerLegendItem (const QIcon &icon, const QString &text)
 
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
 

Protected Member Functions

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

Detailed Description

Abstract base class for the legend item types.

Definition at line 26 of file qgscomposerlegenditem.h.

Member Enumeration Documentation

Enumerator
GroupItem 
LayerItem 
SymbologyItem 
SymbologyV2Item 
RasterSymbolItem 

Definition at line 35 of file qgscomposerlegenditem.h.

Constructor & Destructor Documentation

QgsComposerLegendItem::QgsComposerLegendItem ( )

Definition at line 29 of file qgscomposerlegenditem.cpp.

QgsComposerLegendItem::QgsComposerLegendItem ( const QString &  text)

Definition at line 33 of file qgscomposerlegenditem.cpp.

QgsComposerLegendItem::QgsComposerLegendItem ( const QIcon &  icon,
const QString &  text 
)

Definition at line 37 of file qgscomposerlegenditem.cpp.

QgsComposerLegendItem::~QgsComposerLegendItem ( )
virtual

Definition at line 41 of file qgscomposerlegenditem.cpp.

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, QgsComposerSymbolV2Item, and QgsComposerSymbolItem.

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

virtual void QgsComposerLegendItem::writeXML ( QDomElement &  elem,
QDomDocument &  doc 
) const
pure virtual
void QgsComposerLegendItem::writeXMLChildren ( QDomElement &  elem,
QDomDocument &  doc 
) const
protected

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