QGIS API Documentation  master-6227475
QgsComposerLegendItem Class Reference

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

#include <qgscomposerlegenditem.h>

+ Inheritance diagram for QgsComposerLegendItem:

List of all members.

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 QStandardItem * clone () const =0
virtual ItemType itemType () const =0
virtual void readXML (const QDomElement &itemElem, bool xServerAvailable=true)=0
 Read item content from xml.
void setStyle (QgsComposerLegendStyle::Style style)
virtual void setUserText (const QString &text)
QgsComposerLegendStyle::Style style () const
virtual QString userText () const
virtual void writeXML (QDomElement &elem, QDomDocument &doc) const =0

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.

Definition at line 27 of file qgscomposerlegenditem.h.


Member Enumeration Documentation

Enumerator:
GroupItem 
LayerItem 
SymbologyV2Item 
RasterSymbolItem 
StyleItem 

Definition at line 35 of file qgscomposerlegenditem.h.


Constructor & Destructor Documentation

Definition at line 41 of file qgscomposerlegenditem.cpp.


Member Function Documentation

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.

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]

Member Data Documentation

QString QgsComposerLegendItem::mUserText [protected]

Definition at line 68 of file qgscomposerlegenditem.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines