def _disconnectAll(self): ''' Disconnects all devices. ''' log.debug("Disconnecting all devices") for dev in devices.all(): self._updateConnectionState(False, dev)
def unload(self): ''' Disconnect and unload all current devices from the dialog. ''' log.debug("Unloading device list") for dev in devices.all(): self._updateConnectionState(False, dev)
def _connectAll(self): ''' Connects all devices. ''' log.debug("Connecting all devices") for dev in devices.all(): self._updateConnectionState(True, dev)
def _refresh(self): ''' Refreshes the list of devices. ''' log.debug("Refreshing device list") devices.load(type=Device) for dev in self._deviceItems.keys()[:]: if devices.get(dev.name) is None and not dev.isConnected(): self._removeDeviceItem(dev) for dev in devices.all(): if dev not in self._deviceItems: self._addDeviceItem(dev) self._updateDialogButtons()