コード例 #1
0
ファイル: ViewManager.cpp プロジェクト: Zopieux/tomahawk
PlaylistViewPage*
ViewManager::createPageForList( const QString& title, const QList< query_ptr >& queries )
{
    PlaylistViewPage* view = new PlaylistViewPage();
    PlaylistModel* model = new PlaylistModel();

    view->setTemporaryPage( true );

    // We need to set the model on the view before loading the playlist, so spinners & co are connected
    view->view()->trackView()->setPlayableModel( model );

    model->setTitle( title );
    model->appendQueries( queries );

    return view;
}
コード例 #2
0
ファイル: ViewManager.cpp プロジェクト: prodigeni/tomahawk
FlexibleView*
ViewManager::createPageForList( const QString& title, const QList< query_ptr >& queries )
{
    FlexibleView* view = new FlexibleView();
    PlaylistModel* model = new PlaylistModel();

    PlaylistView* pv = new PlaylistView();
    view->setDetailedView( pv );
    view->setPixmap( pv->pixmap() );
    view->setTemporaryPage( true );

    // We need to set the model on the view before loading the playlist, so spinners & co are connected
    view->setPlaylistModel( model );
    pv->setPlaylistModel( model );

    model->setTitle( title );
    model->appendQueries( queries );

    return view;
}