本文整理汇总了C++中Playlist::removeTrack方法的典型用法代码示例。如果您正苦于以下问题:C++ Playlist::removeTrack方法的具体用法?C++ Playlist::removeTrack怎么用?C++ Playlist::removeTrack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::removeTrack方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteTrack
void DatabaseBox::deleteTrack(UIListGenericTree *item)
{
if (PlaylistTrack *delete_item = dynamic_cast<PlaylistCD*>(item) )
{
if (delete_item->nextSibling(1))
tree->MoveDown();
else if (delete_item->prevSibling(1))
tree->MoveUp();
UIListGenericTree *newItem = (UIListGenericTree *)delete_item->getParent();
if (TreeCheckItem *item_owner = dynamic_cast<TreeCheckItem*>(newItem))
{
Playlist *owner =
gMusicData->all_playlists->getPlaylist(item_owner->getID() * -1);
if (owner)
owner->removeTrack(delete_item->getID(), true);
}
else if (PlaylistTitle *item_owner = dynamic_cast<PlaylistTitle*>(newItem))
{
(void)item_owner;
active_playlist->removeTrack(delete_item->getID(), true);
}
else
{
LOG(VB_GENERAL, LOG_ERR, "deleteTrack() - I don't know how to "
"delete whatever you're trying to get "
"rid of");
}
gMusicData->all_playlists->refreshRelevantPlaylists(alllists);
checkTree();
}
else if (PlaylistTrack *delete_item = dynamic_cast<PlaylistTrack*>(item))
{
if (delete_item->nextSibling(1))
tree->MoveDown();
else if (delete_item->prevSibling(1))
tree->MoveUp();
UIListGenericTree *newItem = (UIListGenericTree *)delete_item->getParent();
if (TreeCheckItem *item_owner = dynamic_cast<TreeCheckItem*>(newItem))
{
Playlist *owner =
gMusicData->all_playlists->getPlaylist(item_owner->getID() * -1);
if (owner)
owner->removeTrack(delete_item->getID(), false);
}
else if (PlaylistTitle *item_owner = dynamic_cast<PlaylistTitle*>(newItem))
{
(void)item_owner;
active_playlist->removeTrack(delete_item->getID(), false);
}
else
{
LOG(VB_GENERAL, LOG_ERR, "deleteTrack() - I don't know how to "
"delete whatever you're trying to get "
"rid of");
}
gMusicData->all_playlists->refreshRelevantPlaylists(alllists);
checkTree();
}
}