Changeset 71219c5d86572d2d598ca844bc9a7353d19d3f8c

Show
Ignore:
Timestamp:
01/21/08 23:47:06 (7 months ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1200955626 +0000
git-parent:

[0320a30e4f079df4f5250c800b5eb732d5008fba]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1200955626 +0000
Message:

Qt4 - add a button to scroll to currentItem. Close #1443

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/components/playlist/panels.hpp

    rfcde479 r71219c5  
    7373private: 
    7474    QTreeView *view; 
    75     QPushButton *repeatButton , *randomButton,*addButton; 
     75    QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton; 
    7676    ClickLineEdit *searchLine; 
    7777    int currentRootId; 
     
    8585    void toggleRandom(); 
    8686    void toggleRepeat(); 
     87    void gotoPlayingItem(); 
    8788    void doPopup( QModelIndex index, QPoint point ); 
    8889    void search( QString search ); 
  • modules/gui/qt4/components/playlist/standardpanel.cpp

    rcebe12a r71219c5  
    134134    buttons->addWidget( repeatButton ); 
    135135 
     136    /* Goto */ 
     137    gotoPlayingButton = new QPushButton( qtr( "X" ), this ); 
     138    BUTTONACT( gotoPlayingButton, gotoPlayingItem() ); 
     139    buttons->addWidget( gotoPlayingButton ); 
     140 
    136141    /* A Spacer and the search possibilities */ 
    137142    QSpacerItem *spacer = new QSpacerItem( 10, 20 ); 
     
    192197                QIcon( ":/pixmaps/playlist_shuffle_on.png" ) ); 
    193198    randomButton->setToolTip( prev ? qtr( I_PL_NORANDOM ) : qtr(I_PL_RANDOM ) ); 
     199} 
     200 
     201void StandardPLPanel::gotoPlayingItem() 
     202{ 
     203    view->scrollTo( view->currentIndex() ); 
    194204} 
    195205