eric6/MicroPython/EspDevices.py

branch
micropython
changeset 7065
e3d04faced34
parent 7059
a8fad276cbd5
child 7077
3b7475b7a1ef
equal deleted inserted replaced
7062:ac12da95958b 7065:e3d04faced34
7 Module implementing some utility functions and the MicroPythonDevice base 7 Module implementing some utility functions and the MicroPythonDevice base
8 class. 8 class.
9 """ 9 """
10 10
11 from __future__ import unicode_literals 11 from __future__ import unicode_literals
12
13 from PyQt5.QtCore import pyqtSlot
12 14
13 from .MicroPythonDevices import MicroPythonDevice 15 from .MicroPythonDevices import MicroPythonDevice
14 from .MicroPythonReplWidget import HAS_QTCHART 16 from .MicroPythonReplWidget import HAS_QTCHART
15 17
16 18
73 75
74 @param on flag indicating the active status 76 @param on flag indicating the active status
75 @type bool 77 @type bool
76 """ 78 """
77 self.__replActive = on 79 self.__replActive = on
78 self.microPython.setActionButtons(files=not on) 80 self.microPython.setActionButtons(
81 files=not (on or self.__plotterActive))
79 82
80 def canStartPlotter(self): 83 def canStartPlotter(self):
81 """ 84 """
82 Public method to determine, if a Plotter can be started. 85 Public method to determine, if a Plotter can be started.
83 86
99 102
100 @param on flag indicating the active status 103 @param on flag indicating the active status
101 @type bool 104 @type bool
102 """ 105 """
103 self.__plotterActive = on 106 self.__plotterActive = on
104 self.microPython.setActionButtons(files=not on) 107 self.microPython.setActionButtons(
108 files=not (on or self.__replActive))
105 109
106 def canRunScript(self): 110 def canRunScript(self):
107 """ 111 """
108 Public method to determine, if a Plotter can be started. 112 Public method to determine, if a Plotter can be started.
109 113
141 145
142 @param on flag indicating the active status 146 @param on flag indicating the active status
143 @type bool 147 @type bool
144 """ 148 """
145 pass 149 pass
150
151 @pyqtSlot()
152 def handleDataFlood(self):
153 """
154 Public slot handling a data floof from the device.
155 """
156 self.microPython.setActionButtons(files=True)

eric ide

mercurial