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
23QT_REQUIRE_CONFIG(printdialog);
24
25QT_BEGIN_NAMESPACE
26
27class QPrinter;
28class QPrinterPrivate;
29
30class QAbstractPrintDialogPrivate : public QDialogPrivate
31{
32 Q_DECLARE_PUBLIC(QAbstractPrintDialog)
33
34public:
35 QAbstractPrintDialogPrivate()
36 : printer(nullptr), pd(nullptr)
37 , options(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintPageRange |
38 QAbstractPrintDialog::PrintCollateCopies | QAbstractPrintDialog::PrintShowPageSize),
39 minPage(0), maxPage(INT_MAX), ownsPrinter(false)
40 {
41 }
42
43 QPrinter *printer;
44 QPrinterPrivate *pd;
45 QPointer<QObject> receiverToDisconnectOnClose;
46 QByteArray memberToDisconnectOnClose;
47
48 QAbstractPrintDialog::PrintDialogOptions options;
49
50 virtual void setTabs(const QList<QWidget *> &) {}
51 void setPrinter(QPrinter *newPrinter);
52 int minPage;
53 int maxPage;
54
55 bool ownsPrinter;
56};
57
58QT_END_NAMESPACE
59
60#endif // QABSTRACTPRINTDIALOG_P_H
61

source code of qtbase/src/printsupport/dialogs/qabstractprintdialog_p.h