(self, items: List[ClusterGraphicsItem])
Set the item selection.
Set the item selection.
Set the item selection .
def setSelectedItems(self, items: List[ClusterGraphicsItem]):
        """Set the item selection."""
        to_remove = set(self._selection) - set(items)
        to_add = set(items) - set(self._selection)

        for sel in to_remove:
            self._remove_selection(sel)
        for sel in to_add:
            self._add_selection(sel)

        if to_add or to_remove:
            self._re_enumerate_selections()
            self.selectionChanged.emit()
def setSelectedItems ( self , items : List [ ClusterGraphicsItem ] ) : to_remove = set ( self . _selection ) - set ( items ) to_add = set ( items ) - set ( self . _selection ) for sel in to_remove : self . _remove_selection ( sel ) for sel in to_add : self . _add_selection ( sel ) if to_add or to_remove : self . _re_enumerate_selections ( ) self . selectionChanged . emit ( )