23 mResizeMode( UseExistingFrames ),
24 mCreateUndoCommands( createUndoCommands ),
25 mIsRecalculatingSize( false )
33 mResizeMode( UseExistingFrames ),
34 mIsRecalculatingSize( false )
61 double totalHeight = size.height();
63 if ( totalHeight < 1 )
69 double currentHeight = 0;
87 currentHeight = currentItem->rect().height();
90 currentItem->
setContentSection( QRectF( 0, 0, currentItem->rect().width(), currentHeight ) );
95 currentItem->
setContentSection( QRectF( 0, currentY, currentItem->rect().width(), currentHeight ) );
97 currentItem->update();
98 currentY += currentHeight;
125 double frameHeight = 0;
128 frameHeight = currentItem->rect().height();
143 QPointF( currentItem->pos().x(), newFrameY ),
144 QSizeF( currentItem->rect().width(), frameHeight ) );
148 newFrame->
setContentSection( QRectF( 0, 0, newFrame->rect().width(), newFrame->rect().height() ) );
149 currentY += frameHeight;
153 double contentHeight =
findNearbyPageBreak( currentY + newFrame->rect().height() ) - currentY;
154 newFrame->
setContentSection( QRectF( 0, currentY, newFrame->rect().width(), contentHeight ) );
155 currentY += contentHeight;
158 currentItem = newFrame;
171 pos.y(), size.width(), size.height() );
180 newFrame->setOpacity( currentFrame->opacity() );
226 for (
int i =
mFrameItems.size() - 1; i >= 0; --i )
245 lastFrame->rect().width(), lastFrame->rect().height() );
247 lastFrame = newFrame;
273 QList<QgsComposerFrame*>::iterator frameIt =
mFrameItems.begin();
276 ( *frameIt )->update();
285 QList<QgsComposerFrame*>::iterator frameIt =
mFrameItems.begin();
310 QList<QgsComposerFrame*>::const_iterator frameIt =
mFrameItems.constBegin();
311 for ( ; frameIt !=
mFrameItems.constEnd(); ++frameIt )
313 ( *frameIt )->writeXML( elem, doc );
324 QDomNodeList frameList = itemElem.elementsByTagName(
"ComposerFrame" );
325 for (
int i = 0; i < frameList.size(); ++i )
327 QDomElement frameElem = frameList.at( i ).toElement();
329 newFrame->
readXML( frameElem, doc );
bool mIsRecalculatingSize
void recalculateFrameSizes()
Recalculates the portion of the multiframe item which is shown in each of it's component frames...
virtual ~QgsComposerMultiFrame()
Qt::PenJoinStyle frameJoinStyle() const
Returns the join style used for drawing the item's frame.
void setNumPages(int pages)
Note: added in version 1.9.
virtual double findNearbyPageBreak(double yPos)
Finds the optimal position to break a frame at.
A item that forms part of a map composition.
ResizeMode resizeMode() const
void removeComposerItem(QgsComposerItem *item, bool createCommand=true)
Remove item from the graphics scene.
QgsComposition * mComposition
virtual QSizeF totalSize() const =0
QColor backgroundColor() const
Gets the background color for this item.
double spaceBetweenPages() const
int numPages() const
Note: added in version 1.9.
double frameOutlineWidth() const
Returns the frame's outline width.
bool _readXML(const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)
void setBackgroundEnabled(bool drawBackground)
Set whether this item has a Background drawn around it or not.
virtual void addFrame(QgsComposerFrame *frame, bool recalcFrameSizes=true)=0
QgsComposerFrame * createNewFrame(QgsComposerFrame *currentFrame, QPointF pos, QSizeF size)
Creates a new frame and adds it to the multi frame and composition.
QList< QgsComposerFrame * > mFrameItems
virtual void setFrameOutlineWidth(double outlineWidth)
Sets frame outline width.
bool _writeXML(QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const
void setFrameJoinStyle(Qt::PenJoinStyle style)
Sets join style used when drawing the item's frame.
Graphics scene for map printing.
void handlePageChange()
Adapts to changed number of pages if resize type is RepeatOnEveryPage.
Frame for html, table, text which can be divided onto several frames.
void deleteFrames()
Removes and deletes all frames from mComposition.
void setBackgroundColor(const QColor &backgroundColor)
Sets the background color for this item.
QPainter::CompositionMode blendMode() const
Returns the item's composition blending mode.
bool hasFrame() const
Whether this item has a frame or not.
void setResizeMode(ResizeMode mode)
bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
sets state from Dom document
double paperHeight() const
Returns height of paper item.
bool hasBackground() const
Whether this item has a Background or not.
void setBlendMode(QPainter::CompositionMode blendMode)
Sets the item's composition blending mode.
QgsComposerFrame * frame(int i) const
void setContentSection(const QRectF §ion)
Sets the part of this frame (relative to the total multiframe extent in mm)
void setFrameEnabled(bool drawFrame)
Set whether this item has a frame drawn around it or not.
void addMultiFrame(QgsComposerMultiFrame *multiFrame)
Adds multiframe.
void handleFrameRemoval(QgsComposerItem *item)
Called before a frame is going to be removed (update frame list)