18 #ifndef QGSCOMPOSERLEGEND_H
19 #define QGSCOMPOSERLEGEND_H
84 void setAutoUpdateModel(
bool autoUpdate );
86 bool autoUpdateModel()
const;
90 void setLegendFilterByMapEnabled(
bool enabled );
96 void setTitle(
const QString& t );
104 Qt::AlignmentFlag titleAlignment()
const;
110 void setTitleAlignment( Qt::AlignmentFlag alignment );
126 double boxSpace()
const;
127 void setBoxSpace(
double s );
129 double columnSpace()
const;
130 void setColumnSpace(
double s );
133 void setFontColor(
const QColor& c );
135 double symbolWidth()
const;
136 void setSymbolWidth(
double w );
138 double symbolHeight()
const;
139 void setSymbolHeight(
double h );
141 double wmsLegendWidth()
const;
142 void setWmsLegendWidth(
double w );
144 double wmsLegendHeight()
const;
145 void setWmsLegendHeight(
double h );
147 void setWrapChar(
const QString& t );
150 int columnCount()
const;
151 void setColumnCount(
int c );
153 bool splitLayer()
const;
154 void setSplitLayer(
bool s );
156 bool equalColumnWidth()
const;
157 void setEqualColumnWidth(
bool s );
165 bool drawRasterBorder()
const;
174 void setDrawRasterBorder(
bool enabled );
183 QColor rasterBorderColor()
const;
193 void setRasterBorderColor(
const QColor& color );
202 double rasterBorderWidth()
const;
212 void setRasterBorderWidth(
double width );
237 void synchronizeWithModel();
239 void invalidateCurrentMap();
242 void updateFilterByMap();
245 void mapLayerStyleOverridesChanged();
262 bool mLegendFilterByMap;
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 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...
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
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.