2012-08-09 11:10:55 +02:00
|
|
|
|
|
|
|
class QgsComposerMultiFrame: QObject
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgscomposermultiframe.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum ResizeMode
|
|
|
|
{
|
|
|
|
UseExistingFrames = 0,
|
2012-08-17 13:47:03 +02:00
|
|
|
ExtendToNextPage, //uses the next page(s) until the content has been printed
|
|
|
|
RepeatOnEveryPage, //repeats the same frame on every page
|
|
|
|
RepeatUntilFinished //duplicates last frame to next page to fit the total size
|
2012-08-09 11:10:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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 );
|
|
|
|
|
|
|
|
/**Removes and deletes all frames from mComposition*/
|
|
|
|
void deleteFrames();
|
|
|
|
|
|
|
|
int nFrames() const;
|
2012-08-17 13:47:03 +02:00
|
|
|
};
|