QGIS/python/core/layout/qgslayoutitempage.sip

123 lines
3.5 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitempage.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-07-24 07:57:25 +10:00
class QgsLayoutItemPage : QgsLayoutItem
{
%Docstring
Item representing the paper in a layout.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutitempage.h"
%End
public:
enum Orientation
{
Portrait,
Landscape
};
enum UndoCommand
{
UndoPageSymbol,
};
explicit QgsLayoutItemPage( QgsLayout *layout /TransferThis/ );
%Docstring
Constructor for QgsLayoutItemPage, with the specified parent ``layout``.
%End
static QgsLayoutItemPage *create( QgsLayout *layout ) /Factory/;
%Docstring
Returns a new page item for the specified ``layout``.
The caller takes responsibility for deleting the returned object.
:rtype: QgsLayoutItemPage
%End
virtual int type() const;
void setPageSize( const QgsLayoutSize &size );
%Docstring
Sets the ``size`` of the page.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`pageSize()`
%End
bool setPageSize( const QString &size, Orientation orientation = Portrait );
%Docstring
Sets the page size to a known page ``size``, e.g. "A4" and ``orientation``.
The known page sizes are managed by QgsPageSizeRegistry. Valid page sizes
can be retrieved via QgsPageSizeRegistry.entries().
The function returns true if ``size`` was a valid page size and the page
size was changed. If false is returned then ``size`` could not be matched
to a known page size.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`pageSize()`
:rtype: bool
%End
QgsLayoutSize pageSize() const;
%Docstring
Returns the size of the page.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setPageSize()`
:rtype: QgsLayoutSize
%End
Orientation orientation() const;
%Docstring
Returns the page orientiation.
.. note::
There is no direct setter for page orientation - use setPageSize() instead.
:rtype: Orientation
%End
static QgsLayoutItemPage::Orientation decodePageOrientation( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Decodes a ``string`` representing a page orientation. If specified, ``ok``
will be set to true if string could be successfully interpreted as a
page orientation.
:rtype: QgsLayoutItemPage.Orientation
%End
virtual void attemptResize( const QgsLayoutSize &size, bool includesFrame = false );
2017-07-24 07:57:25 +10:00
virtual QgsAbstractLayoutUndoCommand *createCommand( const QString &text, int id, QUndoCommand *parent = 0 ) /Factory/;
public slots:
virtual void redraw();
protected:
virtual void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 );
virtual void drawFrame( QgsRenderContext &context );
virtual void drawBackground( QgsRenderContext &context );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitempage.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/