18 #ifndef QGSCOMPOSERLEGEND_H
19 #define QGSCOMPOSERLEGEND_H
46 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
49 QSizeF paintAndDetermineSize( QPainter* painter );
58 void setTitle(
const QString& t ) {mTitle = t;}
59 QString
title()
const {
return mTitle;}
112 bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
118 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc );
122 void synchronizeWithModel();
124 void invalidateCurrentMap();
199 QList<Atom> createAtomList( QStandardItem* rootItem,
bool splitLayer );
202 void setColumns( QList<Atom>& atomList );
206 QSizeF drawTitle( QPainter* painter = 0, QPointF point = QPointF(), Qt::AlignmentFlag halignment = Qt::AlignLeft );
211 QSizeF drawGroupItemTitle(
QgsComposerGroupItem* groupItem, QPainter* painter = 0, QPointF point = QPointF() );
213 QSizeF drawLayerItemTitle(
QgsComposerLayerItem* layerItem, QPainter* painter = 0, QPointF point = QPointF() );
215 Nucleon drawSymbolItem(
QgsComposerLegendItem* symbolItem, QPainter* painter = 0, QPointF point = QPointF(),
double labelXOffset = 0. );
219 void drawSymbolV2( QPainter* p,
QgsSymbolV2* s,
double currentYCoord,
double& currentXPosition,
double& symbolHeight )
const;
224 QSizeF drawAtom(
Atom atom, QPainter* painter = 0, QPointF point = QPointF() );
226 double spaceAboveAtom(
Atom atom );
229 QStringList layerIdList()
const;
233 QStringList splitStringForWrapping( QString stringToSplt );
235 QMap<QgsComposerLegendStyle::Style, QgsComposerLegendStyle>
mStyleMap;