1
0

delete channel

This commit is contained in:
Sander van Grieken
2022-06-30 22:57:20 +02:00
parent 456b6048ea
commit db9e2ab311
4 changed files with 46 additions and 3 deletions

View File

@@ -149,4 +149,15 @@ class QEChannelListModel(QAbstractListModel):
self.beginInsertRows(QModelIndex(), 0, 0)
self.channels.insert(0,item)
self.endInsertRows()
self.numOpenChannelsChanged.emit()
@pyqtSlot(str)
def remove_channel(self, cid):
i = 0
for channel in self.channels:
if cid == channel['cid']:
self._logger.debug(cid)
self.beginRemoveRows(QModelIndex(), i, i)
self.channels.remove(channel)
self.endRemoveRows()
return
i = i + 1