QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsComposerLayerItem Class Reference

#include <qgscomposerlegenditem.h>

Inheritance diagram for QgsComposerLayerItem:
Inheritance graph
Collaboration diagram for QgsComposerLayerItem:
Collaboration graph

Public Member Functions

 QgsComposerLayerItem ()
 QgsComposerLayerItem (const QString &text)
virtual ~QgsComposerLayerItem ()
virtual QStandardItem * clone () const
virtual void writeXML (QDomElement &elem, QDomDocument &doc) const
virtual void readXML (const QDomElement &itemElem, bool xServerAvailable=true)
 Read item content from xml.
ItemType itemType () const
void setLayerID (const QString &id)
QString layerID () const
void setShowFeatureCount (bool show)
bool showFeatureCount () const
void setDefaultStyle ()
- Public Member Functions inherited from QgsComposerLegendItem
 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 ()
QgsComposerLegendStyle::Style style () const
void setStyle (QgsComposerLegendStyle::Style style)
virtual QString userText () const
virtual void setUserText (const QString &text)

Private Attributes

QString mLayerID
bool mShowFeatureCount

Additional Inherited Members

- Public Types inherited from QgsComposerLegendItem
enum  ItemType {
  GroupItem = QStandardItem::UserType, LayerItem, SymbologyV2Item, RasterSymbolItem,
- Protected Member Functions inherited from QgsComposerLegendItem
void writeXMLChildren (QDomElement &elem, QDomDocument &doc) const
- Protected Attributes inherited from QgsComposerLegendItem
QgsComposerLegendStyle::Style mStyle
QString mUserText

Detailed Description

Definition at line 122 of file qgscomposerlegenditem.h.

Constructor & Destructor Documentation

QgsComposerLayerItem::QgsComposerLayerItem ( )

Definition at line 205 of file qgscomposerlegenditem.cpp.

Referenced by clone().

QgsComposerLayerItem::QgsComposerLayerItem ( const QString &  text)

Definition at line 210 of file qgscomposerlegenditem.cpp.

QgsComposerLayerItem::~QgsComposerLayerItem ( )

Definition at line 215 of file qgscomposerlegenditem.cpp.

Member Function Documentation

QStandardItem * QgsComposerLayerItem::clone ( ) const

Implements QgsComposerLegendItem.

Definition at line 219 of file qgscomposerlegenditem.cpp.

References mLayerID, QgsComposerLayerItem(), and setLayerID().

ItemType QgsComposerLayerItem::itemType ( ) const

Implements QgsComposerLegendItem.

Definition at line 133 of file qgscomposerlegenditem.h.

References QgsComposerLegendItem::LayerItem.

QString QgsComposerLayerItem::layerID ( ) const
void QgsComposerLayerItem::readXML ( const QDomElement &  itemElem,
bool  xServerAvailable = true 

Read item content from xml.

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

Implements QgsComposerLegendItem.

Definition at line 239 of file qgscomposerlegenditem.cpp.

References QgsComposerLegendItem::readXML(), setLayerID(), setShowFeatureCount(), QgsComposerLegendItem::setStyle(), QgsComposerLegendItem::setUserText(), and QgsComposerLegendStyle::styleFromName().

void QgsComposerLayerItem::setDefaultStyle ( )
void QgsComposerLayerItem::setLayerID ( const QString &  id)

Definition at line 135 of file qgscomposerlegenditem.h.

Referenced by QgsLegendModel::addLayer(), clone(), and readXML().

void QgsComposerLayerItem::setShowFeatureCount ( bool  show)

Definition at line 138 of file qgscomposerlegenditem.h.

Referenced by readXML().

bool QgsComposerLayerItem::showFeatureCount ( ) const
void QgsComposerLayerItem::writeXML ( QDomElement &  elem,
QDomDocument &  doc 
) const

Member Data Documentation

QString QgsComposerLayerItem::mLayerID

Definition at line 144 of file qgscomposerlegenditem.h.

Referenced by clone(), and writeXML().

bool QgsComposerLayerItem::mShowFeatureCount

Definition at line 146 of file qgscomposerlegenditem.h.

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