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