33 from python_qt_binding.QtCore
import Signal, Slot
34 from python_qt_binding.QtGui
import QIcon
35 from python_qt_binding.QtWidgets
import QAction
37 from .publisher_tree_model
import PublisherTreeModel
43 remove_publisher = Signal(int)
44 publish_once = Signal(int)
47 super(PublisherTreeWidget, self).
__init__(parent)
50 QIcon.fromTheme(
'list-remove'),
'Remove Selected', self)
53 QIcon.fromTheme(
'media-playback-start'),
'Publish Selected Once', self)
55 self.setItemDelegateForColumn(self.model()._column_index[
'rate'],
60 publisher_ids = self.model().get_publisher_ids(self.selectedIndexes())
61 for publisher_id
in publisher_ids:
63 self.model().remove_items_with_parents(self.selectedIndexes())
66 if self.selectionModel().hasSelection():
76 for publisher_id
in self.model().get_publisher_ids(self.selectedIndexes()):