--- a/src/eric7/Tools/TRPreviewer.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/Tools/TRPreviewer.py Tue Oct 18 16:06:21 2022 +0200 @@ -38,14 +38,14 @@ from PyQt6 import uic -from EricWidgets import EricMessageBox, EricFileDialog -from EricWidgets.EricMainWindow import EricMainWindow -from EricWidgets.EricApplication import ericApp +from eric7.EricWidgets import EricMessageBox, EricFileDialog +from eric7.EricWidgets.EricMainWindow import EricMainWindow +from eric7.EricWidgets.EricApplication import ericApp -import UI.PixmapCache -import UI.Config +from eric7.EricGui import EricPixmapCache +from eric7.UI import Config -import Preferences +from eric7 import Preferences noTranslationName = QCoreApplication.translate("TRPreviewer", "<No translation>") @@ -78,7 +78,7 @@ self.resize(QSize(800, 600).expandedTo(self.minimumSizeHint())) self.statusBar() - self.setWindowIcon(UI.PixmapCache.getIcon("eric")) + self.setWindowIcon(EricPixmapCache.getIcon("eric")) self.setWindowTitle(self.tr("Translations Previewer")) self.cw = QWidget(self) @@ -179,7 +179,7 @@ Private method to define the user interface actions. """ self.openUIAct = QAction( - UI.PixmapCache.getIcon("openUI"), self.tr("&Open UI Files..."), self + EricPixmapCache.getIcon("openUI"), self.tr("&Open UI Files..."), self ) self.openUIAct.setStatusTip(self.tr("Open UI files for display")) self.openUIAct.setWhatsThis( @@ -191,7 +191,7 @@ self.openUIAct.triggered.connect(self.__openWidget) self.openQMAct = QAction( - UI.PixmapCache.getIcon("openQM"), + EricPixmapCache.getIcon("openQM"), self.tr("Open &Translation Files..."), self, ) @@ -205,7 +205,7 @@ self.openQMAct.triggered.connect(self.__openTranslation) self.reloadAct = QAction( - UI.PixmapCache.getIcon("reload"), self.tr("&Reload Translations"), self + EricPixmapCache.getIcon("reload"), self.tr("&Reload Translations"), self ) self.reloadAct.setStatusTip(self.tr("Reload the loaded translations")) self.reloadAct.setWhatsThis( @@ -217,7 +217,7 @@ ) self.reloadAct.triggered.connect(self.translations.reload) - 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( @@ -226,7 +226,7 @@ self.exitAct.triggered.connect(ericApp().closeAllWindows) 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")) @@ -287,7 +287,7 @@ self.cascadeAct.triggered.connect(self.preview.cascadeSubWindows) self.closeAct = QAction( - UI.PixmapCache.getIcon("close"), self.tr("&Close"), self + EricPixmapCache.getIcon("close"), self.tr("&Close"), self ) self.closeAct.setShortcut(QKeySequence(self.tr("Ctrl+W", "File|Close"))) self.closeAct.setStatusTip(self.tr("Close the current window")) @@ -339,7 +339,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.openUIAct) filetb.addAction(self.openQMAct) filetb.addAction(self.reloadAct) @@ -349,7 +349,7 @@ filetb.addAction(self.exitAct) helptb = self.addToolBar(self.tr("Help")) - helptb.setIconSize(UI.Config.ToolBarIconSize) + helptb.setIconSize(Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) def __whatsThis(self):