'Delete node (and its links) from model.'

def deleteNode(self, item):

    widget = self.itemToWidget[item]
    tags = self.canvas.gettags(item)
    if ('Controller' in tags):
        for serachwidget in self.widgetToItem:
            name = serachwidget['text']
            tags = self.canvas.gettags(self.widgetToItem[serachwidget])
            if ('Switch' in tags):
                if (widget['text'] in self.switchOpts[name]['controllers']):
                    self.switchOpts[name]['controllers'].remove(widget['text'])
    for link in widget.links.values():
        self.deleteItem(link)
    del self.itemToWidget[item]
    del self.widgetToItem[widget]
