Exemplo n.º 1
0
 def blockSignals(self, block):
     """
     Blocks the signals from this class. Subclassed in order to also block
     selectionChanged "signal" (callback) options
     @param block: whether to block signal (True) or not (False)
     """
     self.signals_blocked = block
     QTreeView.blockSignals(self, block)
Exemplo n.º 2
0
 def blockSignals(self, block):
     """
     Blocks the signals from this class. Subclassed in order to also block
     selectionChanged "signal" (callback) options
     @param block: whether to block signal (True) or not (False)
     """
     self.signals_blocked = block
     QTreeView.blockSignals(self, block)
Exemplo n.º 3
0
    def __item_selection_changed(self, tree_view: QtWidgets.QTreeView):
        """Manager vor item selection of three views."""
        item = tree_view.currentItem()
        if item is None:
            return

        pi.logger.debug("RevPiFiles.__itemSelectionChanged")

        # Block while preselect other entries
        tree_view.blockSignals(True)

        if item.type() == NodeType.DIR:
            self._select_children(item, item.isSelected())
        elif item.type() == NodeType.FILE:
            self._parent_selection_state(item)

        tree_view.blockSignals(False)

        self._set_gui_control_states()