void ConvertAscii::writeTrack(TabTrack *trk, int n) { QString tmp; startTrack(trk, n); startRow(trk); uint bar = 0; for (uint x = 0; x < trk->c.size(); x++) { // If this bar's not last if (bar + 1 < trk->b.size()) { if ((uint) trk->b[bar+1].start == x) { // Time for next bar bar++; flushBar(trk); } } addColumn(trk, &(trk->c[x])); } flushBar(trk); flushRow(trk); }
void MainWindow::trackBtnClicked() { if (isTracking) { stopTrack(); } else { startTrack(); } }
void CDROM::playBgMusic() { static const char *tracks[][2] = { {"avt00.tot", "mine"}, {"avt001.tot", "nuit"}, {"avt002.tot", "campagne"}, {"avt003.tot", "extsor1"}, {"avt004.tot", "interieure"}, {"avt005.tot", "zombie"}, {"avt006.tot", "zombie"}, {"avt007.tot", "campagne"}, {"avt008.tot", "campagne"}, {"avt009.tot", "extsor1"}, {"avt010.tot", "extsor1"}, {"avt011.tot", "interieure"}, {"avt012.tot", "zombie"}, {"avt014.tot", "nuit"}, {"avt015.tot", "interieure"}, {"avt016.tot", "statue"}, {"avt017.tot", "zombie"}, {"avt018.tot", "statue"}, {"avt019.tot", "mine"}, {"avt020.tot", "statue"}, {"avt021.tot", "mine"}, {"avt022.tot", "zombie"} }; for (int i = 0; i < ARRAYSIZE(tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { startTrack(tracks[i][1]); break; } }
void Client::setPermission(bool permission) { m_trackingPermitted = permission; if ((permission) && (!isTracking())) startTrack(); else if ((!permission) && (isTracking())) stopTrack(); }
void TrackImageFetcher::onAlbumImageDownloaded() { QPixmap i; if ( i.loadFromData( qobject_cast<QNetworkReply*>(sender())->readAll() ) ) emit finished( i ); else startTrack(); sender()->deleteLater(); //always deleteLater from slots connected to sender() }
void MainWindow::createActions() { startAction = new QAction(tr("&Start"), this); connect(startAction, SIGNAL(triggered()), this, SLOT(startTrack())); stopAction = new QAction(tr("S&top"), this); connect(stopAction, SIGNAL(triggered()), this, SLOT(stopTrack())); logoutAction = new QAction(tr("Log&out"), this); connect(logoutAction, SIGNAL(triggered()), this, SLOT(logout())); exitAction = new QAction(tr("E&xit"), this); connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit())); }
int Part::harmonyCount() { if (!score()) return 0; int count = 0; Segment::Type st = Segment::Type::ChordRest; for (Segment* seg = score()->firstMeasure()->first(st); seg; seg = seg->next1(st)) { for (Element* e : seg->annotations()) { if (e->type() == Element::Type::HARMONY && e->track() >= startTrack() && e->track() < endTrack()) count++; } } return count; }
int Part::lyricCount() { if (!score()) return 0; int count = 0; Segment::Type st = Segment::Type::ChordRest; for (Segment* seg = score()->firstMeasure()->first(st); seg; seg = seg->next1(st)) { for (int i = startTrack(); i < endTrack() ; ++i) { ChordRest* cr = toChordRest(seg->element(i)); if (cr) count += cr->lyrics().size(); } } return count; }
void TrackImageFetcher::startAlbum() { if (!album().isNull()) { QUrl imageUrl = url( "album" ); if ( imageUrl.isValid() ) connect( lastfm::nam()->get( QNetworkRequest( imageUrl ) ), SIGNAL(finished()), SLOT(onAlbumImageDownloaded()) ); else connect( album().getInfo(), SIGNAL(finished()), SLOT(onAlbumGotInfo()) ); } else startTrack(); }
void CDROM::playMultMusic() { static const char *tracks[][6] = { {"avt005.tot", "fra1", "all1", "ang1", "esp1", "ita1"}, {"avt006.tot", "fra2", "all2", "ang2", "esp2", "ita2"}, {"avt012.tot", "fra3", "all3", "ang3", "esp3", "ita3"}, {"avt016.tot", "fra4", "all4", "ang4", "esp4", "ita4"}, {"avt019.tot", "fra5", "all5", "ang5", "esp5", "ita5"}, {"avt022.tot", "fra6", "all6", "ang6", "esp6", "ita6"} }; for (int i = 0; i < ARRAYSIZE(tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { _cdPlaying = true; startTrack(tracks[i][_vm->_global->_language + 1]); break; } }
void Client::onAuthentificated() { qDebug() << "Authentificated " << m_loginQuery->getUser()->getToken(); m_user = m_loginQuery->getUser(); Settings::getInstance().setLogin(m_user->getLogin()); Settings::getInstance().setPassword(m_user->getPassword()); m_authentificated = true; if (!m_isHavingOwnChannel) { QSharedPointer<Channel> channel = QSharedPointer<Channel>(new Channel(m_user->getLogin(),m_user->getLogin() + "'s channel")); channel->setRadius(40000000); m_applyChannelQuery->setQuery(channel, m_user); m_applyChannelQuery->doRequest(); } getTagsRequest(); startTrack(); emit authentificated(QVariant(m_user->getLogin())); }
void TrackImageFetcher::onAlbumGotInfo() { if (!downloadImage( (QNetworkReply*)sender(), "album" )) startTrack(); }
void Audio::startPrevTrack() { startTrack(getPrevTrack()); }
void Audio::startNextTrack() { startTrack(getNextTrack()); }