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-10-16 15:12:01 +10:00
|
|
|
enum UndoCommand
|
|
|
|
{
|
|
|
|
UndoPageSymbol,
|
|
|
|
};
|
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
explicit QgsLayoutItemPage( QgsLayout *layout /TransferThis/ );
|
|
|
|
%Docstring
|
|
|
|
Constructor for QgsLayoutItemPage, with the specified parent ``layout``.
|
|
|
|
%End
|
2017-09-01 12:50:04 +10:00
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
static QgsLayoutItemPage *create( QgsLayout *layout ) /Factory/;
|
2017-09-01 12:50:04 +10:00
|
|
|
%Docstring
|
|
|
|
Returns a new page item for the specified ``layout``.
|
|
|
|
|
|
|
|
The caller takes responsibility for deleting the returned object.
|
|
|
|
:rtype: QgsLayoutItemPage
|
|
|
|
%End
|
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
virtual int type() const;
|
2017-11-30 08:08:40 +10:00
|
|
|
|
2017-07-18 16:45:09 +10:00
|
|
|
|
2017-07-19 07:46:15 +10:00
|
|
|
void setPageSize( const QgsLayoutSize &size );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``size`` of the page.
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`pageSize()`
|
2017-07-19 07:46:15 +10:00
|
|
|
%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()`
|
2017-07-19 07:46:15 +10:00
|
|
|
: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()`
|
2017-07-19 07:46:15 +10:00
|
|
|
: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-10-13 15:28:16 +10:00
|
|
|
virtual void attemptResize( const QgsLayoutSize &size, bool includesFrame = false );
|
2017-07-24 07:57:25 +10:00
|
|
|
|
|
|
|
|
2017-09-01 15:13:10 +10:00
|
|
|
virtual QgsAbstractLayoutUndoCommand *createCommand( const QString &text, int id, QUndoCommand *parent = 0 ) /Factory/;
|
|
|
|
|
|
|
|
|
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-09-12 17:07:49 +10:00
|
|
|
virtual void drawFrame( QgsRenderContext &context );
|
|
|
|
|
|
|
|
virtual void drawBackground( QgsRenderContext &context );
|
|
|
|
|
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 *
|
|
|
|
************************************************************************/
|