Commit 22b6d455 authored by Alex Richardson's avatar Alex Richardson

Remove copy of qpagesize.cpp

No longer needed with Qt5
parent 437b2d4a
......@@ -95,7 +95,6 @@ endif(NOT WIN32)
# okularcore
set(okularcore_SRCS
core/qpagesize.cpp # REMOVE On Qt5 port
core/action.cpp
core/annotations.cpp
core/area.cpp
......
......@@ -39,6 +39,8 @@
#include <QUndoCommand>
#include <QMimeDatabase>
#include <QDesktopServices>
#include <QPageSize>
#include <QStandardPaths>
#include <k4aboutdata.h>
#include <kauthorized.h>
......@@ -52,9 +54,10 @@
#include <kprocess.h>
#include <krun.h>
#include <kshell.h>
#include <kzip.h>
#include <KIO/Global>
#include <KFormat>
// local includes
#include "action.h"
......@@ -87,13 +90,10 @@
#include "view_p.h"
#include "form.h"
#include "utils.h"
#include "qpagesize.h" // TODO Convert to <> in Qt5
#include <memory>
#include <config-okular.h>
#include <KFormat>
#include <QStandardPaths>
using namespace Okular;
......
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2014 John Layt <jlayt@kde.org>
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QPAGESIZE_H
#define QPAGESIZE_H
#include <QtCore/qsharedpointer.h>
QT_BEGIN_NAMESPACE
#if defined(B0)
#undef B0 // Terminal hang-up. We assume that you do not want that.
#endif
class QPageSizePrivate;
class QString;
class QSize;
class QSizeF;
class QRectF;
class QRect;
class QPageSize
{
public:
// ### Qt6 Re-order and remove duplicates
// NOTE: Must keep in sync with QPagedPrintEngine and QPrinter
enum PageSizeId {
// Existing Qt sizes
A4,
B5,
Letter,
Legal,
Executive,
A0,
A1,
A2,
A3,
A5,
A6,
A7,
A8,
A9,
B0,
B1,
B10,
B2,
B3,
B4,
B6,
B7,
B8,
B9,
C5E,
Comm10E,
DLE,
Folio,
Ledger,
Tabloid,
Custom,
// New values derived from PPD standard
A10,
A3Extra,
A4Extra,
A4Plus,
A4Small,
A5Extra,
B5Extra,
JisB0,
JisB1,
JisB2,
JisB3,
JisB4,
JisB5,
JisB6,
JisB7,
JisB8,
JisB9,
JisB10,
// AnsiA = Letter,
// AnsiB = Ledger,
AnsiC,
AnsiD,
AnsiE,
LegalExtra,
LetterExtra,
LetterPlus,
LetterSmall,
TabloidExtra,
ArchA,
ArchB,
ArchC,
ArchD,
ArchE,
Imperial7x9,
Imperial8x10,
Imperial9x11,
Imperial9x12,
Imperial10x11,
Imperial10x13,
Imperial10x14,
Imperial12x11,
Imperial15x11,
ExecutiveStandard,
Note,
Quarto,
Statement,
SuperA,
SuperB,
Postcard,
DoublePostcard,
Prc16K,
Prc32K,
Prc32KBig,
FanFoldUS,
FanFoldGerman,
FanFoldGermanLegal,
EnvelopeB4,
EnvelopeB5,
EnvelopeB6,
EnvelopeC0,
EnvelopeC1,
EnvelopeC2,
EnvelopeC3,
EnvelopeC4,
// EnvelopeC5 = C5E,
EnvelopeC6,
EnvelopeC65,
EnvelopeC7,
// EnvelopeDL = DLE,
Envelope9,
// Envelope10 = Comm10E,
Envelope11,
Envelope12,
Envelope14,
EnvelopeMonarch,
EnvelopePersonal,
EnvelopeChou3,
EnvelopeChou4,
EnvelopeInvite,
EnvelopeItalian,
EnvelopeKaku2,
EnvelopeKaku3,
EnvelopePrc1,
EnvelopePrc2,
EnvelopePrc3,
EnvelopePrc4,
EnvelopePrc5,
EnvelopePrc6,
EnvelopePrc7,
EnvelopePrc8,
EnvelopePrc9,
EnvelopePrc10,
EnvelopeYou4,
// Last item, with commonly used synynoms from QPagedPrintEngine / QPrinter
LastPageSize = EnvelopeYou4,
NPageSize = LastPageSize,
NPaperSize = LastPageSize,
// Convenience overloads for naming consistency
AnsiA = Letter,
AnsiB = Ledger,
EnvelopeC5 = C5E,
EnvelopeDL = DLE,
Envelope10 = Comm10E
};
// NOTE: Must keep in sync with QPageLayout::Unit and QPrinter::Unit
enum Unit {
Millimeter,
Point,
Inch,
Pica,
Didot,
Cicero
};
enum SizeMatchPolicy {
FuzzyMatch,
FuzzyOrientationMatch,
ExactMatch
};
explicit QPageSize(PageSizeId pageSizeId);
~QPageSize();
bool isValid() const;
QSizeF size(Unit units) const;
private:
friend class QPageSizePrivate;
friend class QPlatformPrintDevice;
QSharedDataPointer<QPageSizePrivate> d;
};
QT_END_NAMESPACE
#endif // QPAGESIZE_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment