38 QDomElement frameElem = doc.createElement(
"ComposerFrame" );
39 frameElem.setAttribute(
"sectionX", QString::number(
mSection.x() ) );
40 frameElem.setAttribute(
"sectionY", QString::number(
mSection.y() ) );
41 frameElem.setAttribute(
"sectionWidth", QString::number(
mSection.width() ) );
42 frameElem.setAttribute(
"sectionHeight", QString::number(
mSection.height() ) );
43 elem.appendChild( frameElem );
49 double x = itemElem.attribute(
"sectionX" ).toDouble();
50 double y = itemElem.attribute(
"sectionY" ).toDouble();
51 double width = itemElem.attribute(
"sectionWidth" ).toDouble();
52 double height = itemElem.attribute(
"sectionHeight" ).toDouble();
53 mSection = QRectF( x, y, width, height );
54 QDomElement composerItem = itemElem.firstChildElement(
"ComposerItem" );
55 if ( composerItem.isNull() )
59 return _readXML( composerItem, doc );
64 Q_UNUSED( itemStyle );
virtual void render(QPainter *p, const QRectF &renderExtent)=0
A item that forms part of a map composition.
QgsComposerMultiFrame * mMultiFrame
virtual void drawFrame(QPainter *p)
Draw black frame around item.
void beginMultiFrameCommand(QgsComposerMultiFrame *multiFrame, const QString &text)
void endMultiFrameCommand()
bool _readXML(const QDomElement &itemElem, const QDomDocument &doc)
Reads parameter that are not subclass specific in document.
virtual void drawSelectionBoxes(QPainter *p)
Draw selection boxes around item.
Abstract base class for composer entries with the ability to distribute the content to several frames...
QgsComposition * mComposition
Graphics scene for map printing.
bool _writeXML(QDomElement &itemElem, QDomDocument &doc) const
Writes parameter that are not subclass specific in document.
virtual void drawBackground(QPainter *p)
Draw background.
bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
sets state from Dom document
bool writeXML(QDomElement &elem, QDomDocument &doc) const
stores state in Dom element
void beginItemCommand(const QString &text)
QgsComposerMultiFrame * multiFrame() const
void paint(QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget)