(self, data=None)
Set the input dataset.
Set the input dataset.
Set the input dataset .
def setData(self, data=None):
        """Set the input dataset."""
        self.closeContext()

        self.data = data
        self.expressions_with_values = False

        if self.data is not None:
            descriptors = list(self.descriptors)
            currindex = self.currentIndex
            self.descriptors = []
            self.currentIndex = -1
            self.openContext(data)
            self.fix_button.setHidden(not self.expressions_with_values)

            if descriptors != self.descriptors or \
                    self.currentIndex != currindex:
                # disconnect from the selection model while reseting the model
                selmodel = self.featureview.selectionModel()
                selmodel.selectionChanged.disconnect(
                    self._on_selectedVariableChanged)

                self.featuremodel[:] = list(self.descriptors)
                self.setCurrentIndex(self.currentIndex)

                selmodel.selectionChanged.connect(
                    self._on_selectedVariableChanged)

        self.editorstack.setEnabled(self.currentIndex >= 0)
def setData ( self , data = None ) : self . closeContext ( ) self . data = data self . expressions_with_values = False if self . data is not None : descriptors = list ( self . descriptors ) currindex = self . currentIndex self . descriptors = [ ] self . currentIndex = - 1 self . openContext ( data ) self . fix_button . setHidden ( not self . expressions_with_values ) if descriptors != self . descriptors or self . currentIndex != currindex : # disconnect from the selection model while reseting the model selmodel = self . featureview . selectionModel ( ) selmodel . selectionChanged . disconnect ( self . _on_selectedVariableChanged ) self . featuremodel [ : ] = list ( self . descriptors ) self . setCurrentIndex ( self . currentIndex ) selmodel . selectionChanged . connect ( self . _on_selectedVariableChanged ) self . editorstack . setEnabled ( self . currentIndex >= 0 )