Graphics/PixmapDiagram.py

changeset 539
87f9bce38a44
parent 483
ca7d8599a575
child 791
9ec2ac20e54e
equal deleted inserted replaced
538:7f1a56e80124 539:87f9bce38a44
7 Module implementing a dialog showing a pixmap. 7 Module implementing a dialog showing a pixmap.
8 """ 8 """
9 9
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import *
11 from PyQt4.QtGui import * 11 from PyQt4.QtGui import *
12
13 from E5Gui import E5MessageBox
12 14
13 from .ZoomDialog import ZoomDialog 15 from .ZoomDialog import ZoomDialog
14 16
15 import UI.Config 17 import UI.Config
16 18
152 @param filename name of the file to be shown (string) 154 @param filename name of the file to be shown (string)
153 @return flag indicating success (boolean) 155 @return flag indicating success (boolean)
154 """ 156 """
155 image = QImage(filename) 157 image = QImage(filename)
156 if image.isNull(): 158 if image.isNull():
157 QMessageBox.warning(self, 159 E5MessageBox.warning(self,
158 self.trUtf8("Pixmap-Viewer"), 160 self.trUtf8("Pixmap-Viewer"),
159 self.trUtf8("""<p>The file <b>{0}</b> cannot be displayed.""" 161 self.trUtf8("""<p>The file <b>{0}</b> cannot be displayed."""
160 """ The format is not supported.</p>""").format(filename)) 162 """ The format is not supported.</p>""").format(filename))
161 return False 163 return False
162 164

eric ide

mercurial