本文整理汇总了C++中Playlist::stopAfterMode方法的典型用法代码示例。如果您正苦于以下问题:C++ Playlist::stopAfterMode方法的具体用法?C++ Playlist::stopAfterMode怎么用?C++ Playlist::stopAfterMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::stopAfterMode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setItemEnabled
void
StopMenu::slotAboutToShow()
{
Playlist *pl = Playlist::instance();
setItemEnabled( NOW, Amarok::actionCollection()->action( "stop" )->isEnabled() );
setItemEnabled( AFTER_TRACK, EngineController::engine()->loaded() );
setItemChecked( AFTER_TRACK, pl->stopAfterMode() == Playlist::StopAfterCurrent );
setItemEnabled( AFTER_QUEUE, pl->nextTracks().count() );
setItemChecked( AFTER_QUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
}
示例2: setItemEnabled
void
StopMenu::slotAboutToShow()
{
Playlist *pl = Playlist::instance();
setItemEnabled( NOW, amaroK::actionCollection()->action( "stop" )->isEnabled() );
setItemEnabled( AFTER_TRACK, pl->currentTrackIndex() >= 0 );
setItemChecked( AFTER_TRACK, pl->stopAfterMode() == Playlist::StopAfterCurrent );
setItemEnabled( AFTER_QUEUE, pl->nextTracks().count() );
setItemChecked( AFTER_QUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
}
示例3: switch
void
StopMenu::slotActivated( int index )
{
Playlist* pl = Playlist::instance();
const int mode = pl->stopAfterMode();
switch( index )
{
case NOW:
Amarok::actionCollection()->action( "stop" )->activate();
if( mode == Playlist::StopAfterCurrent || mode == Playlist::StopAfterQueue )
pl->setStopAfterMode( Playlist::DoNotStop );
break;
case AFTER_TRACK:
pl->setStopAfterMode( mode == Playlist::StopAfterCurrent
? Playlist::DoNotStop
: Playlist::StopAfterCurrent );
break;
case AFTER_QUEUE:
pl->setStopAfterMode( mode == Playlist::StopAfterQueue
? Playlist::DoNotStop
: Playlist::StopAfterQueue );
break;
}
}