本文整理汇总了C++中Playlist::set_ui_path方法的典型用法代码示例。如果您正苦于以下问题:C++ Playlist::set_ui_path方法的具体用法?C++ Playlist::set_ui_path怎么用?C++ Playlist::set_ui_path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::set_ui_path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddPlaylist
Playlist* PlaylistManager::AddPlaylist(int id, const QString& name,
const QString& special_type,
const QString& ui_path, bool favorite) {
Playlist* ret = new Playlist(playlist_backend_, app_->task_manager(),
library_backend_, id, special_type, favorite);
ret->set_sequence(sequence_);
ret->set_ui_path(ui_path);
connect(ret, SIGNAL(CurrentSongChanged(Song)),
SIGNAL(CurrentSongChanged(Song)));
connect(ret, SIGNAL(PlaylistChanged()), SLOT(OneOfPlaylistsChanged()));
connect(ret, SIGNAL(PlaylistChanged()), SLOT(UpdateSummaryText()));
connect(ret, SIGNAL(EditingFinished(QModelIndex)),
SIGNAL(EditingFinished(QModelIndex)));
connect(ret, SIGNAL(Error(QString)), SIGNAL(Error(QString)));
connect(ret, SIGNAL(PlayRequested(QModelIndex)),
SIGNAL(PlayRequested(QModelIndex)));
connect(playlist_container_->view(),
SIGNAL(ColumnAlignmentChanged(ColumnAlignmentMap)), ret,
SLOT(SetColumnAlignment(ColumnAlignmentMap)));
playlists_[id] = Data(ret, name);
emit PlaylistAdded(id, name, favorite);
if (current_ == -1) {
SetCurrentPlaylist(id);
}
if (active_ == -1) {
SetActivePlaylist(id);
}
return ret;
}
示例2: PlaylistPathChanged
void PlaylistListContainer::PlaylistPathChanged(int id,
const QString& new_path) {
// Update the path in the database
app_->playlist_backend()->SetPlaylistUiPath(id, new_path);
Playlist* playlist = app_->playlist_manager()->playlist(id);
// Check the playlist exists (if it's not opened it's not in the manager)
if (playlist) {
playlist->set_ui_path(new_path);
}
}