23 , mResizeMode( UseExistingFrames )
24 , mCreateUndoCommands( createUndoCommands )
25 , mIsRecalculatingSize( false )
35 , mIsRecalculatingSize(
false )
48 Q_UNUSED( renderExtent );
53 Q_UNUSED( frameIndex );
56 render( painter, renderExtent );
78 double totalHeight = size.
height();
80 if ( totalHeight < 1 )
86 double currentHeight = 0;
95 bool removingPages =
true;
119 currentY += currentHeight;
146 double frameHeight = 0;
170 currentY += frameHeight;
176 currentY += contentHeight;
179 currentItem = newFrame;
227 return tr(
"<frame>" );
291 lastFrame = newFrame;
308 mIsRecalculatingSize =
true;
309 int pageNumber = frameItem->
page();
317 mIsRecalculatingSize =
false;
367 ( *frameIt )->writeXML( elem, doc );
382 for (
int i = 0; i < frameList.
size(); ++i )
386 newFrame->
readXML( frameElem, doc );
ResizeMode
Specifies the behaviour for creating new frames to fit the multiframe's content.
virtual void recalculateFrameSizes()
Recalculates the portion of the multiframe item which is shown in each of it's component frames...
QDomNodeList elementsByTagName(const QString &tagname) const
A base class for objects which belong to a map composition.
virtual ~QgsComposerMultiFrame()
QString attribute(const QString &name, const QString &defValue) const
void setHideBackgroundIfEmpty(const bool hideBackgroundIfEmpty)
Sets whether the background and frame border should be hidden if this frame is empty.
virtual double findNearbyPageBreak(double yPos)
Finds the optimal position to break a frame at.
bool pageIsEmpty(const int page) const
Returns whether a page is empty, ie, it contains no items except for the background paper item...
const T & at(int i) const
A item that forms part of a map composition.
#define Q_NOWARN_DEPRECATED_PUSH
int numPages() const
Returns the number of pages in the composition.
QColor backgroundColor() const
Gets the background color for this item.
virtual QString displayName() const
Get multiframe display name.
virtual void setFrameEnabled(const bool drawFrame)
Set whether this item has a frame drawn around it or not.
virtual QSizeF totalSize() const =0
Returns the total size of the multiframe's content.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
QString tr(const char *sourceText, const char *disambiguation, int n)
void setBlendMode(const QPainter::CompositionMode blendMode)
Sets the item's composition blending mode.
void update(const QRectF &rect)
QgsComposerObject(QgsComposition *composition)
Constructor.
int indexOf(const T &value, int from) const
QDomElement toElement() const
bool _readXML(const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames=false)
Restores state information about base multiframe object from a DOM element.
double frameOutlineWidth() const
Returns the frame's outline width.
int page() const
Gets the page the item is currently on.
void setNumPages(const int pages)
Sets the number of pages for the composition.
int count(const T &value) const
void recalculateFrameRects()
Forces a recalculation of all the associated frame's scene rectangles.
QgsComposerMultiFrame(QgsComposition *c, bool createUndoCommands)
Construct a new multiframe item.
void setFrameJoinStyle(const Qt::PenJoinStyle style)
Sets join style used when drawing the item's frame.
virtual void addFrame(QgsComposerFrame *frame, bool recalcFrameSizes=true)=0
Adds a frame to the multiframe.
void setAttribute(const QString &name, const QString &value)
int toInt(bool *ok, int base) const
QgsComposerFrame * createNewFrame(QgsComposerFrame *currentFrame, QPointF pos, QSizeF size)
Creates a new frame and adds it to the multi frame and composition.
virtual void setFrameOutlineColor(const QColor &color)
Sets frame outline color.
QList< QgsComposerFrame * > mFrameItems
bool mCreateUndoCommands
True: creates QgsMultiFrameCommands on internal changes (e.g.
void removeFrame(int i, const bool removeEmptyPages=false)
Removes a frame from the multiframe.
void removeComposerItem(QgsComposerItem *item, const bool createCommand=true, const bool removeGroupItems=true)
Remove item from the graphics scene.
void setSceneRect(const QRectF &rectangle) override
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size un...
bool hasBackground() const
Whether this item has a Background or not.
void setBackgroundEnabled(const bool drawBackground)
Set whether this item has a Background drawn around it or not.
Graphics scene for map printing.
void handlePageChange()
Adapts to changed number of composition pages if resize type is RepeatOnEveryPage.
Frame item for a composer multiframe item.
virtual void setFrameOutlineWidth(const double outlineWidth)
Sets frame outline width.
#define Q_NOWARN_DEPRECATED_POP
QgsComposition * mComposition
void deleteFrames()
Removes and deletes all child frames.
void setBackgroundColor(const QColor &backgroundColor)
Sets the background color for this item.
QColor frameOutlineColor() const
Returns the frame's outline color.
bool hideBackgroundIfEmpty() const
Returns whether the background and frame border should be hidden if this frame is empty...
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Sets item state from DOM element.
void setResizeMode(ResizeMode mode)
Sets the resize mode for the multiframe, and recalculates frame sizes to match.
virtual Q_DECL_DEPRECATED void render(QPainter *p, const QRectF &renderExtent)
Renders a portion of the multiframe's content into a painter.
int frameIndex(QgsComposerFrame *frame) const
Returns the index of a frame within the multiframe.
double paperHeight() const
Height of paper item.
bool hasFrame() const
Whether this item has a frame or not.
void update()
Forces a redraw of all child frames.
void setContentSection(const QRectF §ion)
Sets the visible part of the multiframe's content which is visible within this frame (relative to the...
bool readXML(const QDomElement &itemElem, const QDomDocument &doc) override
Sets item state from DOM element.
const_iterator constEnd() const
const_iterator constBegin() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QgsComposerFrame * frame(int i) const
Returns a child frame from the multiframe.
QPainter::CompositionMode blendMode() const
Returns the item's composition blending mode.
void addMultiFrame(QgsComposerMultiFrame *multiFrame)
Adds multiframe.
ResizeMode resizeMode() const
Returns the resize mode for the multiframe.
void handleFrameRemoval(QgsComposerItem *item)
Called before a frame is going to be removed.
double spaceBetweenPages() const
Returns the vertical space between pages in a composer view.
bool _writeXML(QDomElement &elem, QDomDocument &doc, bool ignoreFrames=false) const
Stores state information about base multiframe object in DOM element.
void setTransparency(const int transparency)
Sets the item's transparency.
Qt::PenJoinStyle frameJoinStyle() const
Returns the join style used for drawing the item's frame.
void changed()
Emitted when the properties of a multi frame have changed, and the GUI item widget must be updated...
QDomNode at(int index) const
int transparency() const
Returns the item's transparency.