PyPrintLayout.GKPrintLayout

class GKPrintLayout

Inheritance diagram of PyPrintLayout.GKPrintLayout

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

A stored Layout which elements are drawable items to be printed.

__init__()
addItem(it)
Parameters:

itGKPrintLayoutItem

Adds a new Item. The pointer is adopted (and owned)

clearItems()
copyState(originLayout)
Parameters:

originLayoutGKPrintLayout

createItem(t)
Parameters:

t – str

Return type:

GKPrintLayoutItem

exportToImage(fileName)
Parameters:

fileName – str

exportToPDF(fileName)
Parameters:

fileName – str

getItemAtPosition(item, classType)
Parameters:
Return type:

GKPrintLayoutItem

Return the item of the specified type whose bounding box contains the center of the specified item, or the closest one if there is no item with such a bounding box.

getItems()
Return type:

.list of GKPrintLayoutItem

getOrientation()
Return type:

Orientation

Printer settings: orientation

getPageMargins(left, top, right, bottom)
Parameters:
  • leftdouble

  • topdouble

  • rightdouble

  • bottomdouble

getPageSizeInMillimeter()
Return type:

QSizeF

getPageSizeInPoints()
Return type:

QSizeF

getPaperSize()
Return type:

QPageSize

Printer settings: paper size

getPaperSize(unit)
Parameters:

unitUnit

Return type:

QSizeF

getPreviewDPIsMode()
Return type:

PreviewModeDPIs

getResolution()
Return type:

int

Printer settings: resolution

guiTimeContextChanged(context)
Parameters:

contextGKContext

isDefault()
Return type:

bool

print()
readFromPrinter(printer)
Parameters:

printerQPrinter

removeItem(it)
Parameters:

itGKPrintLayoutItem

Removes an item. The object is not deleted. *

Warning

The item MUST be one of the GKPrintLayout items.

setAsDefault(defaultLayout)
Parameters:

defaultLayout – bool

setOrientation(value)
Parameters:

valueOrientation

Printer settings: orientation

setPageMargins(left, top, right, bottom)
Parameters:
  • left – float

  • top – float

  • right – float

  • bottom – float

setPaperSize(value)
Parameters:

valueQPageSize

Printer settings: paper size

setPreviewDPIsMode(dpiMode)
Parameters:

dpiModePreviewModeDPIs

setResolution(value)
Parameters:

value – int

Printer settings: resolution

toBack(item)
Parameters:

itemGKPrintLayoutItem

toFront(item)
Parameters:

itemGKPrintLayoutItem

writeToPrinter(printer)
Parameters:

printerQPrinter