void LibraryPage::deleteSongs() { QList<Song> songs=selectedSongs(); if (!songs.isEmpty()) { if (MessageBox::Yes==MessageBox::warningYesNo(this, i18n("Are you sure you wish to delete the selected songs?\n\nThis cannot be undone."), i18n("Delete Songs"), StdGuiItem::del(), StdGuiItem::cancel())) { emit deleteSongs(QString(), songs); } view->clearSelection(); } }
void LibraryView::createActions(){ deleteSongAction = new QAction(getDeleteContextMenuItemName(), this); addToPlaylistAction = new QAction(getAddToPlaylistContextMenuItemName(), this); connect( deleteSongAction, SIGNAL(triggered()), this, SLOT(deleteSongs())); connect( addToPlaylistAction, SIGNAL(triggered()), this, SLOT(addSongsToActivePlaylist())); }