1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QABSTRACTPRINTDIALOG_P_H |
5 | #define QABSTRACTPRINTDIALOG_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtPrintSupport/private/qtprintsupportglobal_p.h> |
19 | |
20 | #include "private/qdialog_p.h" |
21 | #include "QtPrintSupport/qabstractprintdialog.h" |
22 | |
23 | #include <QtCore/qpointer.h> |
24 | |
25 | QT_REQUIRE_CONFIG(printdialog); |
26 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | class QPrinter; |
30 | class QPrinterPrivate; |
31 | |
32 | class QAbstractPrintDialogPrivate : public QDialogPrivate |
33 | { |
34 | Q_DECLARE_PUBLIC(QAbstractPrintDialog) |
35 | |
36 | public: |
37 | QAbstractPrintDialogPrivate() |
38 | : printer(nullptr), pd(nullptr) |
39 | , options(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintPageRange | |
40 | QAbstractPrintDialog::PrintCollateCopies | QAbstractPrintDialog::PrintShowPageSize), |
41 | minPage(0), maxPage(INT_MAX), ownsPrinter(false) |
42 | { |
43 | } |
44 | |
45 | QPrinter *printer; |
46 | QPrinterPrivate *pd; |
47 | QPointer<QObject> receiverToDisconnectOnClose; |
48 | QByteArray memberToDisconnectOnClose; |
49 | |
50 | QAbstractPrintDialog::PrintDialogOptions options; |
51 | |
52 | virtual void setTabs(const QList<QWidget *> &) {} |
53 | void setPrinter(QPrinter *newPrinter); |
54 | int minPage; |
55 | int maxPage; |
56 | |
57 | bool ownsPrinter; |
58 | }; |
59 | |
60 | QT_END_NAMESPACE |
61 | |
62 | #endif // QABSTRACTPRINTDIALOG_P_H |
63 |