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
qprinterinfo.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 QPRINTERINFO_H
5#define QPRINTERINFO_H
6
7#include <QtPrintSupport/qtprintsupportglobal.h>
8#include <QtPrintSupport/qprinter.h>
9
10#include <QtCore/QList>
11#include <QtGui/qpagesize.h>
12
14
15
16#ifndef QT_NO_PRINTER
19class QDebug;
20class Q_PRINTSUPPORT_EXPORT QPrinterInfo
21{
22public:
25 explicit QPrinterInfo(const QPrinter &printer);
27
28 QPrinterInfo &operator=(const QPrinterInfo &other);
29
30 QString printerName() const;
31 QString description() const;
32 QString location() const;
33 QString makeAndModel() const;
34
35 bool isNull() const;
36 bool isDefault() const;
37 bool isRemote() const;
38
40
41 QList<QPageSize> supportedPageSizes() const;
42 QPageSize defaultPageSize() const;
43
44 bool supportsCustomPageSizes() const;
45
46 QPageSize minimumPhysicalPageSize() const;
47 QPageSize maximumPhysicalPageSize() const;
48
49 QList<int> supportedResolutions() const;
50
51 QPrinter::DuplexMode defaultDuplexMode() const;
52 QList<QPrinter::DuplexMode> supportedDuplexModes() const;
53
54 QPrinter::ColorMode defaultColorMode() const;
55 QList<QPrinter::ColorMode> supportedColorModes() const;
56
57 static QStringList availablePrinterNames();
58 static QList<QPrinterInfo> availablePrinters();
59
60 static QString defaultPrinterName();
61 static QPrinterInfo defaultPrinter();
62
63 static QPrinterInfo printerInfo(const QString &printerName);
64
65private:
66 explicit QPrinterInfo(const QString &name);
67
68private:
70# ifndef QT_NO_DEBUG_STREAM
71 friend Q_PRINTSUPPORT_EXPORT QDebug operator<<(QDebug debug, const QPrinterInfo &);
72# endif
73 Q_DECLARE_PRIVATE(QPrinterInfo)
74 QScopedPointer<QPrinterInfoPrivate, QPrinterInfoPrivateDeleter> d_ptr;
75};
76
77#endif // QT_NO_PRINTER
78
80
81#endif // QPRINTERINFO_H
\inmodule QtCore
\inmodule QtGui
Definition qpagesize.h:22
The QPlatformPrinterSupport class provides an abstraction for print support.
The QPrinterInfo class gives access to information about existing printers.
\reentrant
Definition qprinter.h:28
ColorMode
This enum type is used to indicate whether QPrinter should print in color or not.
Definition qprinter.h:42
PrinterState
\value Idle \value Active \value Aborted \value Error
Definition qprinter.h:64
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
else opt state
[0]
Combined button and popup list for selecting options.
GLint location
GLuint name
QDataStream & operator<<(QDataStream &out, const MyClass &myObj)
[4]
QSharedPointer< T > other(t)
[5]