Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtPrintSupport/qabstractprintdialog.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 
0004 #ifndef QABSTRACTPRINTDIALOG_H
0005 #define QABSTRACTPRINTDIALOG_H
0006 
0007 #include <QtPrintSupport/qtprintsupportglobal.h>
0008 
0009 #include <QtWidgets/qdialog.h>
0010 
0011 QT_REQUIRE_CONFIG(printdialog);
0012 
0013 QT_BEGIN_NAMESPACE
0014 
0015 class QAbstractPrintDialogPrivate;
0016 class QPrinter;
0017 
0018 class Q_PRINTSUPPORT_EXPORT QAbstractPrintDialog : public QDialog
0019 {
0020     Q_DECLARE_PRIVATE(QAbstractPrintDialog)
0021     Q_OBJECT
0022 
0023 public:
0024     // Keep in sync with QPrinter::PrintRange
0025     enum PrintRange {
0026         AllPages,
0027         Selection,
0028         PageRange,
0029         CurrentPage
0030     };
0031 
0032     enum PrintDialogOption {
0033         PrintToFile             = 0x0001,
0034         PrintSelection          = 0x0002,
0035         PrintPageRange          = 0x0004,
0036         PrintShowPageSize       = 0x0008,
0037         PrintCollateCopies      = 0x0010,
0038         PrintCurrentPage        = 0x0040
0039     };
0040     Q_ENUM(PrintDialogOption)
0041 
0042     Q_DECLARE_FLAGS(PrintDialogOptions, PrintDialogOption)
0043     Q_FLAG(PrintDialogOptions)
0044 
0045     explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
0046     ~QAbstractPrintDialog();
0047 
0048     void setOptionTabs(const QList<QWidget*> &tabs);
0049 
0050     void setPrintRange(PrintRange range);
0051     PrintRange printRange() const;
0052 
0053     void setMinMax(int min, int max);
0054     int minPage() const;
0055     int maxPage() const;
0056 
0057     void setFromTo(int fromPage, int toPage);
0058     int fromPage() const;
0059     int toPage() const;
0060 
0061     QPrinter *printer() const;
0062 
0063 protected:
0064     QAbstractPrintDialog(QAbstractPrintDialogPrivate &ptr, QPrinter *printer, QWidget *parent = nullptr);
0065 
0066 private:
0067     Q_DISABLE_COPY(QAbstractPrintDialog)
0068 
0069 };
0070 
0071 Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractPrintDialog::PrintDialogOptions)
0072 
0073 QT_END_NAMESPACE
0074 
0075 #endif // QABSTRACTPRINTDIALOG_H