コード例 #1
0
ファイル: ViewManager.cpp プロジェクト: nowrep/tomahawk
void
ViewManager::saveCurrentPlaylistSettings()
{
    TomahawkSettings* s = TomahawkSettings::instance();
    Tomahawk::playlist_ptr pl = playlistForInterface( currentPlaylistInterface() );

    if ( !pl.isNull() ) {
        s->setShuffleState(  pl->guid(), currentPlaylistInterface()->shuffled() );
        s->setRepeatMode( pl->guid(), currentPlaylistInterface()->repeatMode() );
    } else {
        Tomahawk::dynplaylist_ptr dynPl = dynamicPlaylistForInterface( currentPlaylistInterface() );
        if ( !dynPl.isNull() ) {
            s->setShuffleState( dynPl->guid(), currentPlaylistInterface()->shuffled() );
            s->setRepeatMode( dynPl->guid(), currentPlaylistInterface()->repeatMode() );
        }
    }
}
コード例 #2
0
ファイル: Collection.cpp プロジェクト: AndyCoder/tomahawk
void
Collection::deleteAutoPlaylist( const Tomahawk::dynplaylist_ptr& p )
{
    QList<dynplaylist_ptr> todelete;
    todelete << p;
    m_autoplaylists.remove( p->guid() );

/*    qDebug() << Q_FUNC_INFO << "Collection name" << name()
                            << "from source id" << source()->id()
                            << "numplaylists:" << m_playlists.count();*/
    emit autoPlaylistsDeleted( todelete );
}
コード例 #3
0
ファイル: Collection.cpp プロジェクト: AndyCoder/tomahawk
void
Collection::addAutoPlaylist( const Tomahawk::dynplaylist_ptr& p )
{
    QList<dynplaylist_ptr> toadd;
    toadd << p;
    m_autoplaylists.insert( p->guid(), p );

/*    qDebug() << Q_FUNC_INFO << "Collection name" << name()
                            << "from source id" << source()->id()
                            << "numplaylists:" << m_playlists.count();*/
    emit autoPlaylistsAdded( toadd );
}
コード例 #4
0
bool
DynamicPlaylist::remove( const Tomahawk::dynplaylist_ptr& playlist )
{
    DatabaseCommand_DeletePlaylist* cmd = new DatabaseCommand_DeleteDynamicPlaylist( playlist->author(), playlist->guid() );
    Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );

    return false;
}