本文整理汇总了C++中SongList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ SongList::append方法的具体用法?C++ SongList::append怎么用?C++ SongList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SongList
的用法示例。
在下文中一共展示了SongList::append方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CopyToDevice
void PodcastService::CopyToDevice(const QModelIndexList& episode_indexes,
const QModelIndexList& podcast_indexes) {
PodcastEpisode episode_tmp;
SongList songs;
PodcastEpisodeList episodes;
Podcast podcast;
for (const QModelIndex& index : episode_indexes) {
episode_tmp = index.data(Role_Episode).value<PodcastEpisode>();
if (episode_tmp.downloaded()) episodes << episode_tmp;
}
for (const QModelIndex& podcast : podcast_indexes) {
for (int i = 0; i < podcast.model()->rowCount(podcast); ++i) {
const QModelIndex& index = podcast.child(i, 0);
episode_tmp = index.data(Role_Episode).value<PodcastEpisode>();
if (episode_tmp.downloaded() && !episode_tmp.listened())
episodes << episode_tmp;
}
}
for (const PodcastEpisode& episode : episodes) {
podcast = backend_->GetSubscriptionById(episode.podcast_database_id());
songs.append(episode.ToSong(podcast));
}
organise_dialog_->SetDestinationModel(
app_->device_manager()->connected_devices_model(), true);
organise_dialog_->SetCopy(true);
if (organise_dialog_->SetSongs(songs)) organise_dialog_->show();
}
示例2: removeAllCDTracks
void Playlist::removeAllCDTracks(void)
{
// find the cd tracks
SongList cdTracks;
for (int x = 0; x < m_songs.count(); x++)
{
if (m_songs.at(x)->isCDTrack())
cdTracks.append(m_songs.at(x));
}
// remove the tracks from our lists
for (int x = 0; x < cdTracks.count(); x++)
{
m_songs.removeAll(cdTracks.at(x));
m_songMap.remove(cdTracks.at(x)->ID());
m_shuffledSongs.removeAll(cdTracks.at(x));;
}
changed();
}