1048 def __aboutToShowSuperMenu(self): |
1048 def __aboutToShowSuperMenu(self): |
1049 """ |
1049 """ |
1050 Private slot to populate the Super Menu before showing it. |
1050 Private slot to populate the Super Menu before showing it. |
1051 """ |
1051 """ |
1052 self.__superMenu.clear() |
1052 self.__superMenu.clear() |
|
1053 if self.__device: |
|
1054 hasTime = self.__device.hasTimeCommands() |
|
1055 else: |
|
1056 hasTime = False |
1053 |
1057 |
1054 act = self.__superMenu.addAction( |
1058 act = self.__superMenu.addAction( |
1055 self.tr("Show Version"), self.__showDeviceVersion) |
1059 self.tr("Show Version"), self.__showDeviceVersion) |
1056 act.setEnabled(self.__connected) |
1060 act.setEnabled(self.__connected) |
1057 act = self.__superMenu.addAction( |
1061 act = self.__superMenu.addAction( |
1058 self.tr("Show Implementation"), self.__showImplementation) |
1062 self.tr("Show Implementation"), self.__showImplementation) |
1059 act.setEnabled(self.__connected) |
1063 act.setEnabled(self.__connected) |
1060 self.__superMenu.addSeparator() |
1064 self.__superMenu.addSeparator() |
1061 act = self.__superMenu.addAction( |
1065 if hasTime: |
1062 self.tr("Synchronize Time"), self.__synchronizeTime) |
1066 act = self.__superMenu.addAction( |
1063 act.setEnabled(self.__connected) |
1067 self.tr("Synchronize Time"), self.__synchronizeTime) |
1064 act = self.__superMenu.addAction( |
1068 act.setEnabled(self.__connected) |
1065 self.tr("Show Time"), self.__showDeviceTime) |
1069 act = self.__superMenu.addAction( |
1066 act.setEnabled(self.__connected) |
1070 self.tr("Show Time"), self.__showDeviceTime) |
1067 self.__superMenu.addSeparator() |
1071 act.setEnabled(self.__connected) |
|
1072 self.__superMenu.addSeparator() |
1068 if self.__device: |
1073 if self.__device: |
1069 self.__device.addDeviceMenuEntries(self.__superMenu) |
1074 self.__device.addDeviceMenuEntries(self.__superMenu) |
1070 |
1075 |
1071 @pyqtSlot() |
1076 @pyqtSlot() |
1072 def __showDeviceVersion(self): |
1077 def __showDeviceVersion(self): |