102 @type bool |
102 @type bool |
103 """ |
103 """ |
104 self.__plotterActive = on |
104 self.__plotterActive = on |
105 self.microPython.setActionButtons(files=not on) |
105 self.microPython.setActionButtons(files=not on) |
106 |
106 |
107 # TODO: not yet implemented |
|
108 def canStartFileManager(self): |
107 def canStartFileManager(self): |
109 """ |
108 """ |
110 Public method to determine, if a File Manager can be started. |
109 Public method to determine, if a File Manager can be started. |
111 |
110 |
112 @return tuple containing a flag indicating it is safe to start a |
111 @return tuple containing a flag indicating it is safe to start a |
113 File Manager and a reason why it cannot. |
112 File Manager and a reason why it cannot. |
114 @rtype tuple of (bool, str) |
113 @rtype tuple of (bool, str) |
115 """ |
114 """ |
116 return False, self.tr("File Manager is not supported by this device.") |
115 if self.__replActive or self.__plotterActive: |
|
116 return False, self.tr("The file manager and the REPL/plotter use" |
|
117 " the same USB serial connection. Only one" |
|
118 " can be active at any time. Disconnect the" |
|
119 " REPL/plotter and try again.") |
|
120 else: |
|
121 return True, "" |
117 |
122 |
118 # TODO: not yet implemented |
|
119 def setFileManager(self, on): |
123 def setFileManager(self, on): |
120 """ |
124 """ |
121 Public method to set the File Manager status and dependent status. |
125 Public method to set the File Manager status and dependent status. |
122 |
126 |
123 @param on flag indicating the active status |
127 @param on flag indicating the active status |
124 @type bool |
128 @type bool |
125 """ |
129 """ |
126 pass |
130 self.__fileManagerActive = on |
|
131 self.microPython.setActionButtons( |
|
132 run=not on, repl=not on, chart=HAS_QTCHART and not on) |
127 |
133 |
128 @pyqtSlot() |
134 @pyqtSlot() |
129 def handleDataFlood(self): |
135 def handleDataFlood(self): |
130 """ |
136 """ |
131 Public slot handling a data floof from the device. |
137 Public slot handling a data floof from the device. |