当前位置: 首页>>代码示例>>C++>>正文


C++ Playlist::set_ui_path方法代码示例

本文整理汇总了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;
}
开发者ID:Fat-Zer,项目名称:Clementine,代码行数:34,代码来源:playlistmanager.cpp

示例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);
  }
}
开发者ID:Chemrat,项目名称:Clementine,代码行数:10,代码来源:playlistlistcontainer.cpp


注:本文中的Playlist::set_ui_path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。