QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | Protected Slots | Protected Attributes | Private Member Functions | List of all members
QgsComposerMultiFrame Class Reference

Abstract base class for composer entries with the ability to distribute the content to several frames (items) More...

#include <qgscomposermultiframe.h>

Inheritance diagram for QgsComposerMultiFrame:
Inheritance graph
[legend]
Collaboration diagram for QgsComposerMultiFrame:
Collaboration graph
[legend]

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)
QgsCompositioncomposition ()
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.
QgsComposerFrameframe (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

QgsCompositionmComposition
QList< QgsComposerFrame * > mFrameItems
ResizeMode mResizeMode
bool mCreateUndoCommands
 True: creates QgsMultiFrameCommands on internal changes (e.g.

Private Member Functions

 QgsComposerMultiFrame ()

Detailed Description

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.

Member Enumeration Documentation

Enumerator:
UseExistingFrames 
ExtendToNextPage 
RepeatOnEveryPage 
RepeatUntilFinished 

Definition at line 36 of file qgscomposermultiframe.h.

Constructor & Destructor Documentation

QgsComposerMultiFrame::QgsComposerMultiFrame ( QgsComposition c,
bool  createUndoCommands 
)
QgsComposerMultiFrame::~QgsComposerMultiFrame ( )
virtual

Definition at line 30 of file qgscomposermultiframe.cpp.

References deleteFrames().

QgsComposerMultiFrame::QgsComposerMultiFrame ( )
private

Definition at line 26 of file qgscomposermultiframe.cpp.

Member Function Documentation

bool QgsComposerMultiFrame::_readXML ( const QDomElement &  itemElem,
const QDomDocument &  doc,
bool  ignoreFrames = false 
)
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().

virtual void QgsComposerMultiFrame::addFrame ( QgsComposerFrame frame,
bool  recalcFrameSizes = true 
)
pure virtual
void QgsComposerMultiFrame::changed ( )
signal
QgsComposition* QgsComposerMultiFrame::composition ( )
inline

Definition at line 64 of file qgscomposermultiframe.h.

bool QgsComposerMultiFrame::createUndoCommands ( ) const
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().

int QgsComposerMultiFrame::frameCount ( ) const
inline

Return the number of frames associated with this multiframeset.

Note
added in 2.0, replaces nFrames

Definition at line 75 of file qgscomposermultiframe.h.

Referenced by QgsComposition::removeComposerItem(), and QgsComposerHtml::setUrl().

void QgsComposerMultiFrame::handleFrameRemoval ( QgsComposerItem item)
protectedslot

Called before a frame is going to be removed (update frame list)

Definition at line 147 of file qgscomposermultiframe.cpp.

References frame(), mFrameItems, and recalculateFrameSizes().

Referenced by deleteFrames(), and QgsComposerHtml::QgsComposerHtml().

void QgsComposerMultiFrame::handlePageChange ( )
protectedslot
virtual bool QgsComposerMultiFrame::readXML ( const QDomElement &  itemElem,
const QDomDocument &  doc,
bool  ignoreFrames = false 
)
pure virtual
void QgsComposerMultiFrame::recalculateFrameSizes ( )
protectedslot
void QgsComposerMultiFrame::removeFrame ( int  i)
virtual void QgsComposerMultiFrame::render ( QPainter *  p,
const QRectF &  renderExtent 
)
pure virtual

Implemented in QgsComposerHtml.

Referenced by QgsComposerFrame::paint().

ResizeMode QgsComposerMultiFrame::resizeMode ( ) const
inline

Definition at line 56 of file qgscomposermultiframe.h.

void QgsComposerMultiFrame::setCreateUndoCommands ( bool  enabled)
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().

virtual QSizeF QgsComposerMultiFrame::totalSize ( ) const
pure virtual

Implemented in QgsComposerHtml.

Referenced by recalculateFrameSizes().

void QgsComposerMultiFrame::update ( )

Definition at line 217 of file qgscomposermultiframe.cpp.

References mFrameItems.

Referenced by handlePageChange().

virtual bool QgsComposerMultiFrame::writeXML ( QDomElement &  elem,
QDomDocument &  doc,
bool  ignoreFrames = false 
) const
pure virtual

Member Data Documentation

QgsComposition* QgsComposerMultiFrame::mComposition
protected
bool QgsComposerMultiFrame::mCreateUndoCommands
protected

True: creates QgsMultiFrameCommands on internal changes (e.g.

changing frames )

Definition at line 83 of file qgscomposermultiframe.h.

QList<QgsComposerFrame*> QgsComposerMultiFrame::mFrameItems
protected
ResizeMode QgsComposerMultiFrame::mResizeMode
protected

The documentation for this class was generated from the following files: