diff --git a/modules/gui/qt/playlist/playlist_controller.cpp b/modules/gui/qt/playlist/playlist_controller.cpp index ba62724498..4e82cc6bb1 100644 --- a/modules/gui/qt/playlist/playlist_controller.cpp +++ b/modules/gui/qt/playlist/playlist_controller.cpp @@ -554,6 +554,12 @@ void PlaylistController::explore(const PlaylistItem& pItem) } } +int PlaylistController::currentIndex() const +{ + Q_D(const PlaylistController); + return d->m_currentIndex; +} + void PlaylistController::play() { Q_D(PlaylistController); diff --git a/modules/gui/qt/playlist/playlist_controller.hpp b/modules/gui/qt/playlist/playlist_controller.hpp index 90fa751a6e..44c2104dda 100644 --- a/modules/gui/qt/playlist/playlist_controller.hpp +++ b/modules/gui/qt/playlist/playlist_controller.hpp @@ -105,6 +105,7 @@ public: Q_PROPERTY(SortKey sortKey READ getSortKey WRITE setSortKey NOTIFY sortKeyChanged FINAL) Q_PROPERTY(SortOrder sortOrder READ getSortOrder WRITE setSortOrder NOTIFY sortOrderChanged FINAL) Q_PROPERTY(MediaStopAction mediaStopAction READ getMediaStopAction WRITE setMediaStopAction NOTIFY mediaStopActionChanged FINAL) + Q_PROPERTY(int currentIndex READ currentIndex NOTIFY currentIndexChanged FINAL) public: @@ -162,6 +163,7 @@ public slots: bool isEmpty() const; int count() const; + int currentIndex() const; SortKey getSortKey() const; void setSortKey(SortKey sortKey);