2017-07-18 16:45:09 +10:00
|
|
|
/************************************************************************
|
|
|
|
* 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
|
|
|
|
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
class QgsLayoutItemPage : QgsLayoutItem
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Item representing the paper in a layout.
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslayoutitempage.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-07-19 07:46:15 +10:00
|
|
|
enum Orientation
|
|
|
|
{
|
|
|
|
Portrait,
|
|
|
|
Landscape
|
|
|
|
};
|
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
explicit QgsLayoutItemPage( QgsLayout *layout /TransferThis/ );
|
|
|
|
%Docstring
|
|
|
|
Constructor for QgsLayoutItemPage, with the specified parent ``layout``.
|
|
|
|
%End
|
|
|
|
virtual int type() const;
|
|
|
|
virtual QString stringType() const;
|
|
|
|
|
2017-07-19 07:46:15 +10:00
|
|
|
void setPageSize( const QgsLayoutSize &size );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``size`` of the page.
|
|
|
|
.. seealso:: 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.
|
|
|
|
.. seealso:: pageSize()
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutSize pageSize() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the size of the page.
|
|
|
|
.. seealso:: 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
|
|
|
|
|
2017-07-24 07:57:25 +10:00
|
|
|
virtual void attemptResize( const QgsLayoutSize &size );
|
|
|
|
|
|
|
|
|
2017-07-24 21:56:13 +10:00
|
|
|
public slots:
|
|
|
|
|
|
|
|
virtual void redraw();
|
|
|
|
|
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 );
|
|
|
|
|
2017-07-22 13:48:28 +10:00
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutitempage.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|