示例#1
0
void AvailableMusicView::createActions(){
  removeFromAvailableMusic = new QAction(getRemoveMenuItemName(), this); 
  addToActivePlaylist = new QAction(getAdd2ActivePlaylistMenuItemName(), this);
  connect(
    removeFromAvailableMusic,
    SIGNAL(triggered()),
    this,
    SLOT(removeSongsFromAvailableMusic()));
  connect(
    addToActivePlaylist,
    SIGNAL(triggered()),
    this,
    SLOT(addSongsToActivePlaylist()));
}
示例#2
0
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()));
}