18 #ifndef QGSCOMPOSERLEGEND_H 19 #define QGSCOMPOSERLEGEND_H 84 void setResizeToContents(
bool enabled );
90 bool resizeToContents()
const;
100 void setAutoUpdateModel(
bool autoUpdate );
102 bool autoUpdateModel()
const;
106 void setLegendFilterByMapEnabled(
bool enabled );
118 void setLegendFilterOutAtlas(
bool doFilter );
123 bool legendFilterOutAtlas()
const;
126 void setTitle(
const QString& t );
134 Qt::AlignmentFlag titleAlignment()
const;
140 void setTitleAlignment( Qt::AlignmentFlag alignment );
156 double boxSpace()
const;
157 void setBoxSpace(
double s );
159 double columnSpace()
const;
160 void setColumnSpace(
double s );
163 void setFontColor(
const QColor& c );
165 double symbolWidth()
const;
166 void setSymbolWidth(
double w );
168 double symbolHeight()
const;
169 void setSymbolHeight(
double h );
171 double wmsLegendWidth()
const;
172 void setWmsLegendWidth(
double w );
174 double wmsLegendHeight()
const;
175 void setWmsLegendHeight(
double h );
177 void setWrapChar(
const QString& t );
180 int columnCount()
const;
181 void setColumnCount(
int c );
183 bool splitLayer()
const;
184 void setSplitLayer(
bool s );
186 bool equalColumnWidth()
const;
187 void setEqualColumnWidth(
bool s );
195 bool drawRasterBorder()
const;
204 void setDrawRasterBorder(
bool enabled );
213 QColor rasterBorderColor()
const;
223 void setRasterBorderColor(
const QColor& color );
232 double rasterBorderWidth()
const;
242 void setRasterBorderWidth(
double width );
267 void synchronizeWithModel();
269 void invalidateCurrentMap();
272 void updateFilterByMap(
bool redraw =
true );
275 void mapLayerStyleOverridesChanged();
298 bool mLegendFilterByMap;
299 bool mLegendFilterByExpression;
302 bool mFilterOutAtlas;
305 bool mFilterAskedForUpdate;
307 void doUpdateFilterByMap();
312 bool mInitialMapScaleCalculated;
318 bool mSizeToContents;
Layer tree group node serves as a container for layers and further groups.
virtual QString displayName() const
Get item display name.
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()
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
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)
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.
const QgsComposerMap * composerMap() const
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.
bool legendFilterByMapEnabled() const
Find out whether legend items are filtered to show just the ones visible in the associated map...
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Flags flags() const
Return OR-ed combination of model flags.
A legend that can be placed onto a map composition.
The QgsLegendRenderer class handles automatic layout and rendering of legend.