mirror of https://code.videolan.org/videolan/vlc
qml: add option to jump to playing in Playlist
This commit is contained in:
parent
69a449868d
commit
4cd7e93525
|
@ -874,6 +874,12 @@ void PlaylistContextMenu::popup(int selectedIndex, QPoint pos )
|
|||
m_menu->addSeparator();
|
||||
}
|
||||
|
||||
if (m_controler->currentIndex() != -1)
|
||||
{
|
||||
action = m_menu->addAction( qtr("Jump to current playing"));
|
||||
connect(action, &QAction::triggered, this, &PlaylistContextMenu::jumpToCurrentPlaying);
|
||||
}
|
||||
|
||||
if (m_selectionModel->hasSelection()) {
|
||||
action = m_menu->addAction( qtr("Stream") );
|
||||
connect(action, &QAction::triggered, [selectedUrlList]( ) {
|
||||
|
|
|
@ -378,6 +378,9 @@ class PlaylistContextMenu : public QObject {
|
|||
public:
|
||||
PlaylistContextMenu(QObject* parent = nullptr);
|
||||
|
||||
signals:
|
||||
void jumpToCurrentPlaying();
|
||||
|
||||
public slots:
|
||||
void popup(int currentIndex, QPoint pos );
|
||||
private:
|
||||
|
|
|
@ -137,6 +137,8 @@ T.Pane {
|
|||
model: root.model
|
||||
selectionModel: root.selectionModel
|
||||
controler: MainPlaylistController
|
||||
|
||||
onJumpToCurrentPlaying: listView.positionViewAtIndex( MainPlaylistController.currentIndex, ItemView.Center)
|
||||
}
|
||||
|
||||
background: Widgets.AcrylicBackground {
|
||||
|
|
Loading…
Reference in New Issue