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 |