Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QPRINTDIALOG_H
5#define QPRINTDIALOG_H
6
7#include <QtPrintSupport/qtprintsupportglobal.h>
8
9#include <QtPrintSupport/qabstractprintdialog.h>
10
11QT_REQUIRE_CONFIG(printdialog);
12
14
16class QPushButton;
17class QPrinter;
18
19class Q_PRINTSUPPORT_EXPORT QPrintDialog : public QAbstractPrintDialog
20{
22 Q_DECLARE_PRIVATE(QPrintDialog)
23 Q_PROPERTY(PrintDialogOptions options READ options WRITE setOptions)
24
25public:
26 explicit QPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
27 explicit QPrintDialog(QWidget *parent = nullptr);
28 ~QPrintDialog();
29
30 int exec() override;
31#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC)
32 virtual void accept() override;
33#endif
34 void done(int result) override;
35
36 void setOption(PrintDialogOption option, bool on = true);
37 bool testOption(PrintDialogOption option) const;
38 void setOptions(PrintDialogOptions options);
39 PrintDialogOptions options() const;
40
41#if defined(Q_OS_UNIX) || defined(Q_OS_WIN)
42 void setVisible(bool visible) override;
43#endif
44
45 using QDialog::open;
46 void open(QObject *receiver, const char *member);
47
48#ifdef Q_QDOC
49 QPrinter *printer();
50#endif
51
53
55 void accepted(QPrinter *printer);
56
57private:
58#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC)
59 Q_PRIVATE_SLOT(d_func(), void _q_togglePageSetCombo(bool))
60 Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
61#if QT_CONFIG(messagebox)
62 Q_PRIVATE_SLOT(d_func(), void _q_checkFields())
63#endif // QT_CONFIG(messagebox)
64 friend class QUnixPrintWidget;
65# endif // Q_OS_UNIX
66};
67
69
70#endif // QPRINTDIALOG_H
The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure pri...
PrintDialogOption
Used to specify which parts of the print dialog should be visible.
void accepted()
virtual void open()
Definition qdialog.cpp:503
\inmodule QtCore
Definition qobject.h:103
The QPrintDialog class provides a dialog for specifying the printer's configuration.
void accepted(QPrinter *printer)
This signal is emitted when the user accepts the values set in the print dialog.
\reentrant
Definition qprinter.h:28
The QPushButton widget provides a command button.
Definition qpushbutton.h:20
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
Combined button and popup list for selecting options.
GLuint64EXT * result
[6]
GLuint GLenum option
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_PRIVATE_SLOT(d, signature)
#define Q_SIGNALS
#define explicit
file open(QIODevice::ReadOnly)
dialog exec()