def __init__(self, data, name, main, editor, saved, app=None): ClassModel.__init__(self, data, name, main, editor, saved, app) self.designerTool = None self.specialAttrs = {} self.defCreateClass = sourceconst.defCreateClass self.defClass = sourceconst.defClass self.defImport = sourceconst.defImport self.defWindowIds = sourceconst.defWindowIds self.defSrcVals = {}
def renameMain(self, oldName, newName): """ Rename the main class of the module """ ClassModel.renameMain(self, oldName, newName) if self.getModule().functions.has_key('create'): self.getModule().replaceFunctionBody('create', [' return %s(parent)'%newName, ''])
def update(self): ClassModel.update(self)
def renameMain(self, oldName, newName): """ Rename the main class of the module """ ClassModel.renameMain(self, oldName, newName) if self.getModule().functions.has_key('create'): self.getModule().replaceFunctionBody( 'create', [' return %s(parent)' % newName, ''])