2017-10-27 13:08:20 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutframe.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-31 17:20:02 +10:00
|
|
|
class QgsLayoutFrame: QgsLayoutItem
|
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Base class for frame items, which form a layout multiframe item.
|
|
|
|
|
2017-10-31 17:20:02 +10:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslayoutframe.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
QgsLayoutFrame( QgsLayout *layout, QgsLayoutMultiFrame *multiFrame );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsLayoutFrame, with the specified parent ``layout``
|
|
|
|
and belonging to a ``multiFrame``.
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
static QgsLayoutFrame *create( QgsLayout *layout ) /Factory/;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Creates a new QgsLayoutFrame belonging to the specified ``layout``.
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual int type() const;
|
|
|
|
|
2017-12-20 16:39:33 +07:00
|
|
|
virtual QIcon icon() const;
|
|
|
|
|
2017-10-31 17:20:02 +10:00
|
|
|
|
|
|
|
virtual QString displayName() const;
|
|
|
|
|
|
|
|
|
2018-01-07 17:48:54 +10:00
|
|
|
virtual void cleanup();
|
|
|
|
|
|
|
|
|
2017-10-31 17:20:02 +10:00
|
|
|
void setContentSection( const QRectF §ion );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the visible part of the multiframe's content which is visible within
|
|
|
|
this frame (relative to the total multiframe extent in layout units).
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`extent`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutMultiFrame *multiFrame() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the parent multiframe for the frame.
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
2017-11-22 17:46:13 +10:00
|
|
|
virtual QgsLayoutSize minimumSize() const;
|
|
|
|
|
|
|
|
virtual QgsLayoutSize fixedSize() const;
|
|
|
|
|
|
|
|
|
2017-10-31 17:20:02 +10:00
|
|
|
QRectF extent() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the visible portion of the multi frame's content which
|
|
|
|
is shown in this frame, in layout units.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setContentSection`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool hidePageIfEmpty() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the page should be hidden (ie, not included in layout exports) if this frame is empty
|
|
|
|
|
|
|
|
:return: true if page should be hidden if frame is empty
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setHidePageIfEmpty`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setHidePageIfEmpty( const bool hidePageIfEmpty );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether the page should be hidden (ie, not included in layout exports) if this frame is empty
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param hidePageIfEmpty: set to true if page should be hidden if frame is empty
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`hidePageIfEmpty`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool hideBackgroundIfEmpty() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the background and frame stroke should be hidden if this frame is empty
|
|
|
|
|
|
|
|
:return: true if background and stroke should be hidden if frame is empty
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setHideBackgroundIfEmpty`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setHideBackgroundIfEmpty( const bool hideBackgroundIfEmpty );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether the background and frame stroke should be hidden if this frame is empty
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param hideBackgroundIfEmpty: set to true if background and stroke should be hidden if frame is empty
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`hideBackgroundIfEmpty`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool isEmpty() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the frame is empty.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`hidePageIfEmpty`
|
2017-10-31 17:20:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QgsExpressionContext createExpressionContext() const;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2018-02-19 16:04:46 +10:00
|
|
|
virtual void draw( QgsLayoutItemRenderContext &context );
|
2017-10-31 17:20:02 +10:00
|
|
|
|
2017-12-01 15:47:53 +10:00
|
|
|
virtual void drawFrame( QgsRenderContext &context );
|
|
|
|
|
|
|
|
virtual void drawBackground( QgsRenderContext &context );
|
|
|
|
|
2018-01-07 19:04:40 +10:00
|
|
|
virtual bool writePropertiesToElement( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
|
|
|
|
|
|
|
|
virtual bool readPropertiesFromElement( const QDomElement &itemElement, const QDomDocument &document, const QgsReadWriteContext &context );
|
|
|
|
|
2017-10-31 17:20:02 +10:00
|
|
|
|
|
|
|
};
|
2017-10-27 13:08:20 +10:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutframe.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|