KReport

KReportPageSize.h
1 /* This file is part of the KDE project
2  Copyright (C) 2015 by Adam Pigg <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KREPORTPAGESIZE_H
21 #define KREPORTPAGESIZE_H
22 #include <QPageSize>
23 #include "kreport_export.h"
24 
25 /**
26  * @brief Handle the page sizes we support in reports
27  *
28  * A group of helper functions and definitions of the page sizes
29  * we support in KReport.
30  *
31  * We don't support all the sizes supported by Qt, so here we provide a list
32  * of supported sizes and translatable descriptions, with helper functions to
33  * switch between QString and QPageSizeId
34  *
35  */
36 namespace KReportPageSize
37 {
38 
39 /**
40  * @return list of translated names of all the available formats
41  */
42 KREPORT_EXPORT QStringList pageFormatNames();
43 
44 /**
45  * @return list of non-translated names of all the available formats
46  */
47 KREPORT_EXPORT QStringList pageFormatKeys();
48 
49 /**
50  * @return the default format (based on the default printer)
51  */
52 KREPORT_EXPORT QPageSize::PageSizeId defaultSize();
53 
54 /**
55  * @return the page size Id for the given key
56  */
57 KREPORT_EXPORT QPageSize::PageSizeId pageSize(const QString& key);
58 
59 /**
60  * @return the page size string for the given Id
61  */
62 KREPORT_EXPORT QString pageSizeKey(QPageSize::PageSizeId id);
63 
64 
65 }
66 
67 #endif // KREPORTPAGESIZE_H
KREPORT_EXPORT QString pageSizeKey(QPageSize::PageSizeId id)
Handle the page sizes we support in reports.
KREPORT_EXPORT QStringList pageFormatNames()
KREPORT_EXPORT QStringList pageFormatKeys()
KREPORT_EXPORT QPageSize::PageSizeId defaultSize()
KREPORT_EXPORT QPageSize::PageSizeId pageSize(const QString &key)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:17:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.