10#include <QtCore/qdebug.h>
12#include <qpa/qplatformprintplugin.h>
13#include <qpa/qplatformprintersupport.h>
24 if (
d != &*shared_null)
86 if (
pi.d_ptr.data() == shared_null)
87 d_ptr.
reset(shared_null);
115 if (
other.d_ptr.data() == shared_null)
116 d_ptr.
reset(shared_null);
133 return d->m_printDevice.id();
145 return d->m_printDevice.name();
156 return d->m_printDevice.location();
167 return d->m_printDevice.makeAndModel();
179 return d == shared_null || !
d->m_printDevice.isValid();
188 return d->m_printDevice.isDefault();
199 return d->m_printDevice.isRemote();
225 return d->m_printDevice.supportedPageSizes();
237 return d->m_printDevice.defaultPageSize();
249 return d->m_printDevice.supportsCustomPageSizes();
289 return d->m_printDevice.supportedResolutions();
387 for (
const QString &
id : availablePrintDeviceIds)
442# ifndef QT_NO_DEBUG_STREAM
447 debug <<
"QPrinterInfo(";
451 p.d_ptr->m_printDevice.format(
debug);
void reserve(qsizetype size)
void append(parameter_type t)
static void cleanup(QPrinterInfoPrivate *d)
QPrinterInfoPrivate(const QString &id=QString())
QPrintDevice m_printDevice
The QPrinterInfo class gives access to information about existing printers.
QPrinter::DuplexMode defaultDuplexMode() const
Returns the default duplex mode of this printer.
static QList< QPrinterInfo > availablePrinters()
Returns a list of QPrinterInfo objects for all the available printers on this system.
QPrinter::ColorMode defaultColorMode() const
Returns the default color mode of this printer.
QPageSize maximumPhysicalPageSize() const
Returns the maximum physical page size supported by this printer.
QPrinterInfo & operator=(const QPrinterInfo &other)
Sets the QPrinterInfo object to be equal to other.
QString location() const
Returns the human-readable location of the printer.
QPageSize defaultPageSize() const
Returns the current default Page Size for this printer.
~QPrinterInfo()
Destroys the QPrinterInfo object.
QList< QPageSize > supportedPageSizes() const
Returns a list of Page Sizes supported by this printer.
QString description() const
Returns the human-readable description of the printer.
QList< QPrinter::DuplexMode > supportedDuplexModes() const
Returns a list of duplex modes supported by this printer.
bool isNull() const
Returns whether this QPrinterInfo object holds a printer definition.
bool supportsCustomPageSizes() const
Returns whether this printer supports custom page sizes.
static QString defaultPrinterName()
Returns the current default printer name.
bool isRemote() const
Returns whether this printer is a remote network printer.
bool isDefault() const
Returns whether this printer is currently the default printer.
QString makeAndModel() const
Returns the human-readable make and model of the printer.
QPrinter::PrinterState state() const
Returns the current state of this printer.
QList< QPrinter::ColorMode > supportedColorModes() const
Returns the supported color modes of this printer.
QString printerName() const
Returns the name of the printer.
static QStringList availablePrinterNames()
Returns a list of all the available Printer Names on this system.
QPageSize minimumPhysicalPageSize() const
Returns the minimum physical page size supported by this printer.
static QPrinterInfo defaultPrinter()
Returns the default printer on the system.
QPrinterInfo()
Constructs an empty QPrinterInfo object.
QList< int > supportedResolutions() const
Returns a list of resolutions supported by this printer.
static QPrinterInfo printerInfo(const QString &printerName)
Returns the printer printerName.
ColorMode
This enum type is used to indicate whether QPrinter should print in color or not.
PrinterState
\value Idle \value Active \value Aborted \value Error
QString printerName() const
Returns the printer name.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QDebug operator<<(QDebug debug, const QPrinterInfo &p)