本文整理汇总了C++中TrackPointer::get方法的典型用法代码示例。如果您正苦于以下问题:C++ TrackPointer::get方法的具体用法?C++ TrackPointer::get怎么用?C++ TrackPointer::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TrackPointer
的用法示例。
在下文中一共展示了TrackPointer::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotTrackLoaded
void WTrackProperty::slotTrackLoaded(TrackPointer track) {
if (track) {
m_pCurrentTrack = track;
connect(track.get(), SIGNAL(changed(Track*)),
this, SLOT(updateLabel(Track*)));
updateLabel(track.get());
}
}
示例2: onSetTrack
void WaveformRenderMark::onSetTrack() {
slotCuesUpdated();
TrackPointer trackInfo = m_waveformRenderer->getTrackInfo();
if (!trackInfo) {
return;
}
connect(trackInfo.get(), SIGNAL(cuesUpdated(void)),
this, SLOT(slotCuesUpdated(void)));
}
示例3: trackLoaded
void CueControl::trackLoaded(TrackPointer pNewTrack, TrackPointer pOldTrack) {
Q_UNUSED(pOldTrack);
QMutexLocker lock(&m_mutex);
if (m_pLoadedTrack) {
disconnect(m_pLoadedTrack.get(), 0, this, 0);
for (int i = 0; i < m_iNumHotCues; ++i) {
detachCue(i);
}
// Store the cue point in a load cue.
double cuePoint = m_pCuePoint->get();
if (cuePoint != -1 && cuePoint != 0.0) {
CuePointer loadCue;
const QList<CuePointer> cuePoints(m_pLoadedTrack->getCuePoints());
QListIterator<CuePointer> it(cuePoints);
while (it.hasNext()) {
CuePointer pCue(it.next());
if (pCue->getType() == Cue::LOAD) {
loadCue = pCue;
break;
}
}
if (!loadCue) {
loadCue = m_pLoadedTrack->addCue();
loadCue->setType(Cue::LOAD);
loadCue->setLength(0);
}
loadCue->setPosition(cuePoint);
}
m_pCueIndicator->setBlinkValue(ControlIndicator::OFF);
m_pCuePoint->set(-1.0);
m_pLoadedTrack.reset();
}
if (!pNewTrack) {
return;
}
m_pLoadedTrack = pNewTrack;
connect(pNewTrack.get(), SIGNAL(cuesUpdated()),
this, SLOT(trackCuesUpdated()),
Qt::DirectConnection);
CuePointer loadCue;
const QList<CuePointer> cuePoints(pNewTrack->getCuePoints());
QListIterator<CuePointer> it(cuePoints);
while (it.hasNext()) {
CuePointer pCue(it.next());
if (pCue->getType() == Cue::LOAD) {
loadCue = pCue;
} else if (pCue->getType() != Cue::CUE) {
continue;
}
int hotcue = pCue->getHotCue();
if (hotcue != -1)
attachCue(pCue, hotcue);
}
double loadCuePoint = 0.0;
// If cue recall is ON in the prefs, then we're supposed to seek to the cue
// point on song load. Note that [Controls],cueRecall == 0 corresponds to "ON", not OFF.
bool cueRecall = (getConfig()->getValueString(
ConfigKey("[Controls]","CueRecall"), "0").toInt() == 0);
if (loadCue != NULL) {
m_pCuePoint->set(loadCue->getPosition());
if (cueRecall) {
loadCuePoint = loadCue->getPosition();
}
} else {
// If no cue point is stored, set one at track start
m_pCuePoint->set(0.0);
}
// Need to unlock before emitting any signals to prevent deadlock.
lock.unlock();
// If cueRecall is on, seek to it even if we didn't find a cue value (we'll
// seek to 0.
if (cueRecall) {
seekExact(loadCuePoint);
} else if (!(m_pVinylControlEnabled->get() &&
m_pVinylControlMode->get() == MIXXX_VCMODE_ABSOLUTE)) {
// If cuerecall is off, seek to zero unless
// vinylcontrol is on and set to absolute. This allows users to
// load tracks and have the needle-drop be maintained.
seekExact(0.0);
}
}