QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
A registry for known page sizes. More...
#include <qgspagesizeregistry.h>
Public Member Functions | |
QgsPageSizeRegistry () | |
Creates a registry and populates it with known sizes. More... | |
void | add (const QgsPageSize &size) |
Adds a page size to the registry. More... | |
bool | decodePageSize (const QString &string, QgsPageSize &size) |
Decodes a string representing a preset page size. More... | |
QList< QgsPageSize > | entries () const |
Returns a list of page sizes in the registry. More... | |
QList< QgsPageSize > | find (const QString &name) const |
Finds matching page sizes from the registry, using a case insensitive match on the page size name. More... | |
QString | find (const QgsLayoutSize &size) const |
Finds a matching page size from the registry. More... | |
A registry for known page sizes.
QgsPageSizeRegistry is not usually directly created, but rather accessed through QgsApplication::pageSizeRegistry().
Definition at line 73 of file qgspagesizeregistry.h.
QgsPageSizeRegistry::QgsPageSizeRegistry | ( | ) |
Creates a registry and populates it with known sizes.
Definition at line 24 of file qgspagesizeregistry.cpp.
void QgsPageSizeRegistry::add | ( | const QgsPageSize & | size | ) |
Adds a page size to the registry.
Definition at line 60 of file qgspagesizeregistry.cpp.
bool QgsPageSizeRegistry::decodePageSize | ( | const QString & | string, |
QgsPageSize & | size | ||
) |
Decodes a string representing a preset page size.
The decoded page size will be stored in the size argument.
Definition at line 109 of file qgspagesizeregistry.cpp.
QList< QgsPageSize > QgsPageSizeRegistry::entries | ( | ) | const |
Returns a list of page sizes in the registry.
Definition at line 65 of file qgspagesizeregistry.cpp.
QList< QgsPageSize > QgsPageSizeRegistry::find | ( | const QString & | name | ) | const |
Finds matching page sizes from the registry, using a case insensitive match on the page size name.
Definition at line 76 of file qgspagesizeregistry.cpp.
QString QgsPageSizeRegistry::find | ( | const QgsLayoutSize & | size | ) | const |
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.
Definition at line 90 of file qgspagesizeregistry.cpp.