QGIS/python/core/layout/qgspagesizeregistry.sip

125 lines
3.2 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgspagesizeregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPageSize
{
%Docstring
A named page size for layouts.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgspagesizeregistry.h"
%End
public:
QgsPageSize();
QgsPageSize( const QString &name, const QgsLayoutSize &size, const QString &displayName = QString() );
%Docstring
Constructor for QgsPageSize, accepting the ``name`` of the page size and
page ``size``.
%End
QgsPageSize( const QgsLayoutSize &size );
%Docstring
Constructor for QgsPageSize, accepting a page ``size``.
%End
QString name;
%Docstring
Name of page size
%End
QgsLayoutSize size;
%Docstring
Page size
%End
QString displayName;
%Docstring
Translated page name
%End
bool operator==( const QgsPageSize &other ) const;
bool operator!=( const QgsPageSize &other ) const;
%Docstring
:rtype: bool
%End
};
class QgsPageSizeRegistry
{
%Docstring
A registry for known page sizes.
QgsPageSizeRegistry is not usually directly created, but rather accessed through
QgsApplication.pageSizeRegistry().
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgspagesizeregistry.h"
%End
public:
QgsPageSizeRegistry();
%Docstring
Creates a registry and populates it with known sizes
%End
void add( const QgsPageSize &size );
%Docstring
Adds a page ``size`` to the registry.
%End
QList< QgsPageSize > entries() const;
%Docstring
Returns a list of page sizes in the registry.
:rtype: list of QgsPageSize
%End
QList< QgsPageSize > find( const QString &name ) const;
%Docstring
Finds matching page sizes from the registry, using a case insensitive match
on the page size ``name``.
:rtype: list of QgsPageSize
%End
QString find( const QgsLayoutSize &size ) const;
%Docstring
Finds a matching page ``size`` from the registry. Returns the page size name,
or an empty string if no matching size could be found.
Orientation is ignored when matching page sizes, so a landscape A4 page will
match to the portrait A4 size in the registry.
:rtype: str
%End
bool decodePageSize( const QString &string, QgsPageSize &size );
%Docstring
Decodes a ``string`` representing a preset page size.
The decoded page size will be stored in the ``size`` argument.
:return: true if string was successfully decoded
:rtype: bool
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgspagesizeregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/