src/eric7/MicroPython/MicroPythonWidget.py

branch
eric7
changeset 9806
8b375fdd78f1
parent 9772
06ef28082c4d
child 9807
a87b1479b107
equal deleted inserted replaced
9804:b7e200d35be9 9806:8b375fdd78f1
17 from PyQt6.QtGui import QBrush, QClipboard, QColor, QKeySequence, QTextCursor 17 from PyQt6.QtGui import QBrush, QClipboard, QColor, QKeySequence, QTextCursor
18 from PyQt6.QtWidgets import ( 18 from PyQt6.QtWidgets import (
19 QApplication, 19 QApplication,
20 QDialog, 20 QDialog,
21 QHBoxLayout, 21 QHBoxLayout,
22 QLabel,
22 QMenu, 23 QMenu,
23 QSizePolicy, 24 QSizePolicy,
24 QSpacerItem,
25 QTextEdit, 25 QTextEdit,
26 QToolButton, 26 QToolButton,
27 QWidget, 27 QWidget,
28 ) 28 )
29 29
244 self.filesButton.setIcon(EricPixmapCache.getIcon("filemanager")) 244 self.filesButton.setIcon(EricPixmapCache.getIcon("filemanager"))
245 self.chartButton.setIcon(EricPixmapCache.getIcon("chart")) 245 self.chartButton.setIcon(EricPixmapCache.getIcon("chart"))
246 self.connectButton.setIcon(EricPixmapCache.getIcon("linkConnect")) 246 self.connectButton.setIcon(EricPixmapCache.getIcon("linkConnect"))
247 247
248 self.__zoomLayout = QHBoxLayout() 248 self.__zoomLayout = QHBoxLayout()
249 spacerItem = QSpacerItem( 249 self.__osdLabel = QLabel()
250 40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum 250 self.__osdLabel.setSizePolicy(
251 QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred
251 ) 252 )
252 self.__zoomLayout.addSpacerItem(spacerItem) 253 self.__zoomLayout.addWidget(self.__osdLabel)
253 254
254 self.__zoom0 = self.replEdit.fontPointSize() 255 self.__zoom0 = self.replEdit.fontPointSize()
255 self.__zoomWidget = EricZoomWidget( 256 self.__zoomWidget = EricZoomWidget(
256 EricPixmapCache.getPixmap("zoomOut"), 257 EricPixmapCache.getPixmap("zoomOut"),
257 EricPixmapCache.getPixmap("zoomIn"), 258 EricPixmapCache.getPixmap("zoomIn"),
929 # 'set window title' command detected: <Esc>]0;...<Esc>\ 930 # 'set window title' command detected: <Esc>]0;...<Esc>\
930 # __IGNORE_WARNING_M891__ 931 # __IGNORE_WARNING_M891__
931 titleData = data[index + 4 :].split(b"\x1b\\")[0] 932 titleData = data[index + 4 :].split(b"\x1b\\")[0]
932 title = titleData.decode() 933 title = titleData.decode()
933 index += len(titleData) + 5 # one more is done at the end 934 index += len(titleData) + 5 # one more is done at the end
934 tc.deleteChar() 935 self.__osdLabel.setText(title)
935 self.replEdit.setTextCursor(tc)
936 self.replEdit.insertPlainText(title)
937 else: 936 else:
938 # data is incomplete; buffer and stop processing 937 # data is incomplete; buffer and stop processing
939 self.__replBuffer = data[index:] 938 self.__replBuffer = data[index:]
940 return 939 return
941 else: 940 else:

eric ide

mercurial