Qt 6.x
The Qt SDK
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 <QtCore/QPair>
12#include <QtGui/qpagesize.h>
13
15
16
17#ifndef QT_NO_PRINTER
20class QDebug;
21class Q_PRINTSUPPORT_EXPORT QPrinterInfo
22{
23public:
26 explicit QPrinterInfo(const QPrinter &printer);
28
29 QPrinterInfo &operator=(const QPrinterInfo &other);
30
31 QString printerName() const;
32 QString description() const;
33 QString location() const;
34 QString makeAndModel() const;
35
36 bool isNull() const;
37 bool isDefault() const;
38 bool isRemote() const;
39
41
42 QList<QPageSize> supportedPageSizes() const;
43 QPageSize defaultPageSize() const;
44
45 bool supportsCustomPageSizes() const;
46
47 QPageSize minimumPhysicalPageSize() const;
48 QPageSize maximumPhysicalPageSize() const;
49
50 QList<int> supportedResolutions() const;
51
52 QPrinter::DuplexMode defaultDuplexMode() const;
53 QList<QPrinter::DuplexMode> supportedDuplexModes() const;
54
55 QPrinter::ColorMode defaultColorMode() const;
56 QList<QPrinter::ColorMode> supportedColorModes() const;
57
58 static QStringList availablePrinterNames();
59 static QList<QPrinterInfo> availablePrinters();
60
61 static QString defaultPrinterName();
62 static QPrinterInfo defaultPrinter();
63
64 static QPrinterInfo printerInfo(const QString &printerName);
65
66private:
67 explicit QPrinterInfo(const QString &name);
68
69private:
71# ifndef QT_NO_DEBUG_STREAM
72 friend Q_PRINTSUPPORT_EXPORT QDebug operator<<(QDebug debug, const QPrinterInfo &);
73# endif
74 Q_DECLARE_PRIVATE(QPrinterInfo)
76};
77
78#endif // QT_NO_PRINTER
79
81
82#endif // QPRINTERINFO_H
\inmodule QtCore
Definition qlist.h:74
\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
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
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]