diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/Tools/UIPreviewer.py --- a/src/eric7/Tools/UIPreviewer.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/Tools/UIPreviewer.py Tue Oct 18 16:06:21 2022 +0200 @@ -32,14 +32,14 @@ from PyQt6 import uic -from EricWidgets import EricMessageBox, EricFileDialog -from EricWidgets.EricMainWindow import EricMainWindow -from EricWidgets.EricApplication import ericApp -from EricGui.EricOverrideCursor import EricOverrideCursor +from eric7.EricWidgets import EricMessageBox, EricFileDialog +from eric7.EricWidgets.EricMainWindow import EricMainWindow +from eric7.EricWidgets.EricApplication import ericApp +from eric7.EricGui.EricOverrideCursor import EricOverrideCursor -import Preferences -import UI.PixmapCache -import UI.Config +from eric7 import Preferences +from eric7.EricGui import EricPixmapCache +from eric7.UI import Config class UIPreviewer(EricMainWindow): @@ -69,7 +69,7 @@ self.resize(QSize(600, 480).expandedTo(self.minimumSizeHint())) self.statusBar() - self.setWindowIcon(UI.PixmapCache.getIcon("eric")) + self.setWindowIcon(EricPixmapCache.getIcon("eric")) self.setWindowTitle(self.tr("UI Previewer")) self.cw = QWidget(self) @@ -145,7 +145,7 @@ Private method to define the user interface actions. """ self.openAct = QAction( - UI.PixmapCache.getIcon("openUI"), self.tr("&Open File"), self + EricPixmapCache.getIcon("openUI"), self.tr("&Open File"), self ) self.openAct.setShortcut(QKeySequence(self.tr("Ctrl+O", "File|Open"))) self.openAct.setStatusTip(self.tr("Open a UI file for display")) @@ -158,7 +158,7 @@ self.openAct.triggered.connect(self.__openFile) self.printAct = QAction( - UI.PixmapCache.getIcon("print"), self.tr("&Print"), self + EricPixmapCache.getIcon("print"), self.tr("&Print"), self ) self.printAct.setShortcut(QKeySequence(self.tr("Ctrl+P", "File|Print"))) self.printAct.setStatusTip(self.tr("Print a screen capture")) @@ -168,7 +168,7 @@ self.printAct.triggered.connect(self.__printImage) self.printPreviewAct = QAction( - UI.PixmapCache.getIcon("printPreview"), self.tr("Print Preview"), self + EricPixmapCache.getIcon("printPreview"), self.tr("Print Preview"), self ) self.printPreviewAct.setStatusTip(self.tr("Print preview a screen capture")) self.printPreviewAct.setWhatsThis( @@ -179,7 +179,7 @@ self.printPreviewAct.triggered.connect(self.__printPreviewImage) self.imageAct = QAction( - UI.PixmapCache.getIcon("screenCapture"), self.tr("&Screen Capture"), self + EricPixmapCache.getIcon("screenCapture"), self.tr("&Screen Capture"), self ) self.imageAct.setShortcut( QKeySequence(self.tr("Ctrl+S", "File|Screen Capture")) @@ -193,7 +193,7 @@ ) self.imageAct.triggered.connect(self.__saveImage) - self.exitAct = QAction(UI.PixmapCache.getIcon("exit"), self.tr("&Quit"), self) + self.exitAct = QAction(EricPixmapCache.getIcon("exit"), self.tr("&Quit"), self) self.exitAct.setShortcut(QKeySequence(self.tr("Ctrl+Q", "File|Quit"))) self.exitAct.setStatusTip(self.tr("Quit the application")) self.exitAct.setWhatsThis( @@ -202,7 +202,7 @@ self.exitAct.triggered.connect(ericApp().closeAllWindows) self.copyAct = QAction( - UI.PixmapCache.getIcon("editCopy"), self.tr("&Copy"), self + EricPixmapCache.getIcon("editCopy"), self.tr("&Copy"), self ) self.copyAct.setShortcut(QKeySequence(self.tr("Ctrl+C", "Edit|Copy"))) self.copyAct.setStatusTip(self.tr("Copy screen capture to clipboard")) @@ -212,7 +212,7 @@ self.copyAct.triggered.connect(self.__copyImageToClipboard) self.whatsThisAct = QAction( - UI.PixmapCache.getIcon("whatsThis"), self.tr("&What's This?"), self + EricPixmapCache.getIcon("whatsThis"), self.tr("&What's This?"), self ) self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1"))) self.whatsThisAct.setStatusTip(self.tr("Context sensitive help")) @@ -284,7 +284,7 @@ Private method to create the toolbars. """ filetb = self.addToolBar(self.tr("File")) - filetb.setIconSize(UI.Config.ToolBarIconSize) + filetb.setIconSize(Config.ToolBarIconSize) filetb.addAction(self.openAct) filetb.addAction(self.imageAct) filetb.addSeparator() @@ -294,11 +294,11 @@ filetb.addAction(self.exitAct) edittb = self.addToolBar(self.tr("Edit")) - edittb.setIconSize(UI.Config.ToolBarIconSize) + edittb.setIconSize(Config.ToolBarIconSize) edittb.addAction(self.copyAct) helptb = self.addToolBar(self.tr("Help")) - helptb.setIconSize(UI.Config.ToolBarIconSize) + helptb.setIconSize(Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) def __whatsThis(self):