QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
layout
qgspagesizeregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspagesizeregistry.h
3
--------------------
4
begin : June 2017
5
copyright : (C) 2017 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSPAGESIZEREGISTRY_H
19
#define QGSPAGESIZEREGISTRY_H
20
21
#include "
qgslayoutsize.h
"
22
23
#include <QList>
24
#include <QSizeF>
25
#include <QString>
26
32
class
CORE_EXPORT
QgsPageSize
33
{
34
public
:
35
QgsPageSize
();
36
41
QgsPageSize
(
const
QString &
name
,
const
QgsLayoutSize
&
size
,
const
QString &
displayName
= QString() );
42
46
QgsPageSize
(
const
QgsLayoutSize
&
size
);
47
49
QString
name
;
50
52
QgsLayoutSize
size
;
53
55
QString
displayName
;
56
57
bool
operator==
(
const
QgsPageSize
&other )
const
;
58
bool
operator!=
(
const
QgsPageSize
&other )
const
;
59
};
60
70
class
CORE_EXPORT
QgsPageSizeRegistry
71
{
72
public
:
76
QgsPageSizeRegistry
();
77
81
void
add
(
const
QgsPageSize
&size );
82
86
QList< QgsPageSize >
entries
()
const
;
87
92
QList< QgsPageSize >
find
(
const
QString &name )
const
;
93
101
QString
find
(
const
QgsLayoutSize
&size )
const
;
102
108
bool
decodePageSize
(
const
QString &
string
,
QgsPageSize
&size )
const
;
109
110
private
:
111
QList< QgsPageSize > mPageSizes;
112
};
113
114
#endif
//QGSPAGESIZEREGISTRY_H
QgsLayoutSize
Provides a method of storing sizes, consisting of a width and height, for use in QGIS layouts.
Definition
qgslayoutsize.h:47
QgsPageSizeRegistry::entries
QList< QgsPageSize > entries() const
Returns a list of page sizes in the registry.
Definition
qgspagesizeregistry.cpp:71
QgsPageSizeRegistry::find
QList< QgsPageSize > find(const QString &name) const
Finds matching page sizes from the registry, using a case insensitive match on the page size name.
Definition
qgspagesizeregistry.cpp:82
QgsPageSizeRegistry::decodePageSize
bool decodePageSize(const QString &string, QgsPageSize &size) const
Decodes a string representing a preset page size.
Definition
qgspagesizeregistry.cpp:116
QgsPageSizeRegistry::QgsPageSizeRegistry
QgsPageSizeRegistry()
Creates a registry and populates it with known sizes.
Definition
qgspagesizeregistry.cpp:30
QgsPageSizeRegistry::add
void add(const QgsPageSize &size)
Adds a page size to the registry.
Definition
qgspagesizeregistry.cpp:66
QgsPageSize
A named page size for layouts.
Definition
qgspagesizeregistry.h:33
QgsPageSize::displayName
QString displayName
Translated page name.
Definition
qgspagesizeregistry.h:55
QgsPageSize::QgsPageSize
QgsPageSize()
Definition
qgspagesizeregistry.cpp:131
QgsPageSize::name
QString name
Name of page size.
Definition
qgspagesizeregistry.h:49
QgsPageSize::size
QgsLayoutSize size
Page size.
Definition
qgspagesizeregistry.h:52
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:427
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:432
qgslayoutsize.h
Generated on
for QGIS API Documentation by
1.17.0