77 Private method to edit the given item. |
77 Private method to edit the given item. |
78 |
78 |
79 @param item reference to the item to be edited |
79 @param item reference to the item to be edited |
80 @type QListWidgetItem |
80 @type QListWidgetItem |
81 """ |
81 """ |
|
82 from .AddEditDevicesDialog import AddEditDevicesDialog |
|
83 |
82 if item is None: |
84 if item is None: |
83 # play it safe |
85 # play it safe |
84 return |
86 return |
85 |
|
86 from .AddEditDevicesDialog import AddEditDevicesDialog |
|
87 |
87 |
88 dlg = AddEditDevicesDialog(deviceData=item.data(self.DeviceDataRole)) |
88 dlg = AddEditDevicesDialog(deviceData=item.data(self.DeviceDataRole)) |
89 if dlg.exec() == QDialog.DialogCode.Accepted: |
89 if dlg.exec() == QDialog.DialogCode.Accepted: |
90 deviceDict = dlg.getDeviceDict() |
90 deviceDict = dlg.getDeviceDict() |
91 item.setData(self.DeviceDataRole, deviceDict) |
91 item.setData(self.DeviceDataRole, deviceDict) |