Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:22:50

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 // Qt-Security score:significant reason:default
0004 
0005 #ifndef QPRINTDIALOG_H
0006 #define QPRINTDIALOG_H
0007 
0008 #include <QtPrintSupport/qtprintsupportglobal.h>
0009 
0010 #include <QtPrintSupport/qabstractprintdialog.h>
0011 
0012 QT_REQUIRE_CONFIG(printdialog);
0013 
0014 QT_BEGIN_NAMESPACE
0015 
0016 class QPrintDialogPrivate;
0017 class QPushButton;
0018 class QPrinter;
0019 
0020 class Q_PRINTSUPPORT_EXPORT QPrintDialog : public QAbstractPrintDialog
0021 {
0022     Q_OBJECT
0023     Q_DECLARE_PRIVATE(QPrintDialog)
0024     Q_PROPERTY(PrintDialogOptions options READ options WRITE setOptions)
0025 
0026 public:
0027     explicit QPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
0028     explicit QPrintDialog(QWidget *parent = nullptr);
0029     ~QPrintDialog();
0030 
0031     int exec() override;
0032 #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
0033     virtual void accept() override;
0034 #endif
0035     void done(int result) override;
0036 
0037     void setOption(PrintDialogOption option, bool on = true);
0038     bool testOption(PrintDialogOption option) const;
0039     void setOptions(PrintDialogOptions options);
0040     PrintDialogOptions options() const;
0041 
0042 #if defined(Q_OS_UNIX) || defined(Q_OS_WIN)
0043     void setVisible(bool visible) override;
0044 #endif
0045 
0046     using QDialog::open;
0047     void open(QObject *receiver, const char *member);
0048 
0049 #ifdef Q_QDOC
0050     QPrinter *printer();
0051 #endif
0052 
0053     using QDialog::accepted;
0054 
0055 Q_SIGNALS:
0056     void accepted(QPrinter *printer);
0057 
0058 private:
0059 #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
0060     Q_PRIVATE_SLOT(d_func(), void _q_togglePageSetCombo(bool))
0061     Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
0062 #if QT_CONFIG(messagebox)
0063     Q_PRIVATE_SLOT(d_func(), void _q_checkFields())
0064 #endif // QT_CONFIG(messagebox)
0065     friend class QUnixPrintWidget;
0066 # endif // Q_OS_UNIX
0067 };
0068 
0069 QT_END_NAMESPACE
0070 
0071 #endif // QPRINTDIALOG_H