Overloads the default QGraphicsScene method to handle cleanup and \
        additional removal options for nodes.
        
        :param      item        <QGraphicsItem>
        
        :return     <bool>

def removeItem( self, item ):
        """
        Overloads the default QGraphicsScene method to handle cleanup and \
        additional removal options for nodes.
        
        :param      item        <QGraphicsItem>
        
        :return     <bool>
        """
        # for nodes and connections, call the prepareToRemove method before 
        # removing
        if ( isinstance( item, XNode ) or 
             isinstance( item, XNodeConnection ) ):
            # make sure this item is ok to remove
            if ( not item.prepareToRemove() ):
                return False
        
        # remove the item using the base class method
        try:
            self._cache.remove(item)
        except KeyError:
            pass
        
        # mark the scene as modified
        self.setModified(True)
        super(XNodeScene, self).removeItem(item)
        
        if not self.signalsBlocked():
            self.itemsRemoved.emit()
        
        return True