コード例 #1
0
 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)
コード例 #2
0
 def restoreState(self, state):
     Node.restoreState(self, state)
     self.files = set(state.get('selected', []))
     for f in self.files:
         self.addOutput(f)
コード例 #3
0
 def saveState(self):
     state = Node.saveState(self)
     state['selected'] = list(self.files)
     return state