1 /***************************************************************************
2 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_PAGESIZE_H_
11 #define _OKULAR_PAGESIZE_H_
13 #include <QtCore/QList>
14 #include <QtCore/QSharedDataPointer>
15 #include <QtCore/QString>
17 #include <okular/core/okular_export.h>
21 class PageSizePrivate
;
24 * @short A small class that represents the size of a page.
26 class OKULAR_EXPORT PageSize
29 typedef QList
<PageSize
> List
;
32 * Construct a null page size.
37 * Construct a page size with the specified @p width and @p height,
38 * having the ID @p name.
40 PageSize( double width
, double height
, const QString
&name
);
44 PageSize( const PageSize
&pageSize
);
48 * Returns the width of the page size.
52 * Returns the height of the page size.
54 double height() const;
56 * Returns the ID of the page size.
61 * Whether the page size is null.
65 PageSize
& operator=( const PageSize
&pageSize
);
68 * Comparison operator.
70 bool operator==( const PageSize
&pageSize
) const;
72 bool operator!=( const PageSize
&pageSize
) const;
76 friend class PageSizePrivate
;
78 QSharedDataPointer
<PageSizePrivate
> d
;