Пример #1
0
void PlaylistTabBar::PlaylistManagerInitialized() {
  // Signal that we are done loading and thus further changes should be
  // committed to the db.
  initialized_ = true;
  disconnect(manager_, SIGNAL(PlaylistManagerInitialized()), this,
             SLOT(PlaylistManagerInitialized()));
}
Пример #2
0
void PlaylistTabBar::SetManager(PlaylistManager* manager) {
  manager_ = manager;
  connect(manager_, SIGNAL(PlaylistFavorited(int, bool)),
          SLOT(PlaylistFavoritedSlot(int, bool)));
  connect(manager_, SIGNAL(PlaylistManagerInitialized()), this,
          SLOT(PlaylistManagerInitialized()));
}
IncomingDataParser::IncomingDataParser(Application* app)
  :app_(app)
{
  // Connect all the signals
  // due the player is in a different thread, we cannot access these functions directly
  connect(this, SIGNAL(Play()),
          app_->player(), SLOT(Play()));
  connect(this, SIGNAL(PlayPause()),
          app_->player(), SLOT(PlayPause()));
  connect(this, SIGNAL(Pause()),
          app_->player(), SLOT(Pause()));
  connect(this, SIGNAL(Stop()),
          app_->player(), SLOT(Stop()));
  connect(this, SIGNAL(Next()),
          app_->player(), SLOT(Next()));
  connect(this, SIGNAL(Previous()),
          app_->player(), SLOT(Previous()));
  connect(this, SIGNAL(SetVolume(int)),
          app_->player(), SLOT(SetVolume(int)));
  connect(this, SIGNAL(PlayAt(int,Engine::TrackChangeFlags,bool)),
          app_->player(), SLOT(PlayAt(int,Engine::TrackChangeFlags,bool)));
  connect(this, SIGNAL(SeekTo(int)),
          app_->player(), SLOT(SeekTo(int)));

  // For some connects we have to wait for the playlistmanager
  // to be initialized
  connect(app_->playlist_manager(), SIGNAL(PlaylistManagerInitialized()),
          this, SLOT(PlaylistManagerInitialized()));
}
Пример #4
0
NetworkRemoteHelper::NetworkRemoteHelper(Application* app)
  : app_(app)
{
  app_ = app;
  connect(this, SIGNAL(ReloadSettingsSig()),
          app_->network_remote(), SLOT(ReloadSettings()));
  connect(this, SIGNAL(StartServerSig()),
          app_->network_remote(), SLOT(StartServer()));
  connect(this, SIGNAL(SetupServerSig()),
          app_->network_remote(), SLOT(SetupServer()));

  // Start the server once the playlistmanager is initialized
  connect(app_->playlist_manager(), SIGNAL(PlaylistManagerInitialized()),
          this, SLOT(StartServer()));

  sInstance = this;
}
Пример #5
0
void PlaylistContainer::SetManager(PlaylistManager* manager) {
  manager_ = manager;
  ui_->tab_bar->SetManager(manager);

  connect(ui_->tab_bar, SIGNAL(CurrentIdChanged(int)), manager,
          SLOT(SetCurrentPlaylist(int)));
  connect(ui_->tab_bar, SIGNAL(Rename(int, QString)), manager,
          SLOT(Rename(int, QString)));
  connect(ui_->tab_bar, SIGNAL(Close(int)), manager, SLOT(Close(int)));
  connect(ui_->tab_bar, SIGNAL(PlaylistFavorited(int, bool)), manager,
          SLOT(Favorite(int, bool)));

  connect(ui_->tab_bar, SIGNAL(PlaylistOrderChanged(QList<int>)), manager,
          SLOT(ChangePlaylistOrder(QList<int>)));

  connect(manager, SIGNAL(CurrentChanged(Playlist*)),
          SLOT(SetViewModel(Playlist*)));
  connect(manager, SIGNAL(PlaylistAdded(int, QString, bool)),
          SLOT(PlaylistAdded(int, QString, bool)));
  connect(manager, SIGNAL(PlaylistManagerInitialized()), SLOT(Started()));
  connect(manager, SIGNAL(PlaylistClosed(int)), SLOT(PlaylistClosed(int)));
  connect(manager, SIGNAL(PlaylistRenamed(int, QString)),
          SLOT(PlaylistRenamed(int, QString)));
}