2007-01-05 23:12:06 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
|
|
* *
|
|
|
|
* 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_
|
|
|
|
|
2018-08-31 09:23:45 +00:00
|
|
|
#include <QList>
|
|
|
|
#include <QSharedDataPointer>
|
|
|
|
#include <QString>
|
2007-01-05 23:12:06 +00:00
|
|
|
|
2014-10-27 21:35:06 +00:00
|
|
|
#include "okularcore_export.h"
|
2007-01-05 23:12:06 +00:00
|
|
|
|
|
|
|
namespace Okular
|
|
|
|
{
|
2007-04-17 21:20:35 +00:00
|
|
|
class PageSizePrivate;
|
|
|
|
|
2007-01-05 23:12:06 +00:00
|
|
|
/**
|
|
|
|
* @short A small class that represents the size of a page.
|
|
|
|
*/
|
2014-10-27 21:35:06 +00:00
|
|
|
class OKULARCORE_EXPORT PageSize
|
2007-01-05 23:12:06 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
2007-04-17 21:20:35 +00:00
|
|
|
bool operator!=(const PageSize &pageSize) const;
|
|
|
|
|
2007-01-05 23:12:06 +00:00
|
|
|
private:
|
2007-09-01 22:48:28 +00:00
|
|
|
/// @cond PRIVATE
|
2007-04-17 21:20:35 +00:00
|
|
|
friend class PageSizePrivate;
|
2007-09-01 22:48:28 +00:00
|
|
|
/// @endcond
|
2007-04-17 21:20:35 +00:00
|
|
|
QSharedDataPointer<PageSizePrivate> d;
|
2007-01-05 23:12:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|