(self, index: int, data: Table)
Set the input dataset.
Set the input dataset.
Set the input dataset .
def set_dataset(self, index: int, data: Table):
        """Set the input dataset."""
        datasetname = getattr(data, "name", "Data")
        slot = self._inputs[index]
        view = slot.view
        # reset the (header) view state.
        view.setModel(None)
        view.horizontalHeader().setSortIndicator(-1, Qt.AscendingOrder)
        assert self.tabs.indexOf(view) != -1
        self.tabs.setTabText(self.tabs.indexOf(view), datasetname)
        view.dataset = data
        slot = TableSlot(index, data, table_summary(data), view)
        view.input_slot = slot
        self._inputs[index] = slot
        self._setup_table_view(view, data)
        self.tabs.setCurrentWidget(view)
def set_dataset ( self , index : int , data : Table ) : datasetname = getattr ( data , "name" , "Data" ) slot = self . _inputs [ index ] view = slot . view # reset the (header) view state. view . setModel ( None ) view . horizontalHeader ( ) . setSortIndicator ( - 1 , Qt . AscendingOrder ) assert self . tabs . indexOf ( view ) != - 1 self . tabs . setTabText ( self . tabs . indexOf ( view ) , datasetname ) view . dataset = data slot = TableSlot ( index , data , table_summary ( data ) , view ) view . input_slot = slot self . _inputs [ index ] = slot self . _setup_table_view ( view , data ) self . tabs . setCurrentWidget ( view )