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
QWindowsPrintDevice Class Reference

#include <qwindowsprintdevice_p.h>

+ Inheritance diagram for QWindowsPrintDevice:
+ Collaboration diagram for QWindowsPrintDevice:

Public Member Functions

 QWindowsPrintDevice ()
 
 QWindowsPrintDevice (const QString &id)
 
virtual ~QWindowsPrintDevice ()
 
bool isValid () const override
 
bool isDefault () const override
 
QPrint::DeviceState state () const override
 
QPageSize defaultPageSize () const override
 
QMarginsF printableMargins (const QPageSize &pageSize, QPageLayout::Orientation orientation, int resolution) const override
 
int defaultResolution () const override
 
QPrint::InputSlot defaultInputSlot () const override
 
QPrint::DuplexMode defaultDuplexMode () const override
 
QPrint::ColorMode defaultColorMode () const override
 
bool supportsCollateCopies () const override
 
bool supportsMultipleCopies () const override
 
bool supportsCustomPageSizes () const override
 
QSize minimumPhysicalPageSize () const override
 
QSize maximumPhysicalPageSize () const override
 
- Public Member Functions inherited from QPlatformPrintDevice
 QPlatformPrintDevice (const QString &id=QString())
 
virtual ~QPlatformPrintDevice ()
 
virtual QString id () const
 
virtual QString name () const
 
virtual QString location () const
 
virtual QString makeAndModel () const
 
virtual bool isRemote () const
 
virtual bool isValidPageLayout (const QPageLayout &layout, int resolution) const
 
virtual QList< QPageSizesupportedPageSizes () const
 
virtual QPageSize supportedPageSize (const QPageSize &pageSize) const
 
virtual QPageSize supportedPageSize (QPageSize::PageSizeId pageSizeId) const
 
virtual QPageSize supportedPageSize (const QString &pageName) const
 
virtual QPageSize supportedPageSize (const QSize &pointSize) const
 
virtual QPageSize supportedPageSize (const QSizeF &size, QPageSize::Unit units) const
 
virtual QList< int > supportedResolutions () const
 
virtual QList< QPrint::InputSlotsupportedInputSlots () const
 
virtual QPrint::OutputBin defaultOutputBin () const
 
virtual QList< QPrint::OutputBinsupportedOutputBins () const
 
virtual QList< QPrint::DuplexModesupportedDuplexModes () const
 
virtual QList< QPrint::ColorModesupportedColorModes () const
 
virtual QVariant property (QPrintDevice::PrintDevicePropertyKey key) const
 
virtual bool setProperty (QPrintDevice::PrintDevicePropertyKey key, const QVariant &value)
 
virtual bool isFeatureAvailable (QPrintDevice::PrintDevicePropertyKey key, const QVariant &params) const
 

Static Public Member Functions

static QStringList availablePrintDeviceIds ()
 
static QString defaultPrintDeviceId ()
 
- Static Public Member Functions inherited from QPlatformPrintDevice
static QPageSize createPageSize (const QString &key, const QSize &size, const QString &localizedName)
 
static QPageSize createPageSize (int windowsId, const QSize &size, const QString &localizedName)
 

Protected Member Functions

void loadPageSizes () const override
 
void loadResolutions () const override
 
void loadInputSlots () const override
 
void loadOutputBins () const override
 
void loadDuplexModes () const override
 
void loadColorModes () const override
 
void loadCopiesSupport () const
 
void loadMinMaxPageSizes () const
 
- Protected Member Functions inherited from QPlatformPrintDevice
QPageSize supportedPageSizeMatch (const QPageSize &pageSize) const
 

Additional Inherited Members

- Protected Attributes inherited from QPlatformPrintDevice
QString m_id
 
QString m_name
 
QString m_location
 
QString m_makeAndModel
 
bool m_isRemote
 
bool m_supportsMultipleCopies
 
bool m_supportsCollateCopies
 
bool m_havePageSizes
 
QList< QPageSizem_pageSizes
 
bool m_supportsCustomPageSizes
 
QSize m_minimumPhysicalPageSize
 
QSize m_maximumPhysicalPageSize
 
bool m_haveResolutions
 
QList< int > m_resolutions
 
bool m_haveInputSlots
 
QList< QPrint::InputSlotm_inputSlots
 
bool m_haveOutputBins
 
QList< QPrint::OutputBinm_outputBins
 
bool m_haveDuplexModes
 
QList< QPrint::DuplexModem_duplexModes
 
bool m_haveColorModes
 
QList< QPrint::ColorModem_colorModes
 

Detailed Description

Definition at line 64 of file qwindowsprintdevice_p.h.

Constructor & Destructor Documentation

◆ QWindowsPrintDevice() [1/2]

QWindowsPrintDevice::QWindowsPrintDevice ( )

Definition at line 47 of file qwindowsprintdevice.cpp.

◆ QWindowsPrintDevice() [2/2]

QWindowsPrintDevice::QWindowsPrintDevice ( const QString & id)
explicit

Definition at line 53 of file qwindowsprintdevice.cpp.

References availablePrintDeviceIds(), contains(), QString::fromWCharArray(), info, QPlatformPrintDevice::m_colorModes, QWindowsPrinterInfo::m_colorModes, QPlatformPrintDevice::m_duplexModes, QWindowsPrinterInfo::m_duplexModes, QPlatformPrintDevice::m_haveColorModes, QWindowsPrinterInfo::m_haveColorModes, QWindowsPrinterInfo::m_haveCopies, QPlatformPrintDevice::m_haveDuplexModes, QWindowsPrinterInfo::m_haveDuplexModes, QPlatformPrintDevice::m_haveInputSlots, QWindowsPrinterInfo::m_haveInputSlots, QWindowsPrinterInfo::m_haveMinMaxPageSizes, QPlatformPrintDevice::m_haveOutputBins, QWindowsPrinterInfo::m_haveOutputBins, QPlatformPrintDevice::m_havePageSizes, QWindowsPrinterInfo::m_havePageSizes, QPlatformPrintDevice::m_haveResolutions, QWindowsPrinterInfo::m_haveResolutions, QPlatformPrintDevice::m_id, QWindowsPrinterInfo::m_id, QPlatformPrintDevice::m_inputSlots, QWindowsPrinterInfo::m_inputSlots, QPlatformPrintDevice::m_isRemote, QWindowsPrinterInfo::m_isRemote, QPlatformPrintDevice::m_location, QWindowsPrinterInfo::m_location, QPlatformPrintDevice::m_makeAndModel, QWindowsPrinterInfo::m_makeAndModel, QPlatformPrintDevice::m_maximumPhysicalPageSize, QWindowsPrinterInfo::m_maximumPhysicalPageSize, QPlatformPrintDevice::m_minimumPhysicalPageSize, QWindowsPrinterInfo::m_minimumPhysicalPageSize, QPlatformPrintDevice::m_name, QWindowsPrinterInfo::m_name, QPlatformPrintDevice::m_outputBins, QWindowsPrinterInfo::m_outputBins, QPlatformPrintDevice::m_pageSizes, QWindowsPrinterInfo::m_pageSizes, QPlatformPrintDevice::m_resolutions, QWindowsPrinterInfo::m_resolutions, QPlatformPrintDevice::m_supportsCollateCopies, QWindowsPrinterInfo::m_supportsCollateCopies, QPlatformPrintDevice::m_supportsCustomPageSizes, QWindowsPrinterInfo::m_supportsCustomPageSizes, QPlatformPrintDevice::m_supportsMultipleCopies, and QWindowsPrinterInfo::m_supportsMultipleCopies.

+ Here is the call graph for this function:

◆ ~QWindowsPrintDevice()

QWindowsPrintDevice::~QWindowsPrintDevice ( )
virtual

Definition at line 107 of file qwindowsprintdevice.cpp.

Member Function Documentation

◆ availablePrintDeviceIds()

QStringList QWindowsPrintDevice::availablePrintDeviceIds ( )
static

Definition at line 426 of file qwindowsprintdevice.cpp.

References QList< T >::append(), QString::fromWCharArray(), i, and list.

Referenced by QWindowsPrintDevice(), and QWindowsPrinterSupport::availablePrintDeviceIds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultColorMode()

QPrint::ColorMode QWindowsPrintDevice::defaultColorMode ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 407 of file qwindowsprintdevice.cpp.

References QPrint::Color, QListSpecialMethodsBase< T >::contains(), getDevmode(), QPrint::GrayScale, loadColorModes(), QPlatformPrintDevice::m_colorModes, QPlatformPrintDevice::m_haveColorModes, and QPlatformPrintDevice::m_id.

+ Here is the call graph for this function:

◆ defaultDuplexMode()

QPrint::DuplexMode QWindowsPrintDevice::defaultDuplexMode ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 377 of file qwindowsprintdevice.cpp.

References QPrint::DuplexLongSide, QPrint::DuplexNone, QPrint::DuplexShortSide, getDevmode(), and QPlatformPrintDevice::m_id.

+ Here is the call graph for this function:

◆ defaultInputSlot()

QPrint::InputSlot QWindowsPrintDevice::defaultInputSlot ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 329 of file qwindowsprintdevice.cpp.

References QPlatformPrintDevice::defaultInputSlot(), getDevmode(), QPlatformPrintDevice::m_id, QPrintUtils::paperBinToInputSlot(), and QPlatformPrintDevice::supportedInputSlots().

+ Here is the call graph for this function:

◆ defaultPageSize()

QPageSize QWindowsPrintDevice::defaultPageSize ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 184 of file qwindowsprintdevice.cpp.

References getDevmode(), loadPageSizes(), QPlatformPrintDevice::m_havePageSizes, QPlatformPrintDevice::m_id, and QPlatformPrintDevice::m_pageSizes.

+ Here is the call graph for this function:

◆ defaultPrintDeviceId()

QString QWindowsPrintDevice::defaultPrintDeviceId ( )
static

Definition at line 445 of file qwindowsprintdevice.cpp.

References QString::fromWCharArray(), and QPlatformPrintDevice::name().

Referenced by QWindowsPrinterSupport::defaultPrintDeviceId(), and isDefault().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultResolution()

int QWindowsPrintDevice::defaultResolution ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 280 of file qwindowsprintdevice.cpp.

References getDevmode(), and QPlatformPrintDevice::m_id.

+ Here is the call graph for this function:

◆ isDefault()

bool QWindowsPrintDevice::isDefault ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 117 of file qwindowsprintdevice.cpp.

References defaultPrintDeviceId(), and QPlatformPrintDevice::m_id.

+ Here is the call graph for this function:

◆ isValid()

bool QWindowsPrintDevice::isValid ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 112 of file qwindowsprintdevice.cpp.

◆ loadColorModes()

void QWindowsPrintDevice::loadColorModes ( ) const
overrideprotectedvirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 395 of file qwindowsprintdevice.cpp.

References QList< T >::append(), QPrint::Color, QPrint::GrayScale, info, QPlatformPrintDevice::m_colorModes, and QPlatformPrintDevice::m_haveColorModes.

Referenced by defaultColorMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadCopiesSupport()

void QWindowsPrintDevice::loadCopiesSupport ( ) const
protected

Definition at line 456 of file qwindowsprintdevice.cpp.

References DC_COLLATE, info, QPlatformPrintDevice::m_supportsCollateCopies, and QPlatformPrintDevice::m_supportsMultipleCopies.

Referenced by supportsCollateCopies(), and supportsMultipleCopies().

+ Here is the caller graph for this function:

◆ loadDuplexModes()

void QWindowsPrintDevice::loadDuplexModes ( ) const
overrideprotectedvirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 361 of file qwindowsprintdevice.cpp.

References QList< T >::append(), QPrint::DuplexAuto, QPrint::DuplexLongSide, QPrint::DuplexNone, QPrint::DuplexShortSide, info, QPlatformPrintDevice::m_duplexModes, and QPlatformPrintDevice::m_haveDuplexModes.

+ Here is the call graph for this function:

◆ loadInputSlots()

void QWindowsPrintDevice::loadInputSlots ( ) const
overrideprotectedvirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 298 of file qwindowsprintdevice.cpp.

References QList< T >::append(), QString::fromWCharArray(), i, info, QPlatformPrintDevice::m_haveInputSlots, QPlatformPrintDevice::m_inputSlots, QPrintUtils::paperBinToInputSlot(), and qwcsnlen().

+ Here is the call graph for this function:

◆ loadMinMaxPageSizes()

void QWindowsPrintDevice::loadMinMaxPageSizes ( ) const
protected

Definition at line 503 of file qwindowsprintdevice.cpp.

References QSize::height(), info, QPlatformPrintDevice::m_maximumPhysicalPageSize, QPlatformPrintDevice::m_minimumPhysicalPageSize, QPlatformPrintDevice::m_supportsCollateCopies, QPlatformPrintDevice::m_supportsCustomPageSizes, QPlatformPrintDevice::m_supportsMultipleCopies, QPageLayout::Millimeter, qt_pointMultiplier(), and QSize::width().

Referenced by maximumPhysicalPageSize(), minimumPhysicalPageSize(), and supportsCustomPageSizes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadOutputBins()

void QWindowsPrintDevice::loadOutputBins ( ) const
overrideprotectedvirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 352 of file qwindowsprintdevice.cpp.

References QList< T >::append(), QPlatformPrintDevice::defaultOutputBin(), info, QPlatformPrintDevice::m_haveOutputBins, and QPlatformPrintDevice::m_outputBins.

+ Here is the call graph for this function:

◆ loadPageSizes()

void QWindowsPrintDevice::loadPageSizes ( ) const
overrideprotectedvirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 148 of file qwindowsprintdevice.cpp.

References QList< T >::append(), QPlatformPrintDevice::createPageSize(), QString::fromWCharArray(), i, info, QPlatformPrintDevice::m_havePageSizes, QPlatformPrintDevice::m_pageSizes, QPageLayout::Millimeter, qRound(), qt_pointMultiplier(), and qwcsnlen().

Referenced by defaultPageSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadResolutions()

void QWindowsPrintDevice::loadResolutions ( ) const
overrideprotectedvirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 262 of file qwindowsprintdevice.cpp.

References QList< T >::append(), i, info, QPlatformPrintDevice::m_haveResolutions, and QPlatformPrintDevice::m_resolutions.

+ Here is the call graph for this function:

◆ maximumPhysicalPageSize()

QSize QWindowsPrintDevice::maximumPhysicalPageSize ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 496 of file qwindowsprintdevice.cpp.

References loadMinMaxPageSizes(), and QPlatformPrintDevice::m_maximumPhysicalPageSize.

+ Here is the call graph for this function:

◆ minimumPhysicalPageSize()

QSize QWindowsPrintDevice::minimumPhysicalPageSize ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 489 of file qwindowsprintdevice.cpp.

References loadMinMaxPageSizes(), and QPlatformPrintDevice::m_minimumPhysicalPageSize.

+ Here is the call graph for this function:

◆ printableMargins()

QMarginsF QWindowsPrintDevice::printableMargins ( const QPageSize & pageSize,
QPageLayout::Orientation orientation,
int resolution ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 209 of file qwindowsprintdevice.cpp.

References QPageSize::Custom, DMPAPER_LAST, getDevmode(), QSizeF::height(), QPageSize::id(), info, QPlatformPrintDevice::m_id, QPageSize::Millimeter, QPageLayout::Portrait, QPageSize::size(), QSizeF::width(), and QPageSize::windowsId().

+ Here is the call graph for this function:

◆ state()

QPrint::DeviceState QWindowsPrintDevice::state ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 122 of file qwindowsprintdevice.cpp.

References QPrint::Active, QPrint::Error, QPrint::Idle, and info.

◆ supportsCollateCopies()

bool QWindowsPrintDevice::supportsCollateCopies ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 468 of file qwindowsprintdevice.cpp.

References loadCopiesSupport(), and QPlatformPrintDevice::m_supportsCollateCopies.

+ Here is the call graph for this function:

◆ supportsCustomPageSizes()

bool QWindowsPrintDevice::supportsCustomPageSizes ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 482 of file qwindowsprintdevice.cpp.

References loadMinMaxPageSizes(), and QPlatformPrintDevice::m_supportsCustomPageSizes.

+ Here is the call graph for this function:

◆ supportsMultipleCopies()

bool QWindowsPrintDevice::supportsMultipleCopies ( ) const
overridevirtual

Reimplemented from QPlatformPrintDevice.

Definition at line 475 of file qwindowsprintdevice.cpp.

References loadCopiesSupport(), and QPlatformPrintDevice::m_supportsMultipleCopies.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: