51 self.setAlignment(Qt.Alignment(Qt.AlignLeft | Qt.AlignTop)) |
51 self.setAlignment(Qt.Alignment(Qt.AlignLeft | Qt.AlignTop)) |
52 self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn) |
52 self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn) |
53 self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) |
53 self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) |
54 self.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate) |
54 self.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate) |
55 |
55 |
56 self.setWhatsThis(self.trUtf8( |
56 self.setWhatsThis(self.tr( |
57 "<b>Graphics View</b>\n" |
57 "<b>Graphics View</b>\n" |
58 "<p>This graphics view is used to show a diagram. \n" |
58 "<p>This graphics view is used to show a diagram. \n" |
59 "There are various actions available to manipulate the \n" |
59 "There are various actions available to manipulate the \n" |
60 "shown items.</p>\n" |
60 "shown items.</p>\n" |
61 "<ul>\n" |
61 "<ul>\n" |
366 offsetY = 0 |
366 offsetY = 0 |
367 |
367 |
368 painter.drawPixmap(marginX, marginY, diagram, |
368 painter.drawPixmap(marginX, marginY, diagram, |
369 offsetX, offsetY, widthX, heightY) |
369 offsetX, offsetY, widthX, heightY) |
370 # write a foot note |
370 # write a foot note |
371 s = self.trUtf8("{0}, Page {1}").format(diagramName, page + 1) |
371 s = self.tr("{0}, Page {1}").format(diagramName, page + 1) |
372 tc = QColor(50, 50, 50) |
372 tc = QColor(50, 50, 50) |
373 painter.setPen(tc) |
373 painter.setPen(tc) |
374 painter.drawRect(marginX, marginY, width, height) |
374 painter.drawRect(marginX, marginY, width, height) |
375 painter.drawLine(marginX, marginY + height + 2, |
375 painter.drawLine(marginX, marginY + height + 2, |
376 marginX + width, marginY + height + 2) |
376 marginX + width, marginY + height + 2) |