mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
161 lines
4.5 KiB
Plaintext
161 lines
4.5 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/layout/qgslayoutitempage.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsLayoutItemPage : QgsLayoutItem
|
|
{
|
|
%Docstring(signature="appended")
|
|
Item representing the paper in a layout.
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgslayoutitempage.h"
|
|
%End
|
|
public:
|
|
|
|
enum Orientation
|
|
{
|
|
Portrait,
|
|
Landscape
|
|
};
|
|
|
|
enum UndoCommand
|
|
{
|
|
UndoPageSymbol,
|
|
};
|
|
|
|
explicit QgsLayoutItemPage( QgsLayout *layout );
|
|
%Docstring
|
|
Constructor for QgsLayoutItemPage, with the specified parent ``layout``.
|
|
%End
|
|
~QgsLayoutItemPage();
|
|
|
|
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.
|
|
%End
|
|
|
|
virtual int type() const;
|
|
|
|
virtual QString displayName() const;
|
|
|
|
|
|
void setPageSize( const QgsLayoutSize &size );
|
|
%Docstring
|
|
Sets the ``size`` of the page.
|
|
|
|
.. 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 :py:class:`QgsPageSizeRegistry`. Valid page sizes
|
|
can be retrieved via :py:func:`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:: :py:func:`pageSize`
|
|
%End
|
|
|
|
QPageLayout pageLayout() const;
|
|
%Docstring
|
|
Returns the page layout for the page, suitable to pass to QPrinter.setPageLayout
|
|
|
|
.. versionadded:: 3.20
|
|
%End
|
|
|
|
QgsLayoutSize pageSize() const;
|
|
%Docstring
|
|
Returns the size of the page.
|
|
|
|
.. seealso:: :py:func:`setPageSize`
|
|
%End
|
|
|
|
Orientation orientation() const;
|
|
%Docstring
|
|
Returns the page orientation.
|
|
|
|
.. note::
|
|
|
|
There is no direct setter for page orientation - use :py:func:`~QgsLayoutItemPage.setPageSize` instead.
|
|
%End
|
|
|
|
void setPageStyleSymbol( QgsFillSymbol *symbol /Transfer/ );
|
|
%Docstring
|
|
Sets the ``symbol`` to use for drawing the page background.
|
|
|
|
Ownership of ``symbol`` is transferred to the page.
|
|
|
|
.. seealso:: :py:func:`pageStyleSymbol`
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
const QgsFillSymbol *pageStyleSymbol() const;
|
|
%Docstring
|
|
Returns the symbol to use for drawing the page background.
|
|
|
|
.. seealso:: :py:func:`setPageStyleSymbol`
|
|
|
|
.. versionadded:: 3.10
|
|
%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.
|
|
%End
|
|
|
|
virtual QRectF boundingRect() const;
|
|
|
|
virtual void attemptResize( const QgsLayoutSize &size, bool includesFrame = false );
|
|
|
|
virtual QgsAbstractLayoutUndoCommand *createCommand( const QString &text, int id, QUndoCommand *parent = 0 ) /Factory/;
|
|
|
|
virtual ExportLayerBehavior exportLayerBehavior() const;
|
|
|
|
virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
|
|
|
|
|
|
public slots:
|
|
|
|
virtual void redraw();
|
|
|
|
|
|
protected:
|
|
|
|
virtual void draw( QgsLayoutItemRenderContext &context );
|
|
|
|
virtual void drawFrame( QgsRenderContext &context );
|
|
|
|
virtual void drawBackground( QgsRenderContext &context );
|
|
|
|
virtual bool writePropertiesToElement( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
|
|
|
|
virtual bool readPropertiesFromElement( const QDomElement &itemElement, const QDomDocument &document, const QgsReadWriteContext &context );
|
|
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/layout/qgslayoutitempage.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|