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
qabstractprintdialog.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 QABSTRACTPRINTDIALOG_H
5#define QABSTRACTPRINTDIALOG_H
6
7#include <QtPrintSupport/qtprintsupportglobal.h>
8
9#include <QtWidgets/qdialog.h>
10
11QT_REQUIRE_CONFIG(printdialog);
12
14
16class QPrinter;
17
18class Q_PRINTSUPPORT_EXPORT QAbstractPrintDialog : public QDialog
19{
20 Q_DECLARE_PRIVATE(QAbstractPrintDialog)
22
23public:
24 // Keep in sync with QPrinter::PrintRange
31
33 PrintToFile = 0x0001,
34 PrintSelection = 0x0002,
35 PrintPageRange = 0x0004,
36 PrintShowPageSize = 0x0008,
37 PrintCollateCopies = 0x0010,
38 PrintCurrentPage = 0x0040
39 };
40 Q_ENUM(PrintDialogOption)
41
42 Q_DECLARE_FLAGS(PrintDialogOptions, PrintDialogOption)
43 Q_FLAG(PrintDialogOptions)
44
45 explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
47
48 void setOptionTabs(const QList<QWidget*> &tabs);
49
50 void setPrintRange(PrintRange range);
51 PrintRange printRange() const;
52
53 void setMinMax(int min, int max);
54 int minPage() const;
55 int maxPage() const;
56
57 void setFromTo(int fromPage, int toPage);
58 int fromPage() const;
59 int toPage() const;
60
61 QPrinter *printer() const;
62
63protected:
65
66private:
67 Q_DISABLE_COPY(QAbstractPrintDialog)
68
69};
70
71Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractPrintDialog::PrintDialogOptions)
72
74
75#endif // QABSTRACTPRINTDIALOG_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.
PrintRange
Used to specify the print range selection option.
The QDialog class is the base class of dialog windows.
Definition qdialog.h:19
\reentrant
Definition qprinter.h:28
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
static ControlElement< T > * ptr(QWidget *widget)
GLsizei range
#define QT_REQUIRE_CONFIG(feature)
#define Q_ENUM(x)
#define Q_OBJECT
#define Q_FLAG(x)