PyPrintLayout.GKPrintLayout¶
- class GKPrintLayout¶
-
Synopsis¶
Methods¶
def
__init__()def
addItem()def
clearItems()def
copyState()def
createItem()def
exportToImage()def
exportToPDF()def
getItems()def
getOrientation()def
getPageMargins()def
getPaperSize()def
getResolution()def
isDefault()def
print()def
removeItem()def
setAsDefault()def
setOrientation()def
setPageMargins()def
setPaperSize()def
setResolution()def
toBack()def
toFront()def
writeToPrinter()
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:
it –
GKPrintLayoutItem
Adds a new Item. The pointer is adopted (and owned)
- clearItems()¶
- copyState(originLayout)¶
- Parameters:
originLayout –
GKPrintLayout
- createItem(t)¶
- Parameters:
t – str
- Return type:
- exportToImage(fileName)¶
- Parameters:
fileName – str
- exportToPDF(fileName)¶
- Parameters:
fileName – str
- getItemAtPosition(item, classType)¶
- Parameters:
item –
GKPrintLayoutItemclassType – str
- Return type:
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:
Printer settings: orientation
- getPageMargins(left, top, right, bottom)¶
- Parameters:
left –
doubletop –
doubleright –
doublebottom –
double
Printer settings: paper size
- getPreviewDPIsMode()¶
- Return type:
Printer settings: resolution
- print()¶
- removeItem(it)¶
- Parameters:
it –
GKPrintLayoutItem
Removes an item. The object is not deleted. *
Warning
The item MUST be one of the
GKPrintLayoutitems.- setAsDefault(defaultLayout)¶
- Parameters:
defaultLayout – bool
- setOrientation(value)¶
- Parameters:
value –
Orientation
Printer settings: orientation
- setPageMargins(left, top, right, bottom)¶
- Parameters:
left – float
top – float
right – float
bottom – float
Printer settings: paper size
- setPreviewDPIsMode(dpiMode)¶
- Parameters:
dpiMode –
PreviewModeDPIs
- setResolution(value)¶
- Parameters:
value – int
Printer settings: resolution
- toBack(item)¶
- Parameters:
item –
GKPrintLayoutItem
- toFront(item)¶
- Parameters:
item –
GKPrintLayoutItem