QGIS API Documentation
2.2.0-Valmiera
|
#include <qgscomposerlegenditem.h>
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 (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 |
Definition at line 122 of file qgscomposerlegenditem.h.
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.
|
virtual |
Definition at line 215 of file qgscomposerlegenditem.cpp.
|
virtual |
Implements QgsComposerLegendItem.
Definition at line 219 of file qgscomposerlegenditem.cpp.
References mLayerID, QgsComposerLayerItem(), and setLayerID().
|
inlinevirtual |
Implements QgsComposerLegendItem.
Definition at line 133 of file qgscomposerlegenditem.h.
References QgsComposerLegendItem::LayerItem.
|
inline |
Definition at line 136 of file qgscomposerlegenditem.h.
Referenced by QgsComposerLegend::drawSymbolItem(), QgsLegendModel::removeLayer(), setDefaultStyle(), QgsLegendModel::setLayerSetAndGroups(), QgsLegendModel::updateLayer(), QgsLegendModel::updateLayerItemText(), QgsLegendModel::updateRasterSymbolItemText(), and QgsLegendModel::updateSymbolV2ItemText().
|
virtual |
Read item content from xml.
itemElem | item to read from |
xServerAvailable | Read 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 = "" |
||
) |
Definition at line 289 of file qgscomposerlegenditem.cpp.
References QgsComposerLegendStyle::Hidden, QgsMapLayerRegistry::instance(), layerID(), QgsFeatureRendererV2::legendSymbolItems(), QgsMapLayerRegistry::mapLayer(), QgsVectorLayer::rendererV2(), QgsComposerLegendItem::setStyle(), and QgsComposerLegendStyle::Subgroup.
Referenced by QgsLegendModel::addLayer().
|
inline |
Definition at line 135 of file qgscomposerlegenditem.h.
Referenced by QgsLegendModel::addLayer(), clone(), and readXML().
|
inline |
Definition at line 138 of file qgscomposerlegenditem.h.
Referenced by readXML().
|
inline |
Definition at line 139 of file qgscomposerlegenditem.h.
Referenced by QgsLegendModel::addVectorLayerItemsV2(), QgsLegendModel::updateLayerItemText(), QgsLegendModel::updateSymbolV2ItemText(), and writeXML().
|
virtual |
Implements QgsComposerLegendItem.
Definition at line 227 of file qgscomposerlegenditem.cpp.
References mLayerID, QgsComposerLegendItem::mStyle, showFeatureCount(), QgsComposerLegendStyle::styleName(), QgsComposerLegendItem::userText(), and QgsComposerLegendItem::writeXMLChildren().
|
private |
Definition at line 144 of file qgscomposerlegenditem.h.
Referenced by clone(), and writeXML().
|
private |
Definition at line 146 of file qgscomposerlegenditem.h.