def onPlaylistChange(self):
        playlist = self.playlist
        event = {'event': 'PlaylistChanged',
                 'data': {'playlist': playlist.playlistData,
                          'hasUndo': playlist.hasUndo,
                          'hasRedo': playlist.hasRedo,
                          'position': playlist.currentPosition}}
        self.announce(event)