compile
[kdegraphics.git] / okular / core / pagesize.h
blobe92483378712f6f661ceeb9b67b7d24561b000b3
1 /***************************************************************************
2 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
3 * *
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>
19 namespace Okular {
21 class PageSizePrivate;
23 /**
24 * @short A small class that represents the size of a page.
26 class OKULAR_EXPORT PageSize
28 public:
29 typedef QList<PageSize> List;
31 /**
32 * Construct a null page size.
33 * @see isNull()
35 PageSize();
36 /**
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 );
41 /**
42 * Copy constructor.
44 PageSize( const PageSize &pageSize );
45 ~PageSize();
47 /**
48 * Returns the width of the page size.
50 double width() const;
51 /**
52 * Returns the height of the page size.
54 double height() const;
55 /**
56 * Returns the ID of the page size.
58 QString name() const;
60 /**
61 * Whether the page size is null.
63 bool isNull() const;
65 PageSize& operator=( const PageSize &pageSize );
67 /**
68 * Comparison operator.
70 bool operator==( const PageSize &pageSize ) const;
72 bool operator!=( const PageSize &pageSize ) const;
74 private:
75 /// @cond PRIVATE
76 friend class PageSizePrivate;
77 /// @endcond
78 QSharedDataPointer<PageSizePrivate> d;
83 #endif