def __launchOptDeviceRemoving(self, installedDevice, slotIndex): result = yield _CmpOptDeviceRemover(self.__vehicle, installedDevice, slotIndex).request() if result.success: self.__notifyViews('onOptDeviceUpdated') else: processMsg(result)
def installComponent(self, newId): newComponentItem = g_itemsCache.items.getItemByCD(newId) Waiting.show('applyModule') conflictedEqs = newComponentItem.getConflictedEquipments(self.item) result = yield getPreviewInstallerProcessor(self.item, newComponentItem, conflictedEqs).request() processMsg(result) Waiting.hide('applyModule') if result.success: self.refreshModel() self.onComponentInstalled()
def __launchOptDeviceRemoving(self, slotIndex): installedDevice = self.__vehicle.optDevices.installed[slotIndex] if installedDevice is not None: result = yield _CmpOptDeviceRemover(self.__vehicle, installedDevice, slotIndex).request() if result.success: self.__notifyViews('onOptDeviceUpdated') else: processMsg(result) return
def installComponent(self, newId): newComponentItem = self.itemsCache.items.getItemByCD(newId) Waiting.show('applyModule') conflictedEqs = newComponentItem.getConflictedEquipments(self.item) result = yield getPreviewInstallerProcessor(self.item, newComponentItem, conflictedEqs).request() from gui.shared.gui_items.items_actions.actions import processMsg processMsg(result) Waiting.hide('applyModule') if result.success: self.__vehAppearance.refreshVehicle(self.item) self.onComponentInstalled()