164 @type bool (optional) |
164 @type bool (optional) |
165 """ |
165 """ |
166 from .ShowBundlesDialog import ShowBundlesDialog |
166 from .ShowBundlesDialog import ShowBundlesDialog |
167 |
167 |
168 with EricOverrideCursor(): |
168 with EricOverrideCursor(): |
169 dlg = ShowBundlesDialog(withModules=withModules) |
169 dlg = ShowBundlesDialog( |
|
170 withModules=withModules, parent=self.__device.microPython |
|
171 ) |
170 dlg.exec() |
172 dlg.exec() |
171 |
173 |
172 @pyqtSlot() |
174 @pyqtSlot() |
173 def __showBundlesModules(self): |
175 def __showBundlesModules(self): |
174 """ |
176 """ |
299 |
301 |
300 cpyVersion, _board_id = circup.get_circuitpython_version(devicePath) |
302 cpyVersion, _board_id = circup.get_circuitpython_version(devicePath) |
301 circup.CPY_VERSION = cpyVersion |
303 circup.CPY_VERSION = cpyVersion |
302 |
304 |
303 with EricOverrideCursor(): |
305 with EricOverrideCursor(): |
304 dlg = ShowOutdatedDialog(devicePath=devicePath) |
306 dlg = ShowOutdatedDialog( |
|
307 devicePath=devicePath, parent=self.__device.microPython |
|
308 ) |
305 dlg.exec() |
309 dlg.exec() |
306 |
310 |
307 @pyqtSlot() |
311 @pyqtSlot() |
308 def __updateModules(self): |
312 def __updateModules(self): |
309 """ |
313 """ |
315 |
319 |
316 cpyVersion, _board_id = circup.get_circuitpython_version(devicePath) |
320 cpyVersion, _board_id = circup.get_circuitpython_version(devicePath) |
317 circup.CPY_VERSION = cpyVersion |
321 circup.CPY_VERSION = cpyVersion |
318 |
322 |
319 with EricOverrideCursor(): |
323 with EricOverrideCursor(): |
320 dlg = ShowOutdatedDialog(devicePath=devicePath, selectionMode=True) |
324 dlg = ShowOutdatedDialog( |
|
325 devicePath=devicePath, |
|
326 selectionMode=True, |
|
327 parent=self.__device.microPython, |
|
328 ) |
321 if dlg.exec() == QDialog.DialogCode.Accepted: |
329 if dlg.exec() == QDialog.DialogCode.Accepted: |
322 modules = dlg.getSelection() |
330 modules = dlg.getSelection() |
323 self.__doUpdateModules(modules) |
331 self.__doUpdateModules(modules) |
324 |
332 |
325 @pyqtSlot() |
333 @pyqtSlot() |
397 |
405 |
398 with EricOverrideCursor(): |
406 with EricOverrideCursor(): |
399 availableModules = circup.get_bundle_versions(circup.get_bundles_list()) |
407 availableModules = circup.get_bundle_versions(circup.get_bundles_list()) |
400 moduleNames = [m.replace(".py", "") for m in availableModules] |
408 moduleNames = [m.replace(".py", "") for m in availableModules] |
401 |
409 |
402 dlg = ShowModulesDialog(moduleNames) |
410 dlg = ShowModulesDialog(moduleNames, parent=self.__device.microPython) |
403 dlg.exec() |
411 dlg.exec() |
404 |
412 |
405 @pyqtSlot() |
413 @pyqtSlot() |
406 def __showInstalledModules(self): |
414 def __showInstalledModules(self): |
407 """ |
415 """ |
410 from .ShowInstalledDialog import ShowInstalledDialog |
418 from .ShowInstalledDialog import ShowInstalledDialog |
411 |
419 |
412 devicePath = self.__device.getWorkspace() |
420 devicePath = self.__device.getWorkspace() |
413 |
421 |
414 with EricOverrideCursor(): |
422 with EricOverrideCursor(): |
415 dlg = ShowInstalledDialog(devicePath=devicePath) |
423 dlg = ShowInstalledDialog( |
|
424 devicePath=devicePath, parent=self.__device.microPython |
|
425 ) |
416 dlg.exec() |
426 dlg.exec() |
417 |
427 |
418 @pyqtSlot() |
428 @pyqtSlot() |
419 def __installFromAvailable(self): |
429 def __installFromAvailable(self): |
420 """ |
430 """ |
424 |
434 |
425 with EricOverrideCursor(): |
435 with EricOverrideCursor(): |
426 availableModules = circup.get_bundle_versions(circup.get_bundles_list()) |
436 availableModules = circup.get_bundle_versions(circup.get_bundles_list()) |
427 moduleNames = [m.replace(".py", "") for m in availableModules] |
437 moduleNames = [m.replace(".py", "") for m in availableModules] |
428 |
438 |
429 dlg = ShowModulesDialog(moduleNames, selectionMode=True) |
439 dlg = ShowModulesDialog( |
|
440 moduleNames, selectionMode=True, parent=self.__device.microPython |
|
441 ) |
430 if dlg.exec() == QDialog.DialogCode.Accepted: |
442 if dlg.exec() == QDialog.DialogCode.Accepted: |
431 modules = dlg.getSelection() |
443 modules = dlg.getSelection() |
432 self.__installModules(modules) |
444 self.__installModules(modules) |
433 |
445 |
434 @pyqtSlot() |
446 @pyqtSlot() |
656 devicePath = self.__device.getWorkspace() |
668 devicePath = self.__device.getWorkspace() |
657 |
669 |
658 cpyVersion, _board_id = circup.get_circuitpython_version(devicePath) |
670 cpyVersion, _board_id = circup.get_circuitpython_version(devicePath) |
659 circup.CPY_VERSION = cpyVersion |
671 circup.CPY_VERSION = cpyVersion |
660 |
672 |
661 dlg = RequirementsDialog(devicePath=devicePath) |
673 dlg = RequirementsDialog( |
|
674 devicePath=devicePath, parent=self.__device.microPython |
|
675 ) |
662 dlg.exec() |
676 dlg.exec() |
663 |
677 |
664 @pyqtSlot() |
678 @pyqtSlot() |
665 def __showCachePath(self): |
679 def __showCachePath(self): |
666 """ |
680 """ |