vlc | branch: master | Benjamin Arnaud <benjamin.arn...@videolabs.io> | Fri Feb 19 11:25:31 2021 +0100| [d7f234d006fa35d891c105ff18789fd5b5b46b72] | committer: Pierre Lamot
qt: Add PlaylistsDialog to the dialog provider Signed-off-by: Pierre Lamot <pie...@videolabs.io> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d7f234d006fa35d891c105ff18789fd5b5b46b72 --- include/vlc_interface.h | 1 + modules/gui/qt/dialogs/dialogs_provider.cpp | 21 +++++++++++++++++++++ modules/gui/qt/dialogs/dialogs_provider.hpp | 2 ++ 3 files changed, 24 insertions(+) diff --git a/include/vlc_interface.h b/include/vlc_interface.h index 021314c37b..e1df976506 100644 --- a/include/vlc_interface.h +++ b/include/vlc_interface.h @@ -123,6 +123,7 @@ typedef enum vlc_intf_dialog { INTF_DIALOG_WIZARD, INTF_DIALOG_PLAYLIST, + INTF_DIALOG_PLAYLISTS, INTF_DIALOG_MESSAGES, INTF_DIALOG_FILEINFO, INTF_DIALOG_PREFS, diff --git a/modules/gui/qt/dialogs/dialogs_provider.cpp b/modules/gui/qt/dialogs/dialogs_provider.cpp index 1d56587d57..a5d7cfd20e 100644 --- a/modules/gui/qt/dialogs/dialogs_provider.cpp +++ b/modules/gui/qt/dialogs/dialogs_provider.cpp @@ -54,6 +54,7 @@ #include "dialogs/plugins/plugins.hpp" #include "dialogs/epg/epg.hpp" #include "dialogs/errors/errors.hpp" +#include "dialogs/playlists/playlists.hpp" #include <QEvent> #include <QApplication> @@ -90,6 +91,7 @@ DialogsProvider::~DialogsProvider() #endif PluginDialog::killInstance(); EpgDialog::killInstance(); + PlaylistsDialog::killInstance(); delete popupMenu; delete videoPopupMenu; @@ -141,6 +143,8 @@ void DialogsProvider::customEvent( QEvent *event ) //FIXME //playlistDialog(); break; break; + case INTF_DIALOG_PLAYLISTS: + playlistsDialog(); break; case INTF_DIALOG_MESSAGES: messagesDialog(); break; case INTF_DIALOG_FILEINFO: @@ -314,6 +318,23 @@ void DialogsProvider::mediaCodecDialog() dialog->hide(); } +void DialogsProvider::playlistsDialog() +{ + PlaylistsDialog::getInstance( p_intf )->toggleVisible(); +} + +void DialogsProvider::playlistsDialog( const QVariantList & medias ) +{ + PlaylistsDialog * dialog = PlaylistsDialog::getInstance( p_intf ); + + dialog->setMedias(medias); + + dialog->show(); + + // FIXME: We shouldn't have to call this on here. + dialog->getInstance( p_intf )->activateWindow(); +} + void DialogsProvider::bookmarksDialog() { BookmarksDialog::getInstance( p_intf )->toggleVisible(); diff --git a/modules/gui/qt/dialogs/dialogs_provider.hpp b/modules/gui/qt/dialogs/dialogs_provider.hpp index f7a430f0b1..d0284da337 100644 --- a/modules/gui/qt/dialogs/dialogs_provider.hpp +++ b/modules/gui/qt/dialogs/dialogs_provider.hpp @@ -123,6 +123,8 @@ private: void openDialog( int ); public slots: + void playlistsDialog(); + void playlistsDialog( const QVariantList & listMedia ); void bookmarksDialog(); void mediaInfoDialog( void ); void mediaInfoDialog( const PlaylistItem& pItem ); _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits