1126 self.__superMenu.addSeparator() |
1126 self.__superMenu.addSeparator() |
1127 if self.__device: |
1127 if self.__device: |
1128 self.__device.addDeviceMenuEntries(self.__superMenu) |
1128 self.__device.addDeviceMenuEntries(self.__superMenu) |
1129 self.__superMenu.addSeparator() |
1129 self.__superMenu.addSeparator() |
1130 act = self.__superMenu.addAction( |
1130 act = self.__superMenu.addAction( |
|
1131 self.tr("Download Firmware"), self.__downloadFirmware) |
|
1132 act.setEnabled(self.__device.hasFirmwareUrl()) |
|
1133 self.__superMenu.addSeparator() |
|
1134 act = self.__superMenu.addAction( |
1131 self.tr("Show Documentation"), self.__showDocumentation) |
1135 self.tr("Show Documentation"), self.__showDocumentation) |
1132 act.setEnabled(self.__device.hasDocumentationUrl()) |
1136 act.setEnabled(self.__device.hasDocumentationUrl()) |
1133 self.__superMenu.addSeparator() |
1137 self.__superMenu.addSeparator() |
1134 self.__superMenu.addAction(self.tr("Configure"), self.__configure) |
1138 self.__superMenu.addAction(self.tr("Configure"), self.__configure) |
1135 |
1139 |
1450 |
1454 |
1451 url = self.__device.getDocumentationUrl() |
1455 url = self.__device.getDocumentationUrl() |
1452 e5App().getObject("UserInterface").launchHelpViewer(url) |
1456 e5App().getObject("UserInterface").launchHelpViewer(url) |
1453 |
1457 |
1454 @pyqtSlot() |
1458 @pyqtSlot() |
|
1459 def __downloadFirmware(self): |
|
1460 """ |
|
1461 Private slot to open the firmware download page. |
|
1462 """ |
|
1463 if self.__device is None or not self.__device.hasFirmwareUrl(): |
|
1464 # abort silently |
|
1465 return |
|
1466 |
|
1467 url = self.__device.getFirmwareUrl() |
|
1468 e5App().getObject("UserInterface").launchHelpViewer(url) |
|
1469 |
|
1470 @pyqtSlot() |
1455 def __configure(self): |
1471 def __configure(self): |
1456 """ |
1472 """ |
1457 Private slot to open the MicroPython configuration page. |
1473 Private slot to open the MicroPython configuration page. |
1458 """ |
1474 """ |
1459 e5App().getObject("UserInterface").showPreferences("microPythonPage") |
1475 e5App().getObject("UserInterface").showPreferences("microPythonPage") |