本文整理汇总了C++中FileHandle::isNull方法的典型用法代码示例。如果您正苦于以下问题:C++ FileHandle::isNull方法的具体用法?C++ FileHandle::isNull怎么用?C++ FileHandle::isNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileHandle
的用法示例。
在下文中一共展示了FileHandle::isNull方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: forward
void PlayerManager::forward()
{
m_playlistInterface->playNext();
FileHandle file = m_playlistInterface->currentFile();
if(!file.isNull())
play(file);
else
stop();
}
示例2: back
void PlayerManager::back()
{
m_playlistInterface->playPrevious();
FileHandle file = m_playlistInterface->currentFile();
if(!file.isNull())
play(file);
else
stop();
}
示例3: slotNeedNextUrl
void PlayerManager::slotNeedNextUrl()
{
if(m_file.isNull() || !m_crossfadeTracks)
return;
m_playlistInterface->playNext();
FileHandle nextFile = m_playlistInterface->currentFile();
if(!nextFile.isNull()) {
m_file = nextFile;
crossfadeToFile(m_file);
}
}
示例4: play
void PlayerManager::play(const FileHandle &file)
{
if(!m_setup)
setup();
if(!m_media[0] || !m_media[1] || !m_playlistInterface)
return;
stopCrossfade();
// The "currently playing" media object.
Phonon::MediaObject *mediaObject = m_media[m_curOutputPath];
if(file.isNull()) {
if(paused())
mediaObject->play();
else if(playing()) {
mediaObject->seek(0);
emit seeked(0);
}
else {
m_playlistInterface->playNext();
m_file = m_playlistInterface->currentFile();
if(!m_file.isNull())
{
mediaObject->setCurrentSource(KUrl::fromPath(m_file.absFilePath()));
mediaObject->play();
emit signalItemChanged(m_file);
}
}
}
else {
mediaObject->setCurrentSource(KUrl::fromPath(file.absFilePath()));
mediaObject->play();
if(m_file != file)
emit signalItemChanged(file);
m_file = file;
}
// Our state changed handler will perform the follow up actions necessary
// once we actually start playing.
}