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

#include <qplatformprintdevice.h>

+ Inheritance diagram for QPlatformPrintDevice:
+ Collaboration diagram for QPlatformPrintDevice:

Public Member Functions

 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 isValid () const
 
virtual bool isDefault () const
 
virtual bool isRemote () const
 
virtual QPrint::DeviceState state () const
 
virtual bool isValidPageLayout (const QPageLayout &layout, int resolution) const
 
virtual bool supportsMultipleCopies () const
 
virtual bool supportsCollateCopies () const
 
virtual QPageSize defaultPageSize () 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 bool supportsCustomPageSizes () const
 
virtual QSize minimumPhysicalPageSize () const
 
virtual QSize maximumPhysicalPageSize () const
 
virtual QMarginsF printableMargins (const QPageSize &pageSize, QPageLayout::Orientation orientation, int resolution) const
 
virtual int defaultResolution () const
 
virtual QList< int > supportedResolutions () const
 
virtual QPrint::InputSlot defaultInputSlot () const
 
virtual QList< QPrint::InputSlotsupportedInputSlots () const
 
virtual QPrint::OutputBin defaultOutputBin () const
 
virtual QList< QPrint::OutputBinsupportedOutputBins () const
 
virtual QPrint::DuplexMode defaultDuplexMode () const
 
virtual QList< QPrint::DuplexModesupportedDuplexModes () const
 
virtual QPrint::ColorMode defaultColorMode () 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 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

virtual void loadPageSizes () const
 
virtual void loadResolutions () const
 
virtual void loadInputSlots () const
 
virtual void loadOutputBins () const
 
virtual void loadDuplexModes () const
 
virtual void loadColorModes () const
 
QPageSize supportedPageSizeMatch (const QPageSize &pageSize) const
 

Protected Attributes

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 35 of file qplatformprintdevice.h.

Constructor & Destructor Documentation

◆ QPlatformPrintDevice()

QT_BEGIN_NAMESPACE QPlatformPrintDevice::QPlatformPrintDevice ( const QString & id = QString())
explicit

Definition at line 15 of file qplatformprintdevice.cpp.

◆ ~QPlatformPrintDevice()

QPlatformPrintDevice::~QPlatformPrintDevice ( )
virtual

Definition at line 33 of file qplatformprintdevice.cpp.

Member Function Documentation

◆ createPageSize() [1/2]

QPageSize QPlatformPrintDevice::createPageSize ( const QString & key,
const QSize & size,
const QString & localizedName )
static

Definition at line 362 of file qplatformprintdevice.cpp.

Referenced by QPpdPrintDevice::defaultPageSize(), QPpdPrintDevice::loadPageSizes(), and QWindowsPrintDevice::loadPageSizes().

+ Here is the caller graph for this function:

◆ createPageSize() [2/2]

QPageSize QPlatformPrintDevice::createPageSize ( int windowsId,
const QSize & size,
const QString & localizedName )
static

Definition at line 367 of file qplatformprintdevice.cpp.

◆ defaultColorMode()

QPrint::ColorMode QPlatformPrintDevice::defaultColorMode ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 312 of file qplatformprintdevice.cpp.

References QPrint::GrayScale.

Referenced by QPrintDevice::defaultColorMode().

+ Here is the caller graph for this function:

◆ defaultDuplexMode()

QPrint::DuplexMode QPlatformPrintDevice::defaultDuplexMode ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 296 of file qplatformprintdevice.cpp.

References QPrint::DuplexNone.

Referenced by QPrintDevice::defaultDuplexMode().

+ Here is the caller graph for this function:

◆ defaultInputSlot()

QPrint::InputSlot QPlatformPrintDevice::defaultInputSlot ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 256 of file qplatformprintdevice.cpp.

References QPrint::Auto, QPrint::InputSlot::key, QByteArrayLiteral, and QCoreApplication::translate().

Referenced by QPrintDevice::defaultInputSlot(), QPpdPrintDevice::defaultInputSlot(), QCocoaPrintDevice::defaultInputSlot(), QWindowsPrintDevice::defaultInputSlot(), QPpdPrintDevice::loadInputSlots(), and QCocoaPrintDevice::loadInputSlots().

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

◆ defaultOutputBin()

QPrint::OutputBin QPlatformPrintDevice::defaultOutputBin ( ) const
virtual

Reimplemented in QPpdPrintDevice, and QCocoaPrintDevice.

Definition at line 276 of file qplatformprintdevice.cpp.

References QPrint::AutoOutputBin, output, QByteArrayLiteral, and QCoreApplication::translate().

Referenced by QPrintDevice::defaultOutputBin(), QPpdPrintDevice::defaultOutputBin(), QCocoaPrintDevice::defaultOutputBin(), QPpdPrintDevice::loadOutputBins(), QCocoaPrintDevice::loadOutputBins(), and QWindowsPrintDevice::loadOutputBins().

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

◆ defaultPageSize()

QPageSize QPlatformPrintDevice::defaultPageSize ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 110 of file qplatformprintdevice.cpp.

Referenced by QPrintDevice::defaultPageSize().

+ Here is the caller graph for this function:

◆ defaultResolution()

int QPlatformPrintDevice::defaultResolution ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 240 of file qplatformprintdevice.cpp.

Referenced by QPrintDevice::defaultResolution().

+ Here is the caller graph for this function:

◆ id()

QString QPlatformPrintDevice::id ( ) const
virtual

Definition at line 37 of file qplatformprintdevice.cpp.

References m_id.

Referenced by QPrintDevice::id(), QPpdPrintDevice::isDefault(), and QPrintDevice::operator==().

+ Here is the caller graph for this function:

◆ isDefault()

bool QPlatformPrintDevice::isDefault ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 62 of file qplatformprintdevice.cpp.

Referenced by QPrintDevice::isDefault().

+ Here is the caller graph for this function:

◆ isFeatureAvailable()

bool QPlatformPrintDevice::isFeatureAvailable ( QPrintDevice::PrintDevicePropertyKey key,
const QVariant & params ) const
virtual

Reimplemented in QPpdPrintDevice.

Definition at line 345 of file qplatformprintdevice.cpp.

References Q_UNUSED.

Referenced by QPrintDevice::isFeatureAvailable(), and QPpdPrintDevice::isFeatureAvailable().

+ Here is the caller graph for this function:

◆ isRemote()

bool QPlatformPrintDevice::isRemote ( ) const
virtual

Definition at line 67 of file qplatformprintdevice.cpp.

References m_isRemote.

Referenced by QCocoaPrintDevice::QCocoaPrintDevice(), and QPrintDevice::isRemote().

+ Here is the caller graph for this function:

◆ isValid()

bool QPlatformPrintDevice::isValid ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 57 of file qplatformprintdevice.cpp.

Referenced by QPrintDevice::isValid().

+ Here is the caller graph for this function:

◆ isValidPageLayout()

bool QPlatformPrintDevice::isValidPageLayout ( const QPageLayout & layout,
int resolution ) const
virtual

Definition at line 72 of file qplatformprintdevice.cpp.

References QPageLayout::FullPageMode, layout, QPageLayout::Point, printableMargins(), and supportedPageSize().

Referenced by QPrintDevice::isValidPageLayout().

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

◆ loadColorModes()

void QPlatformPrintDevice::loadColorModes ( ) const
protectedvirtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 308 of file qplatformprintdevice.cpp.

Referenced by supportedColorModes().

+ Here is the caller graph for this function:

◆ loadDuplexModes()

void QPlatformPrintDevice::loadDuplexModes ( ) const
protectedvirtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 292 of file qplatformprintdevice.cpp.

Referenced by supportedDuplexModes().

+ Here is the caller graph for this function:

◆ loadInputSlots()

void QPlatformPrintDevice::loadInputSlots ( ) const
protectedvirtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 252 of file qplatformprintdevice.cpp.

Referenced by supportedInputSlots().

+ Here is the caller graph for this function:

◆ loadOutputBins()

void QPlatformPrintDevice::loadOutputBins ( ) const
protectedvirtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 272 of file qplatformprintdevice.cpp.

Referenced by supportedOutputBins().

+ Here is the caller graph for this function:

◆ loadPageSizes()

void QPlatformPrintDevice::loadPageSizes ( ) const
protectedvirtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 106 of file qplatformprintdevice.cpp.

Referenced by supportedPageSize(), supportedPageSize(), supportedPageSize(), supportedPageSize(), supportedPageSize(), and supportedPageSizes().

+ Here is the caller graph for this function:

◆ loadResolutions()

void QPlatformPrintDevice::loadResolutions ( ) const
protectedvirtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 236 of file qplatformprintdevice.cpp.

Referenced by supportedResolutions().

+ Here is the caller graph for this function:

◆ location()

QString QPlatformPrintDevice::location ( ) const
virtual

Definition at line 47 of file qplatformprintdevice.cpp.

References m_location.

Referenced by QPrintDevice::location().

+ Here is the caller graph for this function:

◆ makeAndModel()

QString QPlatformPrintDevice::makeAndModel ( ) const
virtual

Definition at line 52 of file qplatformprintdevice.cpp.

References m_makeAndModel.

Referenced by QPrintDevice::makeAndModel().

+ Here is the caller graph for this function:

◆ maximumPhysicalPageSize()

QSize QPlatformPrintDevice::maximumPhysicalPageSize ( ) const
virtual

Reimplemented in QWindowsPrintDevice.

Definition at line 221 of file qplatformprintdevice.cpp.

References m_maximumPhysicalPageSize.

Referenced by QPrintDevice::maximumPhysicalPageSize().

+ Here is the caller graph for this function:

◆ minimumPhysicalPageSize()

QSize QPlatformPrintDevice::minimumPhysicalPageSize ( ) const
virtual

Reimplemented in QWindowsPrintDevice.

Definition at line 216 of file qplatformprintdevice.cpp.

References m_minimumPhysicalPageSize.

Referenced by QPrintDevice::minimumPhysicalPageSize().

+ Here is the caller graph for this function:

◆ name()

QString QPlatformPrintDevice::name ( ) const
virtual

Definition at line 42 of file qplatformprintdevice.cpp.

References m_name.

Referenced by QWindowsPrintDevice::defaultPrintDeviceId(), and QPrintDevice::name().

+ Here is the caller graph for this function:

◆ printableMargins()

QMarginsF QPlatformPrintDevice::printableMargins ( const QPageSize & pageSize,
QPageLayout::Orientation orientation,
int resolution ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 226 of file qplatformprintdevice.cpp.

References Q_UNUSED.

Referenced by isValidPageLayout(), and QPrintDevice::printableMargins().

+ Here is the caller graph for this function:

◆ property()

QVariant QPlatformPrintDevice::property ( QPrintDevice::PrintDevicePropertyKey key) const
virtual

Reimplemented in QPpdPrintDevice.

Definition at line 330 of file qplatformprintdevice.cpp.

References Q_UNUSED.

Referenced by QPrintDevice::property(), and QPpdPrintDevice::property().

+ Here is the caller graph for this function:

◆ setProperty()

bool QPlatformPrintDevice::setProperty ( QPrintDevice::PrintDevicePropertyKey key,
const QVariant & value )
virtual

Reimplemented in QPpdPrintDevice.

Definition at line 337 of file qplatformprintdevice.cpp.

References Q_UNUSED.

Referenced by QPrintDevice::setProperty(), and QPpdPrintDevice::setProperty().

+ Here is the caller graph for this function:

◆ state()

QPrint::DeviceState QPlatformPrintDevice::state ( ) const
virtual

Reimplemented in QPpdPrintDevice, QCocoaPrintDevice, and QWindowsPrintDevice.

Definition at line 91 of file qplatformprintdevice.cpp.

References QPrint::Error.

Referenced by QPrintDevice::state().

+ Here is the caller graph for this function:

◆ supportedColorModes()

QList< QPrint::ColorMode > QPlatformPrintDevice::supportedColorModes ( ) const
virtual

Definition at line 317 of file qplatformprintdevice.cpp.

References loadColorModes(), m_colorModes, and m_haveColorModes.

Referenced by QPpdPrintDevice::defaultColorMode(), QCocoaPrintDevice::defaultColorMode(), and QPrintDevice::supportedColorModes().

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

◆ supportedDuplexModes()

QList< QPrint::DuplexMode > QPlatformPrintDevice::supportedDuplexModes ( ) const
virtual

Definition at line 301 of file qplatformprintdevice.cpp.

References loadDuplexModes(), m_duplexModes, and m_haveDuplexModes.

Referenced by QPrintDevice::supportedDuplexModes().

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

◆ supportedInputSlots()

QList< QPrint::InputSlot > QPlatformPrintDevice::supportedInputSlots ( ) const
virtual

Definition at line 265 of file qplatformprintdevice.cpp.

References loadInputSlots(), m_haveInputSlots, and m_inputSlots.

Referenced by QWindowsPrintDevice::defaultInputSlot(), and QPrintDevice::supportedInputSlots().

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

◆ supportedOutputBins()

QList< QPrint::OutputBin > QPlatformPrintDevice::supportedOutputBins ( ) const
virtual

Definition at line 285 of file qplatformprintdevice.cpp.

References loadOutputBins(), m_haveOutputBins, and m_outputBins.

Referenced by QPrintDevice::supportedOutputBins().

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

◆ supportedPageSize() [1/5]

QPageSize QPlatformPrintDevice::supportedPageSize ( const QPageSize & pageSize) const
virtual

Definition at line 122 of file qplatformprintdevice.cpp.

References QPageSize::Custom, QPageSize::id(), QPageSize::isValid(), loadPageSizes(), m_havePageSizes, m_pageSizes, QPageSize::name(), and supportedPageSizeMatch().

Referenced by isValidPageLayout(), QMacPrintEnginePrivate::setPageSize(), QPrintDevice::supportedPageSize(), QPrintDevice::supportedPageSize(), QPrintDevice::supportedPageSize(), QPrintDevice::supportedPageSize(), and QPrintDevice::supportedPageSize().

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

◆ supportedPageSize() [2/5]

QPageSize QPlatformPrintDevice::supportedPageSize ( const QSize & pointSize) const
virtual

Definition at line 179 of file qplatformprintdevice.cpp.

References loadPageSizes(), m_havePageSizes, and supportedPageSizeMatch().

+ Here is the call graph for this function:

◆ supportedPageSize() [3/5]

QPageSize QPlatformPrintDevice::supportedPageSize ( const QSizeF & size,
QPageSize::Unit units ) const
virtual

Definition at line 188 of file qplatformprintdevice.cpp.

References loadPageSizes(), m_havePageSizes, and supportedPageSizeMatch().

+ Here is the call graph for this function:

◆ supportedPageSize() [4/5]

QPageSize QPlatformPrintDevice::supportedPageSize ( const QString & pageName) const
virtual

Definition at line 166 of file qplatformprintdevice.cpp.

References loadPageSizes(), m_havePageSizes, and m_pageSizes.

+ Here is the call graph for this function:

◆ supportedPageSize() [5/5]

QPageSize QPlatformPrintDevice::supportedPageSize ( QPageSize::PageSizeId pageSizeId) const
virtual

Definition at line 152 of file qplatformprintdevice.cpp.

References loadPageSizes(), m_havePageSizes, m_pageSizes, and supportedPageSizeMatch().

+ Here is the call graph for this function:

◆ supportedPageSizeMatch()

QPageSize QPlatformPrintDevice::supportedPageSizeMatch ( const QPageSize & pageSize) const
protected

Definition at line 197 of file qplatformprintdevice.cpp.

References QListSpecialMethodsBase< T >::contains(), m_pageSizes, and QPageSize::sizePoints().

Referenced by supportedPageSize(), supportedPageSize(), supportedPageSize(), and supportedPageSize().

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

◆ supportedPageSizes()

QList< QPageSize > QPlatformPrintDevice::supportedPageSizes ( ) const
virtual

Definition at line 115 of file qplatformprintdevice.cpp.

References loadPageSizes(), m_havePageSizes, and m_pageSizes.

Referenced by QPrintDevice::supportedPageSizes().

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

◆ supportedResolutions()

QList< int > QPlatformPrintDevice::supportedResolutions ( ) const
virtual

Definition at line 245 of file qplatformprintdevice.cpp.

References loadResolutions(), m_haveResolutions, and m_resolutions.

Referenced by QMacPrintEnginePrivate::initialize(), and QPrintDevice::supportedResolutions().

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

◆ supportsCollateCopies()

bool QPlatformPrintDevice::supportsCollateCopies ( ) const
virtual

Reimplemented in QWindowsPrintDevice.

Definition at line 101 of file qplatformprintdevice.cpp.

References m_supportsCollateCopies.

Referenced by QPrintDevice::supportsCollateCopies().

+ Here is the caller graph for this function:

◆ supportsCustomPageSizes()

bool QPlatformPrintDevice::supportsCustomPageSizes ( ) const
virtual

Reimplemented in QWindowsPrintDevice.

Definition at line 211 of file qplatformprintdevice.cpp.

References m_supportsCustomPageSizes.

Referenced by QPrintDevice::supportsCustomPageSizes().

+ Here is the caller graph for this function:

◆ supportsMultipleCopies()

bool QPlatformPrintDevice::supportsMultipleCopies ( ) const
virtual

Reimplemented in QWindowsPrintDevice.

Definition at line 96 of file qplatformprintdevice.cpp.

References m_supportsMultipleCopies.

Referenced by QPrintDevice::supportsMultipleCopies().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_colorModes

◆ m_duplexModes

◆ m_haveColorModes

◆ m_haveDuplexModes

◆ m_haveInputSlots

◆ m_haveOutputBins

◆ m_havePageSizes

◆ m_haveResolutions

◆ m_id

◆ m_inputSlots

◆ m_isRemote

bool QPlatformPrintDevice::m_isRemote
protected

◆ m_location

◆ m_makeAndModel

◆ m_maximumPhysicalPageSize

◆ m_minimumPhysicalPageSize

◆ m_name

◆ m_outputBins

◆ m_pageSizes

◆ m_resolutions

◆ m_supportsCollateCopies

◆ m_supportsCustomPageSizes

◆ m_supportsMultipleCopies


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