--- a/Tools/UIPreviewer.py Fri Oct 18 23:00:41 2013 +0200 +++ b/Tools/UIPreviewer.py Fri Nov 01 15:48:48 2013 +0100 @@ -126,8 +126,9 @@ """ Private method to define the user interface actions. """ - self.openAct = QAction(UI.PixmapCache.getIcon("openUI.png"), - self.trUtf8('&Open File'), self) + self.openAct = QAction( + UI.PixmapCache.getIcon("openUI.png"), + self.trUtf8('&Open File'), self) self.openAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+O", "File|Open"))) self.openAct.setStatusTip(self.trUtf8('Open a UI file for display')) @@ -137,8 +138,9 @@ )) self.openAct.triggered[()].connect(self.__openFile) - self.printAct = QAction(UI.PixmapCache.getIcon("print.png"), - self.trUtf8('&Print'), self) + self.printAct = QAction( + UI.PixmapCache.getIcon("print.png"), + self.trUtf8('&Print'), self) self.printAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+P", "File|Print"))) self.printAct.setStatusTip(self.trUtf8('Print a screen capture')) @@ -159,8 +161,9 @@ )) self.printPreviewAct.triggered[()].connect(self.__printPreviewImage) - self.imageAct = QAction(UI.PixmapCache.getIcon("screenCapture.png"), - self.trUtf8('&Screen Capture'), self) + self.imageAct = QAction( + UI.PixmapCache.getIcon("screenCapture.png"), + self.trUtf8('&Screen Capture'), self) self.imageAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture"))) self.imageAct.setStatusTip(self.trUtf8( @@ -171,8 +174,8 @@ )) self.imageAct.triggered[()].connect(self.__saveImage) - self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('&Quit'), self) + self.exitAct = QAction( + UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) self.exitAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit"))) self.exitAct.setStatusTip(self.trUtf8('Quit the application')) @@ -182,8 +185,8 @@ )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) - self.copyAct = QAction(UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('&Copy'), self) + self.copyAct = QAction( + UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8('&Copy'), self) self.copyAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy"))) self.copyAct.setStatusTip( @@ -194,8 +197,9 @@ )) self.copyAct.triggered[()].connect(self.__copyImageToClipboard) - self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), self) + self.whatsThisAct = QAction( + UI.PixmapCache.getIcon("whatsThis.png"), + self.trUtf8('&What\'s This?'), self) self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) self.whatsThisAct.setWhatsThis(self.trUtf8( @@ -296,12 +300,16 @@ """ Private slot to show the about information. """ - E5MessageBox.about(self, self.trUtf8("UI Previewer"), self.trUtf8( - """<h3> About UI Previewer </h3>""" - """<p>The UI Previewer loads and displays Qt User-Interface""" - """ files with various styles, which are selectable via a""" - """ selection list.</p>""" - )) + E5MessageBox.about( + self, + self.trUtf8("UI Previewer"), + self.trUtf8( + """<h3> About UI Previewer </h3>""" + """<p>The UI Previewer loads and displays Qt User-Interface""" + """ files with various styles, which are selectable via a""" + """ selection list.</p>""" + ) + ) def __aboutQt(self): """ @@ -350,7 +358,8 @@ self.previewSV.setWidget(self.mainWidget) self.mainWidget.show() else: - E5MessageBox.warning(self, + E5MessageBox.warning( + self, self.trUtf8("Load UI File"), self.trUtf8( """<p>The file <b>{0}</b> could not be loaded.</p>""")\ @@ -380,8 +389,8 @@ self.lastQStyle = qstyle self.lastStyle = sstyle - Preferences.Prefs.settings.setValue('UIPreviewer/style', - self.styleCombo.currentIndex()) + Preferences.Prefs.settings.setValue( + 'UIPreviewer/style', self.styleCombo.currentIndex()) QApplication.restoreOverrideCursor() def __updateActions(self): @@ -438,7 +447,8 @@ Private slot to handle the Save Image menu action. """ if self.mainWidget is None: - E5MessageBox.critical(self, + E5MessageBox.critical( + self, self.trUtf8("Save Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -470,7 +480,8 @@ pix = QPixmap.grabWidget(self.mainWidget) self.__updateChildren(self.lastStyle) if not pix.save(fname, str(ext)): - E5MessageBox.critical(self, + E5MessageBox.critical( + self, self.trUtf8("Save Image"), self.trUtf8( """<p>The file <b>{0}</b> could not be saved.</p>""") @@ -481,7 +492,8 @@ Private slot to handle the Copy Image menu action. """ if self.mainWidget is None: - E5MessageBox.critical(self, + E5MessageBox.critical( + self, self.trUtf8("Save Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -498,7 +510,8 @@ Private slot to handle the Print Image menu action. """ if self.mainWidget is None: - E5MessageBox.critical(self, + E5MessageBox.critical( + self, self.trUtf8("Print Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -538,7 +551,8 @@ from PyQt4.QtGui import QPrintPreviewDialog if self.mainWidget is None: - E5MessageBox.critical(self, + E5MessageBox.critical( + self, self.trUtf8("Print Preview"), self.trUtf8("""There is no UI file loaded.""")) return