code: def save(self):
          
          enabled = self.checkState(0) == QtCore.Qt.Checked
          self._element.set('name', nativestring(self.text(0)))
          self._element.set('enabled', nativestring(enabled))
          
          for child in self.children():
              child.save()
docs: Saves the state for this item to the scaffold.