eric6/Graphics/SvgDiagram.py

changeset 7759
51aa6c6b66f7
parent 7533
88261c96484b
child 7780
41420f82c0ac
equal deleted inserted replaced
7758:dd54d33d21d2 7759:51aa6c6b66f7
287 printerName = Preferences.getPrinter("PrinterName") 287 printerName = Preferences.getPrinter("PrinterName")
288 if printerName: 288 if printerName:
289 printer.setPrinterName(printerName) 289 printer.setPrinterName(printerName)
290 290
291 printDialog = QPrintDialog(printer, self) 291 printDialog = QPrintDialog(printer, self)
292 if printDialog.exec_(): 292 if printDialog.exec():
293 self.__print(printer) 293 self.__print(printer)
294 294
295 def __printPreviewDiagram(self): 295 def __printPreviewDiagram(self):
296 """ 296 """
297 Private slot called to show a print preview of the diagram. 297 Private slot called to show a print preview of the diagram.
319 if printerName: 319 if printerName:
320 printer.setPrinterName(printerName) 320 printer.setPrinterName(printerName)
321 321
322 preview = QPrintPreviewDialog(printer, self) 322 preview = QPrintPreviewDialog(printer, self)
323 preview.paintRequested[QPrinter].connect(self.__print) 323 preview.paintRequested[QPrinter].connect(self.__print)
324 preview.exec_() 324 preview.exec()
325 325
326 def __print(self, printer): 326 def __print(self, printer):
327 """ 327 """
328 Private slot to the actual printing. 328 Private slot to the actual printing.
329 329

eric ide

mercurial