java.lang.Object
io.qt.internal.QtJambiObject
io.qt.QtObject
io.qt.printsupport.QPrinter
- All Implemented Interfaces:
QPagedPaintDevice
,QPaintDevice
,QtObjectInterface
public class QPrinter extends QtObject implements QPagedPaintDevice, QPaintDevice
Paint device that paints on a printer
Java wrapper for Qt class QPrinter
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QPrinter.ColorMode
Java wrapper for Qt enum QPrinter::ColorModestatic class
QPrinter.DuplexMode
Java wrapper for Qt enum QPrinter::DuplexModestatic class
QPrinter.Orientation
Java wrapper for Qt enum QPrinter::Orientationstatic class
QPrinter.OutputFormat
Java wrapper for Qt enum QPrinter::OutputFormatstatic class
QPrinter.PageOrder
Java wrapper for Qt enum QPrinter::PageOrderstatic class
QPrinter.PaperSource
Java wrapper for Qt enum QPrinter::PaperSourcestatic class
QPrinter.PrinterMode
Java wrapper for Qt enum QPrinter::PrinterModestatic class
QPrinter.PrinterState
Java wrapper for Qt enum QPrinter::PrinterStatestatic class
QPrinter.PrintRange
Java wrapper for Qt enum QPrinter::PrintRangestatic class
QPrinter.Unit
Java wrapper for Qt enum QPrinter::UnitNested classes/interfaces inherited from interface io.qt.gui.QPagedPaintDevice
QPagedPaintDevice.Impl, QPagedPaintDevice.Margins, QPagedPaintDevice.MemberAccess, QPagedPaintDevice.PageSize, QPagedPaintDevice.PdfVersion
Nested classes/interfaces inherited from interface io.qt.gui.QPaintDevice
QPaintDevice.Impl, QPaintDevice.MemberAccess, QPaintDevice.PaintDeviceMetric
-
Constructor Summary
Constructors Modifier Constructor Description QPrinter()
Overloaded constructor forQPrinter(io.qt.printsupport.QPrinter.PrinterMode)
withmode = io.qt.printsupport.QPrinter.PrinterMode.ScreenResolution
.QPrinter(QPrinter.PrinterMode mode)
QPrinter(QPrinterInfo printer)
Overloaded constructor forQPrinter(io.qt.printsupport.QPrinterInfo, io.qt.printsupport.QPrinter.PrinterMode)
withmode = io.qt.printsupport.QPrinter.PrinterMode.ScreenResolution
.QPrinter(QPrinterInfo printer, QPrinter.PrinterMode mode)
protected
QPrinter(QtObject.QPrivateConstructor p)
Constructor for internal use only. -
Method Summary
Modifier and Type Method Description boolean
abort()
int
actualNumCopies()
Deprecated.Use copyCount() instead.boolean
collateCopies()
int
colorCount()
See QPaintDevice::QPrinter.ColorMode
colorMode()
int
copyCount()
String
creator()
int
depth()
See QPaintDevice::double
devicePixelRatio()
See QPaintDevice::double
devicePixelRatioF()
See QPaintDevice::static double
devicePixelRatioFScale()
String
docName()
boolean
doubleSidedPrinting()
Deprecated.Use duplex() instead.QPrinter.DuplexMode
duplex()
boolean
fontEmbeddingEnabled()
int
fromPage()
boolean
fullPage()
QMarginsF
getPageMargins(QPrinter.Unit unit)
Deprecated.Use pageLayout().margins() instead.int
height()
See QPaintDevice::int
heightMM()
See QPaintDevice::protected void
initPainter(QPainter painter)
boolean
isValid()
int
logicalDpiX()
See QPaintDevice::int
logicalDpiY()
See QPaintDevice::QPagedPaintDevice.Margins
margins()
Deprecated.Use pageLayout().margins() instead.protected int
metric(QPaintDevice.PaintDeviceMetric arg__1)
boolean
newPage()
int
numCopies()
Deprecated.Use copyCount() instead.QPrinter.Orientation
orientation()
Deprecated.Use pageLayout().orientation() instead.String
outputFileName()
QPrinter.OutputFormat
outputFormat()
QPageLayout
pageLayout()
QPrinter.PageOrder
pageOrder()
QRect
pageRect()
Deprecated.Use pageLayout().paintRectPixels(resolution()) instead.QRectF
pageRect(QPrinter.Unit arg__1)
QPagedPaintDevice.PageSize
pageSize()
Deprecated.Use pageLayout().pageSize().id() instead.QSizeF
pageSizeMM()
Deprecated.Use pageLayout().pageSize() instead.QPaintEngine
paintEngine()
boolean
paintingActive()
See QPaintDevice::String
paperName()
Deprecated.Use pageLayout().pageSize().name() instead.QRect
paperRect()
Deprecated.Use pageLayout().fullRectPixels(resolution()) instead.QRectF
paperRect(QPrinter.Unit arg__1)
QPagedPaintDevice.PageSize
paperSize()
Deprecated.pageLayout().pageSize().id()QSizeF
paperSize(QPrinter.Unit unit)
Deprecated.Use pageLayout().pageSize().size() or pageLayout().fullPageSize() instead.QPrinter.PaperSource
paperSource()
QPagedPaintDevice.PdfVersion
pdfVersion()
int
physicalDpiX()
See QPaintDevice::int
physicalDpiY()
See QPaintDevice::QPrintEngine
printEngine()
String
printerName()
QPrinter.PrinterState
printerState()
String
printProgram()
QPrinter.PrintRange
printRange()
protected QPaintDevice
redirected(QPoint offset)
int
resolution()
void
setCollateCopies(boolean collate)
void
setColorMode(QPrinter.ColorMode arg__1)
void
setCopyCount(int arg__1)
void
setCreator(String arg__1)
void
setDocName(String arg__1)
void
setDoubleSidedPrinting(boolean enable)
Deprecated.Use setDuplex() instead.void
setDuplex(QPrinter.DuplexMode duplex)
protected void
setEngines(QPrintEngine printEngine, QPaintEngine paintEngine)
void
setFontEmbeddingEnabled(boolean enable)
void
setFromTo(int fromPage, int toPage)
void
setFullPage(boolean arg__1)
void
setMargins(QPagedPaintDevice.Margins m)
Deprecated.Use setPageMargins(QMarginsF, QPageLayout::Unit) instead.void
setNumCopies(int arg__1)
Deprecated.Use setCopyCount() instead.void
setOrientation(QPrinter.Orientation arg__1)
Deprecated.Use setPageOrientation() instead.void
setOutputFileName(String arg__1)
void
setOutputFormat(QPrinter.OutputFormat format)
boolean
setPageLayout(QPageLayout pageLayout)
void
setPageMargins(double left, double top, double right, double bottom, QPrinter.Unit unit)
Deprecated.Use setPageMargins(QMarginsF, QPageLayout::Unit) instead.boolean
setPageMargins(QMarginsF margins)
boolean
setPageMargins(QMarginsF margins, QPageLayout.Unit units)
void
setPageOrder(QPrinter.PageOrder arg__1)
boolean
setPageOrientation(QPageLayout.Orientation orientation)
void
setPageSize(QPagedPaintDevice.PageSize arg__1)
Deprecated.Use setPageSize(QPageSize) instead.boolean
setPageSize(QPageSize pageSize)
void
setPageSizeMM(QSizeF size)
Deprecated.Use setPageSize(QPageSize) instead.void
setPaperName(String paperName)
Deprecated.Use setPageSize(QPageSize) instead.void
setPaperSize(QSizeF paperSize, QPrinter.Unit unit)
Deprecated.Use setPageSize(QPageSize) instead.void
setPaperSize(QPagedPaintDevice.PageSize arg__1)
Deprecated.Use setPageSize(QPageSize) instead.void
setPaperSource(QPrinter.PaperSource arg__1)
void
setPdfVersion(QPagedPaintDevice.PdfVersion version)
void
setPrinterName(String arg__1)
void
setPrintProgram(String arg__1)
void
setPrintRange(QPrinter.PrintRange range)
void
setResolution(int arg__1)
void
setWinPageSize(int winPageSize)
Deprecated.Use QPageSize::id(windowsId) and setPageLayout(QPageSize) instead.protected QPainter
sharedPainter()
QList<Integer>
supportedResolutions()
boolean
supportsMultipleCopies()
int
toPage()
int
width()
See QPaintDevice::int
widthMM()
See QPaintDevice::int
winPageSize()
Deprecated.Use pageLayout.pageSize().windowsId() instead.
-
Constructor Details
-
QPrinter
public QPrinter()Overloaded constructor for
QPrinter(io.qt.printsupport.QPrinter.PrinterMode)
withmode = io.qt.printsupport.QPrinter.PrinterMode.ScreenResolution
. -
QPrinter
-
QPrinter
Overloaded constructor for
QPrinter(io.qt.printsupport.QPrinterInfo, io.qt.printsupport.QPrinter.PrinterMode)
withmode = io.qt.printsupport.QPrinter.PrinterMode.ScreenResolution
. -
QPrinter
-
QPrinter
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
abort
-
actualNumCopies
Deprecated.Use copyCount() instead. -
collateCopies
-
colorCount
See QPaintDevice::
- Specified by:
colorCount
in interfaceQPaintDevice
-
colorMode
-
copyCount
-
creator
-
depth
See QPaintDevice::
- Specified by:
depth
in interfaceQPaintDevice
-
devicePixelRatio
See QPaintDevice::
- Specified by:
devicePixelRatio
in interfaceQPaintDevice
-
devicePixelRatioF
See QPaintDevice::
- Specified by:
devicePixelRatioF
in interfaceQPaintDevice
-
docName
-
doubleSidedPrinting
Deprecated.Use duplex() instead. -
duplex
-
fontEmbeddingEnabled
-
fromPage
-
fullPage
-
getPageMargins
Deprecated.Use pageLayout().margins() instead. -
height
See QPaintDevice::
- Specified by:
height
in interfaceQPaintDevice
-
heightMM
See QPaintDevice::
- Specified by:
heightMM
in interfaceQPaintDevice
-
isValid
-
logicalDpiX
See QPaintDevice::
- Specified by:
logicalDpiX
in interfaceQPaintDevice
-
logicalDpiY
See QPaintDevice::
- Specified by:
logicalDpiY
in interfaceQPaintDevice
-
margins
Deprecated.Use pageLayout().margins() instead.- Specified by:
margins
in interfaceQPagedPaintDevice
-
numCopies
Deprecated.Use copyCount() instead. -
orientation
Deprecated.Use pageLayout().orientation() instead. -
outputFileName
-
outputFormat
-
pageLayout
- Specified by:
pageLayout
in interfaceQPagedPaintDevice
-
pageOrder
-
pageRect
Deprecated.Use pageLayout().paintRectPixels(resolution()) instead. -
pageRect
-
pageSize
Deprecated.Use pageLayout().pageSize().id() instead.- Specified by:
pageSize
in interfaceQPagedPaintDevice
-
pageSizeMM
Deprecated.Use pageLayout().pageSize() instead.- Specified by:
pageSizeMM
in interfaceQPagedPaintDevice
-
paintingActive
See QPaintDevice::
- Specified by:
paintingActive
in interfaceQPaintDevice
-
paperName
Deprecated.Use pageLayout().pageSize().name() instead. -
paperRect
Deprecated.Use pageLayout().fullRectPixels(resolution()) instead. -
paperRect
-
paperSize
Deprecated.pageLayout().pageSize().id() -
paperSize
Deprecated.Use pageLayout().pageSize().size() or pageLayout().fullPageSize() instead. -
paperSource
-
pdfVersion
-
physicalDpiX
See QPaintDevice::
- Specified by:
physicalDpiX
in interfaceQPaintDevice
-
physicalDpiY
See QPaintDevice::
- Specified by:
physicalDpiY
in interfaceQPaintDevice
-
printEngine
-
printProgram
-
printRange
-
printerName
-
printerState
-
resolution
-
setCollateCopies
-
setColorMode
-
setCopyCount
-
setCreator
-
setDocName
-
setDoubleSidedPrinting
Deprecated.Use setDuplex() instead. -
setDuplex
-
setEngines
-
setFontEmbeddingEnabled
-
setFromTo
-
setFullPage
-
setNumCopies
Deprecated.Use setCopyCount() instead. -
setOrientation
Deprecated.Use setPageOrientation() instead. -
setOutputFileName
-
setOutputFormat
-
setPageLayout
- Specified by:
setPageLayout
in interfaceQPagedPaintDevice
-
setPageMargins
- Specified by:
setPageMargins
in interfaceQPagedPaintDevice
-
setPageMargins
- Specified by:
setPageMargins
in interfaceQPagedPaintDevice
-
setPageMargins
@Deprecated @QtUninvokable public final void setPageMargins(double left, double top, double right, double bottom, QPrinter.Unit unit)Deprecated.Use setPageMargins(QMarginsF, QPageLayout::Unit) instead. -
setPageOrder
-
setPageOrientation
- Specified by:
setPageOrientation
in interfaceQPagedPaintDevice
-
setPageSize
- Specified by:
setPageSize
in interfaceQPagedPaintDevice
-
setPaperName
Deprecated.Use setPageSize(QPageSize) instead. -
setPaperSize
Deprecated.Use setPageSize(QPageSize) instead. -
setPaperSize
Deprecated.Use setPageSize(QPageSize) instead. -
setPaperSource
-
setPdfVersion
-
setPrintProgram
-
setPrintRange
-
setPrinterName
-
setResolution
-
setWinPageSize
Deprecated.Use QPageSize::id(windowsId) and setPageLayout(QPageSize) instead. -
supportedResolutions
-
supportsMultipleCopies
-
toPage
-
width
See QPaintDevice::
- Specified by:
width
in interfaceQPaintDevice
-
widthMM
See QPaintDevice::
- Specified by:
widthMM
in interfaceQPaintDevice
-
winPageSize
Deprecated.Use pageLayout.pageSize().windowsId() instead. -
initPainter
-
metric
-
newPage
- Specified by:
newPage
in interfaceQPagedPaintDevice
-
paintEngine
- Specified by:
paintEngine
in interfaceQPagedPaintDevice
- Specified by:
paintEngine
in interfaceQPaintDevice
-
redirected
-
setMargins
Deprecated.Use setPageMargins(QMarginsF, QPageLayout::Unit) instead.- Specified by:
setMargins
in interfaceQPagedPaintDevice
-
setPageSize
Deprecated.Use setPageSize(QPageSize) instead.- Specified by:
setPageSize
in interfaceQPagedPaintDevice
-
setPageSizeMM
Deprecated.Use setPageSize(QPageSize) instead.- Specified by:
setPageSizeMM
in interfaceQPagedPaintDevice
-
sharedPainter
-
devicePixelRatioFScale
public static double devicePixelRatioFScale()
-