18 #ifndef QGSCOMPOSERLEGEND_H 19 #define QGSCOMPOSERLEGEND_H 86 void setAutoUpdateModel(
bool autoUpdate );
88 bool autoUpdateModel()
const;
92 void setLegendFilterByMapEnabled(
bool enabled );
104 void setLegendFilterOutAtlas(
bool doFilter );
109 bool legendFilterOutAtlas()
const;
112 void setTitle(
const QString& t );
120 Qt::AlignmentFlag titleAlignment()
const;
126 void setTitleAlignment( Qt::AlignmentFlag alignment );
142 double boxSpace()
const;
143 void setBoxSpace(
double s );
145 double columnSpace()
const;
146 void setColumnSpace(
double s );
149 void setFontColor(
const QColor& c );
151 double symbolWidth()
const;
152 void setSymbolWidth(
double w );
154 double symbolHeight()
const;
155 void setSymbolHeight(
double h );
157 double wmsLegendWidth()
const;
158 void setWmsLegendWidth(
double w );
160 double wmsLegendHeight()
const;
161 void setWmsLegendHeight(
double h );
163 void setWrapChar(
const QString& t );
166 int columnCount()
const;
167 void setColumnCount(
int c );
169 bool splitLayer()
const;
170 void setSplitLayer(
bool s );
172 bool equalColumnWidth()
const;
173 void setEqualColumnWidth(
bool s );
181 bool drawRasterBorder()
const;
190 void setDrawRasterBorder(
bool enabled );
199 QColor rasterBorderColor()
const;
209 void setRasterBorderColor(
const QColor& color );
218 double rasterBorderWidth()
const;
228 void setRasterBorderWidth(
double width );
253 void synchronizeWithModel();
255 void invalidateCurrentMap();
258 void updateFilterByMap();
261 void mapLayerStyleOverridesChanged();
284 bool mLegendFilterByMap;
285 bool mLegendFilterByExpression;
288 bool mFilterOutAtlas;
291 bool mFilterAskedForUpdate;
293 void doUpdateFilterByMap();
Layer tree group node serves as a container for layers and further groups.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
A model that provides group, layer and classification items.
Item model implementation based on layer tree model for composer legend.
A item that forms part of a map composition.
QgsLegendModelV2 * modelV2()
Flags flags() const
Return OR-ed combination of model flags.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
The QgsLayerTreeModel class is model implementation for Qt item views framework.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
bool legendFilterByMapEnabled() const
Find out whether legend items are filtered to show just the ones visible in the associated map...
virtual void updateItem()
Updates item, with the possibility to do custom update for subclasses.
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
This class is a base class for nodes in a layer tree.
Graphics scene for map printing.
Object representing map window.
virtual QString displayName() const
Get item display name.
Composer legend components style.
virtual int type() const override
Return correct graphics item type.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Sets item state from DOM element.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
const QgsComposerMap * composerMap() const
A legend that can be placed onto a map composition.
The QgsLegendRenderer class handles automatic layout and rendering of legend.