def fromXmlString(self, xmlString): xmlElement = etree.fromstring(xmlString) newRoot = macro.SequenceNode(None) newRoot.fromXml(xmlElement) self.setRoot(newRoot) self.reset() return newRoot
def fromPlainText(self, text, macroInfos): self.beginResetModel() newRoot = macro.SequenceNode(None) newRoot.fromPlainText(text, macroInfos) self.setRoot(newRoot) self.endResetModel() return newRoot
def fromXmlString(self, xmlString): self.beginResetModel() xmlElement = etree.fromstring(xmlString) newRoot = macro.SequenceNode(None) newRoot.fromXml(xmlElement) self.setRoot(newRoot) self.endResetModel() return newRoot
def clearSequence(self): self.setRoot(macro.SequenceNode())
def __init__(self, parent=None): Qt.QAbstractItemModel.__init__(self, parent) self.columns = 4 self.setRoot(macro.SequenceNode()) self.headers = ["Macro", "Parameters", "Progress", "Pause"]
def fromPlainText(self, text): newRoot = macro.SequenceNode(None) newRoot.fromPlainText(text) self.setRoot(newRoot) self.reset() return newRoot