forked from KDE/okular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpagesize.h
83 lines (69 loc) · 1.96 KB
/
pagesize.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/***************************************************************************
* Copyright (C) 2007 by Pino Toscano <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef _OKULAR_PAGESIZE_H_
#define _OKULAR_PAGESIZE_H_
#include <QList>
#include <QSharedDataPointer>
#include <QString>
#include "okularcore_export.h"
namespace Okular
{
class PageSizePrivate;
/**
* @short A small class that represents the size of a page.
*/
class OKULARCORE_EXPORT PageSize
{
public:
typedef QList<PageSize> List;
/**
* Construct a null page size.
* @see isNull()
*/
PageSize();
/**
* Construct a page size with the specified @p width and @p height,
* having the ID @p name.
*/
PageSize(double width, double height, const QString &name);
/**
* Copy constructor.
*/
PageSize(const PageSize &pageSize);
~PageSize();
/**
* Returns the width of the page size.
*/
double width() const;
/**
* Returns the height of the page size.
*/
double height() const;
/**
* Returns the ID of the page size.
*/
QString name() const;
/**
* Whether the page size is null.
*/
bool isNull() const;
PageSize &operator=(const PageSize &pageSize);
/**
* Comparison operator.
*/
bool operator==(const PageSize &pageSize) const;
bool operator!=(const PageSize &pageSize) const;
private:
/// @cond PRIVATE
friend class PageSizePrivate;
/// @endcond
QSharedDataPointer<PageSizePrivate> d;
};
}
#endif