QGIS API Documentation  2.3.0-Master
 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
[legend]
Collaboration diagram for QgsComposerLayerItem:
Collaboration graph
[legend]

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. More...
 
ItemType itemType () const
 
void setLayerID (const QString &id)
 
QString layerID () const
 
void setShowFeatureCount (bool show)
 
bool showFeatureCount () const
 
void setDefaultStyle (double scaleDenominator=-1, QString rule="")
 
- 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,
  StyleItem
}
 
- 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 ( )
virtual

Definition at line 215 of file qgscomposerlegenditem.cpp.

Member Function Documentation

QStandardItem * QgsComposerLayerItem::clone ( ) const
virtual

Implements QgsComposerLegendItem.

Definition at line 219 of file qgscomposerlegenditem.cpp.

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

ItemType QgsComposerLayerItem::itemType ( ) const
inlinevirtual

Implements QgsComposerLegendItem.

Definition at line 133 of file qgscomposerlegenditem.h.

References QgsComposerLegendItem::LayerItem.

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

Read item content from xml.

Parameters
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 ( double  scaleDenominator = -1,
QString  rule = "" 
)
void QgsComposerLayerItem::setLayerID ( const QString &  id)
inline

Definition at line 135 of file qgscomposerlegenditem.h.

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

void QgsComposerLayerItem::setShowFeatureCount ( bool  show)
inline

Definition at line 138 of file qgscomposerlegenditem.h.

Referenced by readXML().

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

Member Data Documentation

QString QgsComposerLayerItem::mLayerID
private

Definition at line 144 of file qgscomposerlegenditem.h.

Referenced by clone(), and writeXML().

bool QgsComposerLayerItem::mShowFeatureCount
private

Definition at line 146 of file qgscomposerlegenditem.h.


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