1 /****************************************************************************
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Copyright (C) 2016-2019 Ivailo Monev
6 ** This file is part of the QtGui module of the Katie Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** Alternatively, this file may be used under the terms of the GNU Lesser
11 ** General Public License version 2.1 or version 3 as published by the Free
12 ** Software Foundation and appearing in the file LICENSE.LGPLv21 and
13 ** LICENSE.LGPLv3 included in the packaging of this file. Please review the
14 ** following information to ensure the GNU Lesser General Public License
15 ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ** As a special exception, The Qt Company gives you certain additional
19 ** rights. These rights are described in The Qt Company LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU
24 ** General Public License version 3.0 as published by the Free Software
25 ** Foundation and appearing in the file LICENSE.GPL included in the
26 ** packaging of this file. Please review the following information to
27 ** ensure the GNU General Public License version 3.0 requirements will be
28 ** met: http://www.gnu.org/copyleft/gpl.html.
32 ****************************************************************************/
41 // This file is not part of the Katie API. It exists purely as an
42 // implementation detail. This header file may change from version to
43 // version without notice, or even be removed.
49 #include "QtCore/qglobal.h"
53 #include "QtGui/qprinter.h"
54 #include "QtGui/qprintengine.h"
55 #include "QtGui/qprintdialog.h"
56 #include "QtCore/qpointer.h"
63 class QPreviewPaintEngine;
68 Q_DECLARE_PUBLIC(QPrinter)
70 QPrinterPrivate(QPrinter *printer)
74 , options(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintPageRange |
75 QAbstractPrintDialog::PrintCollateCopies | QAbstractPrintDialog::PrintShowPageSize)
76 , printRange(QAbstractPrintDialog::AllPages)
81 , use_default_engine(true)
83 , hasCustomPageMargins(false)
84 , hasUserSetPageSize(false)
92 void createDefaultEngines();
93 #ifndef QT_NO_PRINTPREVIEWWIDGET
94 QList<const QImage *> previewPages() const;
95 void setPreviewMode(bool);
98 void addToManualSetList(QPrintEngine::PrintEnginePropertyKey key);
100 QPrinter::PrinterMode printerMode;
101 QPrinter::OutputFormat outputFormat;
102 QPrintEngine *printEngine;
103 QPaintEngine *paintEngine;
105 QPrintEngine *realPrintEngine;
106 QPaintEngine *realPaintEngine;
107 #ifndef QT_NO_PRINTPREVIEWWIDGET
108 QPreviewPaintEngine *previewEngine;
113 QAbstractPrintDialog::PrintDialogOptions options;
114 QAbstractPrintDialog::PrintRange printRange;
115 int minPage, maxPage, fromPage, toPage;
117 uint use_default_engine : 1;
118 uint had_default_engines : 1;
120 uint validPrinter : 1;
121 uint hasCustomPageMargins : 1;
122 uint hasUserSetPageSize : 1;
124 // Used to remember which properties have been manually set by the user.
125 QList<QPrintEngine::PrintEnginePropertyKey> manualSetList;
130 #endif // QT_NO_PRINTER
132 #endif // QPRINTER_P_H