diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/MicroPython/MicroPythonWidget.py --- a/src/eric7/MicroPython/MicroPythonWidget.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/MicroPython/MicroPythonWidget.py Tue Oct 18 16:06:21 2022 +0200 @@ -26,11 +26,11 @@ QDialog, ) -from EricWidgets.EricZoomWidget import EricZoomWidget -from EricWidgets import EricMessageBox, EricFileDialog -from EricWidgets.EricApplication import ericApp -from EricWidgets.EricProcessDialog import EricProcessDialog -from EricGui.EricOverrideCursor import EricOverrideCursor, EricOverridenCursor +from eric7.EricWidgets.EricZoomWidget import EricZoomWidget +from eric7.EricWidgets import EricMessageBox, EricFileDialog +from eric7.EricWidgets.EricApplication import ericApp +from eric7.EricWidgets.EricProcessDialog import EricProcessDialog +from eric7.EricGui.EricOverrideCursor import EricOverrideCursor, EricOverridenCursor from .Ui_MicroPythonWidget import Ui_MicroPythonWidget @@ -52,12 +52,10 @@ except ImportError: HAS_QTSERIALPORT = False -import Globals -import UI.PixmapCache -import Preferences -import Utilities +from eric7.EricGui import EricPixmapCache +from eric7 import Globals, Preferences, Utilities -from UI.Info import BugAddress +from eric7.UI.Info import BugAddress # ANSI Colors (see https://en.wikipedia.org/wiki/ANSI_escape_code) AnsiColorSchemes = { @@ -229,7 +227,7 @@ self.__superMenu.aboutToShow.connect(self.__aboutToShowSuperMenu) self.menuButton.setObjectName("micropython_supermenu_button") - self.menuButton.setIcon(UI.PixmapCache.getIcon("superMenu")) + self.menuButton.setIcon(EricPixmapCache.getIcon("superMenu")) self.menuButton.setToolTip(self.tr("MicroPython Menu")) self.menuButton.setPopupMode(QToolButton.ToolButtonPopupMode.InstantPopup) self.menuButton.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly) @@ -240,15 +238,15 @@ self.deviceIconLabel.setPixmap(MicroPythonDevices.getDeviceIcon("", False)) - self.openButton.setIcon(UI.PixmapCache.getIcon("open")) - self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSaveAs")) + self.openButton.setIcon(EricPixmapCache.getIcon("open")) + self.saveButton.setIcon(EricPixmapCache.getIcon("fileSaveAs")) - self.checkButton.setIcon(UI.PixmapCache.getIcon("question")) - self.runButton.setIcon(UI.PixmapCache.getIcon("start")) - self.replButton.setIcon(UI.PixmapCache.getIcon("terminal")) - self.filesButton.setIcon(UI.PixmapCache.getIcon("filemanager")) - self.chartButton.setIcon(UI.PixmapCache.getIcon("chart")) - self.connectButton.setIcon(UI.PixmapCache.getIcon("linkConnect")) + self.checkButton.setIcon(EricPixmapCache.getIcon("question")) + self.runButton.setIcon(EricPixmapCache.getIcon("start")) + self.replButton.setIcon(EricPixmapCache.getIcon("terminal")) + self.filesButton.setIcon(EricPixmapCache.getIcon("filemanager")) + self.chartButton.setIcon(EricPixmapCache.getIcon("chart")) + self.connectButton.setIcon(EricPixmapCache.getIcon("linkConnect")) self.__zoomLayout = QHBoxLayout() spacerItem = QSpacerItem( @@ -258,9 +256,9 @@ self.__zoom0 = self.replEdit.fontPointSize() self.__zoomWidget = EricZoomWidget( - UI.PixmapCache.getPixmap("zoomOut"), - UI.PixmapCache.getPixmap("zoomIn"), - UI.PixmapCache.getPixmap("zoomReset"), + EricPixmapCache.getPixmap("zoomOut"), + EricPixmapCache.getPixmap("zoomIn"), + EricPixmapCache.getPixmap("zoomReset"), self, ) self.__zoomLayout.addWidget(self.__zoomWidget) @@ -555,19 +553,19 @@ menu = QMenu(self) act = menu.addAction( - UI.PixmapCache.getIcon("editDelete"), self.tr("Clear"), self.__clear + EricPixmapCache.getIcon("editDelete"), self.tr("Clear"), self.__clear ) act.setEnabled(bool(self.replEdit.toPlainText())) menu.addSeparator() act = menu.addAction( - UI.PixmapCache.getIcon("editCopy"), + EricPixmapCache.getIcon("editCopy"), self.tr("Copy"), copyKeys, self.replEdit.copy, ) act.setEnabled(self.replEdit.textCursor().hasSelection()) act = menu.addAction( - UI.PixmapCache.getIcon("editPaste"), + EricPixmapCache.getIcon("editPaste"), self.tr("Paste"), pasteKeys, self.__paste, @@ -575,7 +573,7 @@ act.setEnabled(self.replEdit.canPaste() and self.__interface.isConnected()) menu.addSeparator() act = menu.addAction( - UI.PixmapCache.getIcon("editSelectAll"), + EricPixmapCache.getIcon("editSelectAll"), self.tr("Select All"), selectAllKeys, self.replEdit.selectAll, @@ -600,12 +598,12 @@ self.deviceTypeComboBox.setEnabled(not connected) if connected: - self.connectButton.setIcon(UI.PixmapCache.getIcon("linkDisconnect")) + self.connectButton.setIcon(EricPixmapCache.getIcon("linkDisconnect")) self.connectButton.setToolTip( self.tr("Press to disconnect the current device") ) else: - self.connectButton.setIcon(UI.PixmapCache.getIcon("linkConnect")) + self.connectButton.setIcon(EricPixmapCache.getIcon("linkConnect")) self.connectButton.setToolTip( self.tr("Press to connect the selected device") ) @@ -1266,7 +1264,7 @@ self.__ui.addSideWidget( self.__ui.BottomSide, self.__chartWidget, - UI.PixmapCache.getIcon("chart"), + EricPixmapCache.getIcon("chart"), self.tr("µPy Chart"), ) self.__ui.showSideWidget(self.__chartWidget) @@ -1352,7 +1350,7 @@ self.__ui.addSideWidget( self.__ui.BottomSide, self.__fileManagerWidget, - UI.PixmapCache.getIcon("filemanager"), + EricPixmapCache.getIcon("filemanager"), self.tr("µPy Files"), ) self.__ui.showSideWidget(self.__fileManagerWidget) @@ -1889,7 +1887,9 @@ from .AddEditDevicesDialog import AddEditDevicesDialog if len(devices) > 1: - from EricWidgets.EricListSelectionDialog import EricListSelectionDialog + from eric7.EricWidgets.EricListSelectionDialog import ( + EricListSelectionDialog, + ) sdlg = EricListSelectionDialog( [d[2] for d in devices],