QGIS API Documentation  2.99.0-Master (899ea38)
Public Member Functions | List of all members
QgsComposerLayerItem Class Reference

#include <qgscomposerlegenditem.h>

Inheritance diagram for QgsComposerLayerItem:
Inheritance graph

Public Member Functions

 QgsComposerLayerItem ()
 QgsComposerLayerItem (const QString &text)
virtual ~QgsComposerLayerItem ()
virtual QStandardItem * clone () const override
ItemType itemType () const override
QString layerId () const
 Returns the ID of the associated layer. More...
virtual void readXml (const QDomElement &itemElem, bool xServerAvailable=true) override
 Read item content from xml. More...
void setDefaultStyle (double scaleDenominator=-1, const QString &rule="")
void setLayerId (const QString &id)
 Sets the associated layer ID. More...
void setShowFeatureCount (bool show)
bool showFeatureCount () const
virtual void writeXml (QDomElement &elem, QDomDocument &doc) const override
- 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 ()
void setStyle (QgsComposerLegendStyle::Style style)
virtual void setUserText (const QString &text)
QgsComposerLegendStyle::Style style () const
virtual QString userText () const

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 133 of file qgscomposerlegenditem.h.

Constructor & Destructor Documentation

§ QgsComposerLayerItem() [1/2]

QgsComposerLayerItem::QgsComposerLayerItem ( )

Definition at line 204 of file qgscomposerlegenditem.cpp.

§ QgsComposerLayerItem() [2/2]

QgsComposerLayerItem::QgsComposerLayerItem ( const QString &  text)

Definition at line 209 of file qgscomposerlegenditem.cpp.

§ ~QgsComposerLayerItem()

QgsComposerLayerItem::~QgsComposerLayerItem ( )

Definition at line 214 of file qgscomposerlegenditem.cpp.

Member Function Documentation

§ clone()

QStandardItem * QgsComposerLayerItem::clone ( ) const

Implements QgsComposerLegendItem.

Definition at line 218 of file qgscomposerlegenditem.cpp.

§ itemType()

ItemType QgsComposerLayerItem::itemType ( ) const

Implements QgsComposerLegendItem.

Definition at line 144 of file qgscomposerlegenditem.h.

§ layerId()

QString QgsComposerLayerItem::layerId ( ) const

Returns the ID of the associated layer.

See also

Definition at line 156 of file qgscomposerlegenditem.h.

§ readXml()

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 238 of file qgscomposerlegenditem.cpp.

§ setDefaultStyle()

void QgsComposerLayerItem::setDefaultStyle ( double  scaleDenominator = -1,
const QString &  rule = "" 

Definition at line 288 of file qgscomposerlegenditem.cpp.

§ setLayerId()

void QgsComposerLayerItem::setLayerId ( const QString &  id)

Sets the associated layer ID.

See also

Definition at line 150 of file qgscomposerlegenditem.h.

§ setShowFeatureCount()

void QgsComposerLayerItem::setShowFeatureCount ( bool  show)

Definition at line 158 of file qgscomposerlegenditem.h.

§ showFeatureCount()

bool QgsComposerLayerItem::showFeatureCount ( ) const

Definition at line 159 of file qgscomposerlegenditem.h.

§ writeXml()

void QgsComposerLayerItem::writeXml ( QDomElement &  elem,
QDomDocument &  doc 
) const

Implements QgsComposerLegendItem.

Definition at line 226 of file qgscomposerlegenditem.cpp.

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