Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qprintdialog.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QPRINTDIALOG_H
6#define QPRINTDIALOG_H
7
8#include <QtPrintSupport/qtprintsupportglobal.h>
9
10#include <QtPrintSupport/qabstractprintdialog.h>
11
13
14QT_BEGIN_NAMESPACE
15
16class QPrintDialogPrivate;
17class QPushButton;
18class QPrinter;
19
20class Q_PRINTSUPPORT_EXPORT QPrintDialog : public QAbstractPrintDialog
21{
22 Q_OBJECT
23 Q_DECLARE_PRIVATE(QPrintDialog)
24 Q_PROPERTY(PrintDialogOptions options READ options WRITE setOptions)
25
26public:
27 explicit QPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
28 explicit QPrintDialog(QWidget *parent = nullptr);
29 ~QPrintDialog();
30
31 int exec() override;
32#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
33 virtual void accept() override;
34#endif
35 void done(int result) override;
36
37 void setOption(PrintDialogOption option, bool on = true);
38 bool testOption(PrintDialogOption option) const;
39 void setOptions(PrintDialogOptions options);
40 PrintDialogOptions options() const;
41
42#if defined(Q_OS_UNIX) || defined(Q_OS_WIN)
43 void setVisible(bool visible) override;
44#endif
45
46 using QDialog::open;
47 void open(QObject *receiver, const char *member);
48
49#ifdef Q_QDOC
50 QPrinter *printer();
51#endif
52
53 using QDialog::accepted;
54
55Q_SIGNALS:
56 void accepted(QPrinter *printer);
57
58private:
59#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
60 Q_PRIVATE_SLOT(d_func(), void _q_togglePageSetCombo(bool))
61 Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
62#if QT_CONFIG(messagebox)
63 Q_PRIVATE_SLOT(d_func(), void _q_checkFields())
64#endif // QT_CONFIG(messagebox)
65 friend class QUnixPrintWidget;
66# endif // Q_OS_UNIX
67};
68
69QT_END_NAMESPACE
70
71#endif // QPRINTDIALOG_H
QPointer< QObject > receiverToDisconnectOnClose
void setPrinter(QPrinter *newPrinter)
virtual void setTabs(const QList< QWidget * > &)
The QPrintDialog class provides a dialog for specifying the printer's configuration.
QT_REQUIRE_CONFIG(printdialog)
QT_REQUIRE_CONFIG(animation)