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;}
118 bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
124 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc );
128 void synchronizeWithModel();
130 void invalidateCurrentMap();
210 QList<Atom> createAtomList( QStandardItem* rootItem,
bool splitLayer );
213 void setColumns( QList<Atom>& atomList );
217 QSizeF drawTitle( QPainter* painter = 0, QPointF point = QPointF(), Qt::AlignmentFlag halignment = Qt::AlignLeft );
222 QSizeF drawGroupItemTitle(
QgsComposerGroupItem* groupItem, QPainter* painter = 0, QPointF point = QPointF() );
224 QSizeF drawLayerItemTitle(
QgsComposerLayerItem* layerItem, QPainter* painter = 0, QPointF point = QPointF() );
226 Nucleon drawSymbolItem(
QgsComposerLegendItem* symbolItem, QPainter* painter = 0, QPointF point = QPointF(),
double labelXOffset = 0. );
230 void drawSymbolV2( QPainter* p,
QgsSymbolV2* s,
double currentYCoord,
double& currentXPosition,
double& symbolHeight )
const;
235 QSizeF drawAtom(
Atom atom, QPainter* painter = 0, QPointF point = QPointF() );
237 double spaceAboveAtom(
Atom atom );
240 QStringList layerIdList()
const;
244 QStringList splitStringForWrapping( QString stringToSplt );
246 QMap<QgsComposerLegendStyle::Style, QgsComposerLegendStyle>
mStyleMap;