Okular

pagesize.h
1 /*
2  SPDX-FileCopyrightText: 2007 Pino Toscano <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef _OKULAR_PAGESIZE_H_
8 #define _OKULAR_PAGESIZE_H_
9 
10 #include <QList>
11 #include <QSharedDataPointer>
12 #include <QString>
13 
14 #include "okularcore_export.h"
15 
16 namespace Okular
17 {
18 class PageSizePrivate;
19 
20 /**
21  * @short A small class that represents the size of a page.
22  */
23 class OKULARCORE_EXPORT PageSize
24 {
25 public:
26  typedef QList<PageSize> List;
27 
28  /**
29  * Construct a null page size.
30  * @see isNull()
31  */
32  PageSize();
33  /**
34  * Construct a page size with the specified @p width and @p height,
35  * having the ID @p name.
36  */
37  PageSize(double width, double height, const QString &name);
38  /**
39  * Copy constructor.
40  */
41  PageSize(const PageSize &pageSize);
42  ~PageSize();
43 
44  /**
45  * Returns the width of the page size.
46  */
47  double width() const;
48  /**
49  * Returns the height of the page size.
50  */
51  double height() const;
52  /**
53  * Returns the ID of the page size.
54  */
55  QString name() const;
56 
57  /**
58  * Whether the page size is null.
59  */
60  bool isNull() const;
61 
62  PageSize &operator=(const PageSize &pageSize);
63 
64  /**
65  * Comparison operator.
66  */
67  bool operator==(const PageSize &pageSize) const;
68 
69  bool operator!=(const PageSize &pageSize) const;
70 
71 private:
72  /// @cond PRIVATE
73  friend class PageSizePrivate;
74  /// @endcond
76 };
77 
78 }
79 
80 #endif
const QLatin1String name
global.h
Definition: action.h:16
A small class that represents the size of a page.
Definition: pagesize.h:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jan 25 2022 22:32:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.