def __init__(self, name): Node.__init__(self, name, terminals={'In': {'io': 'in'}}) self.root = None self.files = set() self.lastInput = None self.fileList = DirTreeWidget(checkState=False, allowMove=False, allowRename=False) #QtCore.QObject.connect(self.fileList, QtCore.SIGNAL('itemChanged(QTreeWidgetItem*, int)'), self.itemChanged) self.fileList.itemChanged.connect(self.itemChanged)
def restoreState(self, state): Node.restoreState(self, state) self.files = set(state.get('selected', [])) for f in self.files: self.addOutput(f)
def saveState(self): state = Node.saveState(self) state['selected'] = list(self.files) return state