/************************************************************************ * 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; QgsLayoutSize size; QString displayName; bool operator==( const QgsPageSize &other ) const; bool operator!=( const QgsPageSize &other ) const; }; class QgsPageSizeRegistry { %Docstring A registry for known page sizes. QgsPageSizeRegistry is not usually directly created, but rather accessed through :py:func:`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. %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``. %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. %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 %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 * ************************************************************************/