--- a/Tools/UIPreviewer.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Tools/UIPreviewer.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,11 +11,12 @@ from PyQt4.QtGui import * from PyQt4 import uic +from E5Gui import E5MessageBox + import Preferences import UI.PixmapCache import UI.Config - class UIPreviewer(QMainWindow): """ Class implementing the UI Previewer main window. @@ -412,7 +413,7 @@ Private slot to handle the Save Image menu action. """ if self.mainWidget is None: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Save Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -440,7 +441,7 @@ pix = QPixmap.grabWidget(self.mainWidget) self.__updateChildren(self.lastStyle) if not pix.save(fname, str(ext)): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save Image"), self.trUtf8("""<p>The file <b>{0}</b> could not be saved.</p>""") .format(fname)) @@ -450,7 +451,7 @@ Private slot to handle the Copy Image menu action. """ if self.mainWidget is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -464,7 +465,7 @@ Private slot to handle the Print Image menu action. """ if self.mainWidget is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Print Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -503,7 +504,7 @@ from PyQt4.QtGui import QPrintPreviewDialog if self.mainWidget is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Print Preview"), self.trUtf8("""There is no UI file loaded.""")) return @@ -549,4 +550,4 @@ p.drawImage(marginX, marginY, img.scaled(width, height, Qt.KeepAspectRatio, Qt.SmoothTransformation)) - p.end() + p.end() \ No newline at end of file