(self)
return self.var, tr
Retrieve the modified variable.
Retrieve the modified variable.
Retrieve the modified variable .
def get_data(self):
        """Retrieve the modified variable.
        """
        if self.var is None:
            return None, []
        name = self.name_edit.text().strip()
        labels = tuple(sorted(self.labels_model.get_dict().items()))
        tr = []
        if self.var.name != name:
            tr.append(Rename(name))
        if self.var.annotations != labels:
            tr.append(Annotate(labels))
        if self.var.linked and self.unlink_var_cb.isChecked():
            tr.append(Unlink())
        return self.var, tr
def get_data ( self ) : if self . var is None : return None , [ ] name = self . name_edit . text ( ) . strip ( ) labels = tuple ( sorted ( self . labels_model . get_dict ( ) . items ( ) ) ) tr = [ ] if self . var . name != name : tr . append ( Rename ( name ) ) if self . var . annotations != labels : tr . append ( Annotate ( labels ) ) if self . var . linked and self . unlink_var_cb . isChecked ( ) : tr . append ( Unlink ( ) ) return self . var , tr