4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing the printer functionality. |
7 Module implementing the printer functionality. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 from PyQt4.QtCore import QTime, QDate, Qt |
12 from PyQt4.QtCore import QTime, QDate, Qt |
11 from PyQt4.QtGui import QColor, QPrinter, QApplication |
13 from PyQt4.QtGui import QColor, QPrinter, QApplication |
12 from PyQt4.Qsci import QsciPrinter |
14 from PyQt4.Qsci import QsciPrinter |
13 |
15 |
22 """ |
24 """ |
23 Constructor |
25 Constructor |
24 |
26 |
25 @param mode mode of the printer (QPrinter.PrinterMode) |
27 @param mode mode of the printer (QPrinter.PrinterMode) |
26 """ |
28 """ |
27 super().__init__(mode) |
29 super(Printer, self).__init__(mode) |
28 |
30 |
29 self.setMagnification(Preferences.getPrinter("Magnification")) |
31 self.setMagnification(Preferences.getPrinter("Magnification")) |
30 if Preferences.getPrinter("ColorMode"): |
32 if Preferences.getPrinter("ColorMode"): |
31 self.setColorMode(QPrinter.Color) |
33 self.setColorMode(QPrinter.Color) |
32 else: |
34 else: |