void clearPlayerQueue() { playlist.queued = -1; switch(getPlayerQueueState()) { case PLAYER_QUEUE_FULL: DEBUG("playlist: dequeue song\n"); setQueueState(PLAYER_QUEUE_BLANK); break; case PLAYER_QUEUE_PLAY: DEBUG("playlist: stop decoding queued song\n"); setQueueState(PLAYER_QUEUE_STOP); break; } }
void MainWindow::erosMatchmakingStateChanged(ErosMatchmakingState status) { switch (status) { case ErosMatchmakingState::Queued: setQueueState(true); break; case ErosMatchmakingState::Aborted: case ErosMatchmakingState::Idle: setQueueState(false); break; case ErosMatchmakingState::InvalidRegion: setQueueState(false); QMessageBox::warning(this, tr("Eros Matchmaking"), tr("Your queue was aborted because you do not have any verified StarCraft 2 profiles for the selected region.")); break; } }
void syncPlaylistWithQueue(int queue) { if(queue && getPlayerQueueState()==PLAYER_QUEUE_BLANK) { queueNextSongInPlaylist(); } else if(getPlayerQueueState()==PLAYER_QUEUE_DECODE) { if(playlist.queued!=-1) setQueueState(PLAYER_QUEUE_PLAY); else setQueueState(PLAYER_QUEUE_STOP); } else if(getPlayerQueueState()==PLAYER_QUEUE_EMPTY) { setQueueState(PLAYER_QUEUE_BLANK); if(playlist.queued>=0) { DEBUG("playlist: now playing queued song\n"); playlist.current = playlist.queued; } playlist.queued = -1; if(queue) queueNextSongInPlaylist(); } }
void MainWindow::erosMatchmakingMatchFound(MatchmakingMatch *match) { setQueueState(true); this->matchmaking_result_time_->restart(); this->matchmaking_timer_->stop(); this->long_process_timer_->start(); this->ui.frmLongProcessInterface->setMaximumHeight(400); ErosRegion region = match->region(); QLayoutItem* item; while ( ( item = ui.frmMatchmakingOpponent->layout()->takeAt(0)) != NULL ) { delete item->widget(); delete item; } const UserLadderStats *stats = match->opponent()->ladderStatsGlobal(); MatchmakingPlayerInfo *region_info = new MatchmakingPlayerInfo(match->opponent()->username(), match->opponent()->division(), stats, true, this); ui.frmMatchmakingOpponent->layout()->addWidget(region_info); ui.lblVS->setText("VS"); ui.lblVS->setMaximumHeight(9999); QString map = tr("1v1 on <a href=\"starcraft://map/%1/%2\"><img src=\":/img/client/icons/flags/%4\"> %3</a>", "Please keep the link intact.").arg(QString::number((int)region), QString::number(match->mapId()), match->mapName(), Eros::regionToString(region)); ui.lblMapInfo->setText(map); ui.lblMapInfo->setMaximumHeight(9999); ui.btnQueue->setText(tr("Forfeit Match")); this->showNormal(); this->raise(); this->activateWindow(); this->notification_sound_->setLoops(0); this->notification_sound_->play(); }