QGIS API Documentation
2.2.0-Valmiera
|
Abstract base class for composer entries with the ability to distribute the content to several frames (items) More...
#include <qgscomposermultiframe.h>
Public Types | |
enum | ResizeMode { UseExistingFrames = 0, ExtendToNextPage, RepeatOnEveryPage, RepeatUntilFinished } |
Signals | |
void | changed () |
Public Member Functions | |
QgsComposerMultiFrame (QgsComposition *c, bool createUndoCommands) | |
virtual | ~QgsComposerMultiFrame () |
virtual QSizeF | totalSize () const =0 |
virtual void | render (QPainter *p, const QRectF &renderExtent)=0 |
virtual void | addFrame (QgsComposerFrame *frame, bool recalcFrameSizes=true)=0 |
void | removeFrame (int i) |
void | update () |
void | setResizeMode (ResizeMode mode) |
ResizeMode | resizeMode () const |
virtual bool | writeXML (QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const =0 |
bool | _writeXML (QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const |
virtual bool | readXML (const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)=0 |
bool | _readXML (const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false) |
QgsComposition * | composition () |
bool | createUndoCommands () const |
void | setCreateUndoCommands (bool enabled) |
void | deleteFrames () |
Removes and deletes all frames from mComposition. | |
int | frameCount () const |
Return the number of frames associated with this multiframeset. | |
QgsComposerFrame * | frame (int i) const |
Protected Slots | |
void | recalculateFrameSizes () |
void | handleFrameRemoval (QgsComposerItem *item) |
Called before a frame is going to be removed (update frame list) | |
void | handlePageChange () |
Adapts to changed number of pages if resize type is RepeatOnEveryPage. |
Protected Attributes | |
QgsComposition * | mComposition |
QList< QgsComposerFrame * > | mFrameItems |
ResizeMode | mResizeMode |
bool | mCreateUndoCommands |
True: creates QgsMultiFrameCommands on internal changes (e.g. |
Private Member Functions | |
QgsComposerMultiFrame () |
Abstract base class for composer entries with the ability to distribute the content to several frames (items)
Definition at line 31 of file qgscomposermultiframe.h.
Definition at line 36 of file qgscomposermultiframe.h.
QgsComposerMultiFrame::QgsComposerMultiFrame | ( | QgsComposition * | c, |
bool | createUndoCommands | ||
) |
Definition at line 20 of file qgscomposermultiframe.cpp.
References QgsComposition::addMultiFrame(), handlePageChange(), and mComposition.
|
virtual |
Definition at line 30 of file qgscomposermultiframe.cpp.
References deleteFrames().
|
private |
Definition at line 26 of file qgscomposermultiframe.cpp.
bool QgsComposerMultiFrame::_readXML | ( | const QDomElement & | itemElem, |
const QDomDocument & | doc, | ||
bool | ignoreFrames = false |
||
) |
Definition at line 265 of file qgscomposermultiframe.cpp.
References addFrame(), mComposition, mResizeMode, and QgsComposerFrame::readXML().
Referenced by QgsComposerHtml::readXML().
bool QgsComposerMultiFrame::_writeXML | ( | QDomElement & | elem, |
QDomDocument & | doc, | ||
bool | ignoreFrames = false |
||
) | const |
Definition at line 251 of file qgscomposermultiframe.cpp.
References mFrameItems, and mResizeMode.
Referenced by QgsComposerHtml::writeXML().
|
pure virtual |
Implemented in QgsComposerHtml.
Referenced by _readXML(), handlePageChange(), and recalculateFrameSizes().
|
signal |
Referenced by setResizeMode(), and QgsComposerHtml::setUrl().
|
inline |
Definition at line 64 of file qgscomposermultiframe.h.
|
inline |
Definition at line 66 of file qgscomposermultiframe.h.
void QgsComposerMultiFrame::deleteFrames | ( | ) |
Removes and deletes all frames from mComposition.
Definition at line 226 of file qgscomposermultiframe.cpp.
References handleFrameRemoval(), mComposition, mFrameItems, mResizeMode, QgsComposition::removeComposerItem(), and UseExistingFrames.
Referenced by QgsComposerHtml::readXML(), and ~QgsComposerMultiFrame().
QgsComposerFrame * QgsComposerMultiFrame::frame | ( | int | i | ) | const |
Definition at line 242 of file qgscomposermultiframe.cpp.
References mFrameItems.
Referenced by handleFrameRemoval(), and handlePageChange().
|
inline |
Return the number of frames associated with this multiframeset.
Definition at line 75 of file qgscomposermultiframe.h.
Referenced by QgsComposition::removeComposerItem(), and QgsComposerHtml::setUrl().
|
protectedslot |
Called before a frame is going to be removed (update frame list)
Definition at line 147 of file qgscomposermultiframe.cpp.
References frame(), index, mFrameItems, and recalculateFrameSizes().
Referenced by deleteFrames(), and QgsComposerHtml::QgsComposerHtml().
|
protectedslot |
Adapts to changed number of pages if resize type is RepeatOnEveryPage.
Definition at line 166 of file qgscomposermultiframe.cpp.
References addFrame(), frame(), mComposition, mFrameItems, mResizeMode, QgsComposition::numPages(), QgsComposition::paperHeight(), recalculateFrameSizes(), removeFrame(), RepeatOnEveryPage, QgsComposition::spaceBetweenPages(), and update().
Referenced by QgsComposerMultiFrame().
|
pure virtual |
Implemented in QgsComposerHtml.
Referenced by QgsComposerMultiFrameCommand::restoreState().
|
protectedslot |
Definition at line 45 of file qgscomposermultiframe.cpp.
References addFrame(), ExtendToNextPage, mComposition, mFrameItems, mResizeMode, QgsComposition::numPages(), QgsComposition::paperHeight(), removeFrame(), RepeatOnEveryPage, RepeatUntilFinished, QgsComposerFrame::setContentSection(), QgsComposition::setNumPages(), size, QgsComposition::spaceBetweenPages(), totalSize(), and UseExistingFrames.
Referenced by QgsComposerHtml::addFrame(), handleFrameRemoval(), handlePageChange(), setResizeMode(), and QgsComposerHtml::setUrl().
void QgsComposerMultiFrame::removeFrame | ( | int | i | ) |
Definition at line 207 of file qgscomposermultiframe.cpp.
References mComposition, mFrameItems, and QgsComposition::removeComposerItem().
Referenced by handlePageChange(), and recalculateFrameSizes().
|
pure virtual |
Implemented in QgsComposerHtml.
Referenced by QgsComposerFrame::paint().
|
inline |
Definition at line 56 of file qgscomposermultiframe.h.
|
inline |
Definition at line 67 of file qgscomposermultiframe.h.
Referenced by QgsComposition::addItemsFromXML().
void QgsComposerMultiFrame::setResizeMode | ( | ResizeMode | mode | ) |
Definition at line 35 of file qgscomposermultiframe.cpp.
References changed(), mResizeMode, and recalculateFrameSizes().
|
pure virtual |
Implemented in QgsComposerHtml.
Referenced by recalculateFrameSizes().
void QgsComposerMultiFrame::update | ( | ) |
Definition at line 217 of file qgscomposermultiframe.cpp.
References mFrameItems.
Referenced by handlePageChange().
|
pure virtual |
Implemented in QgsComposerHtml.
Referenced by QgsComposerMultiFrameCommand::saveState().
|
protected |
Definition at line 79 of file qgscomposermultiframe.h.
Referenced by _readXML(), QgsComposerHtml::addFrame(), deleteFrames(), handlePageChange(), QgsComposerHtml::htmlUnitsToMM(), QgsComposerHtml::QgsComposerHtml(), QgsComposerMultiFrame(), recalculateFrameSizes(), and removeFrame().
|
protected |
True: creates QgsMultiFrameCommands on internal changes (e.g.
changing frames )
Definition at line 83 of file qgscomposermultiframe.h.
|
protected |
Definition at line 80 of file qgscomposermultiframe.h.
Referenced by _writeXML(), QgsComposerHtml::addFrame(), deleteFrames(), frame(), handleFrameRemoval(), handlePageChange(), recalculateFrameSizes(), removeFrame(), QgsComposerHtml::setUrl(), and update().
|
protected |
Definition at line 81 of file qgscomposermultiframe.h.
Referenced by _readXML(), _writeXML(), deleteFrames(), handlePageChange(), recalculateFrameSizes(), and setResizeMode().