--- a/Graphics/SvgDiagram.py Fri Mar 11 08:55:14 2011 +0100 +++ b/Graphics/SvgDiagram.py Fri Mar 11 16:51:57 2011 +0100 @@ -17,11 +17,12 @@ import Preferences + class SvgDiagram(QMainWindow): """ Class implementing a dialog showing a SVG graphic. """ - def __init__(self, svgFile, parent = None, name = None): + def __init__(self, svgFile, parent=None, name=None): """ Constructor @@ -166,7 +167,7 @@ @param factor factor to adjust by (float) """ scrollBar.setValue(int(factor * scrollBar.value() - + ((factor - 1) * scrollBar.pageStep()/2))) + + ((factor - 1) * scrollBar.pageStep() / 2))) def __doZoom(self, factor): """ @@ -213,7 +214,7 @@ """ Private slot called to print the diagram. """ - printer = QPrinter(mode = QPrinter.ScreenResolution) + printer = QPrinter(mode=QPrinter.ScreenResolution) printer.setFullPage(True) if Preferences.getPrinter("ColorMode"): printer.setColorMode(QPrinter.Color) @@ -235,7 +236,7 @@ """ from PyQt4.QtGui import QPrintPreviewDialog - printer = QPrinter(mode = QPrinter.ScreenResolution) + printer = QPrinter(mode=QPrinter.ScreenResolution) printer.setFullPage(True) if Preferences.getPrinter("ColorMode"): printer.setColorMode(QPrinter.Color) @@ -284,7 +285,7 @@ tc = QColor(50, 50, 50) painter.setPen(tc) painter.drawRect(marginX, marginY, width, height) - painter.drawLine(marginX, marginY + height + 2, + painter.drawLine(marginX, marginY + height + 2, marginX + width, marginY + height + 2) painter.setFont(font) painter.drawText(marginX, marginY + height + 4, width,