Graphics/PixmapDiagram.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3345
071afe8be2a1
--- a/Graphics/PixmapDiagram.py	Fri Jan 10 19:30:21 2014 +0100
+++ b/Graphics/PixmapDiagram.py	Sat Jan 11 11:55:33 2014 +0100
@@ -47,7 +47,7 @@
             self.setObjectName(name)
         else:
             self.setObjectName("PixmapDiagram")
-        self.setWindowTitle(self.trUtf8("Pixmap-Viewer"))
+        self.setWindowTitle(self.tr("Pixmap-Viewer"))
         
         self.pixmapLabel = QLabel()
         self.pixmapLabel.setObjectName("pixmapLabel")
@@ -90,17 +90,17 @@
         """
         self.closeAct = \
             QAction(UI.PixmapCache.getIcon("close.png"),
-                    self.trUtf8("Close"), self)
+                    self.tr("Close"), self)
         self.closeAct.triggered[()].connect(self.close)
         
         self.printAct = \
             QAction(UI.PixmapCache.getIcon("print.png"),
-                    self.trUtf8("Print"), self)
+                    self.tr("Print"), self)
         self.printAct.triggered[()].connect(self.__printDiagram)
         
         self.printPreviewAct = \
             QAction(UI.PixmapCache.getIcon("printPreview.png"),
-                    self.trUtf8("Print Preview"), self)
+                    self.tr("Print Preview"), self)
         self.printPreviewAct.triggered[()].connect(self.__printPreviewDiagram)
         
     def __initContextMenu(self):
@@ -128,11 +128,11 @@
         """
         Private method to populate the toolbars with our actions.
         """
-        self.windowToolBar = QToolBar(self.trUtf8("Window"), self)
+        self.windowToolBar = QToolBar(self.tr("Window"), self)
         self.windowToolBar.setIconSize(UI.Config.ToolBarIconSize)
         self.windowToolBar.addAction(self.closeAct)
         
-        self.graphicsToolBar = QToolBar(self.trUtf8("Graphics"), self)
+        self.graphicsToolBar = QToolBar(self.tr("Graphics"), self)
         self.graphicsToolBar.setIconSize(UI.Config.ToolBarIconSize)
         self.graphicsToolBar.addAction(self.printPreviewAct)
         self.graphicsToolBar.addAction(self.printAct)
@@ -151,8 +151,8 @@
         if image.isNull():
             E5MessageBox.warning(
                 self,
-                self.trUtf8("Pixmap-Viewer"),
-                self.trUtf8(
+                self.tr("Pixmap-Viewer"),
+                self.tr(
                     """<p>The file <b>{0}</b> cannot be displayed."""
                     """ The format is not supported.</p>""").format(filename))
             return False
@@ -377,7 +377,7 @@
             int(printer.resolution() / 2.54)
 
         # write a foot note
-        s = self.trUtf8("Diagram: {0}").format(self.getDiagramName())
+        s = self.tr("Diagram: {0}").format(self.getDiagramName())
         tc = QColor(50, 50, 50)
         painter.setPen(tc)
         painter.drawRect(marginX, marginY, width, height)

eric ide

mercurial