[vlc-commits] qt: overload mediainfoDialog to show with playlist item index
Fatih Uzunoglu
git at videolan.org
Tue Aug 18 17:15:06 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Wed Jul 15 20:01:53 2020 +0300| [295c55ac7791cce2fb630973127ace599a43214e] | committer: Pierre Lamot
qt: overload mediainfoDialog to show with playlist item index
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=295c55ac7791cce2fb630973127ace599a43214e
---
modules/gui/qt/dialogs/dialogs_provider.cpp | 21 ++++++++++++++++++++-
modules/gui/qt/dialogs/dialogs_provider.hpp | 6 +++++-
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/dialogs/dialogs_provider.cpp b/modules/gui/qt/dialogs/dialogs_provider.cpp
index d1df96cb61..5b022a0944 100644
--- a/modules/gui/qt/dialogs/dialogs_provider.cpp
+++ b/modules/gui/qt/dialogs/dialogs_provider.cpp
@@ -284,7 +284,7 @@ void DialogsProvider::aboutDialog()
AboutDialog::getInstance( p_intf )->toggleVisible();
}
-void DialogsProvider::mediaInfoDialog()
+void DialogsProvider::mediaInfoDialog( void )
{
MediaInfoDialog *dialog = MediaInfoDialog::getInstance( p_intf );
if( !dialog->isVisible() || dialog->currentTab() != MediaInfoDialog::META_PANEL )
@@ -293,6 +293,25 @@ void DialogsProvider::mediaInfoDialog()
dialog->hide();
}
+void DialogsProvider::mediaInfoDialog( const PlaylistItem& pItem )
+{
+ input_item_t *p_input = nullptr;
+
+ vlc_playlist_item_t * const playlistItem = pItem.raw();
+
+ if( playlistItem )
+ {
+ p_input = vlc_playlist_item_GetMedia(playlistItem);
+ }
+
+ if( p_input )
+ {
+ MediaInfoDialog * const mid = new MediaInfoDialog( p_intf, p_input );
+ mid->setParent( p_intf->p_sys->p_mi, Qt::Dialog );
+ mid->showTab( MediaInfoDialog::META_PANEL );
+ }
+}
+
void DialogsProvider::mediaCodecDialog()
{
MediaInfoDialog *dialog = MediaInfoDialog::getInstance( p_intf );
diff --git a/modules/gui/qt/dialogs/dialogs_provider.hpp b/modules/gui/qt/dialogs/dialogs_provider.hpp
index fb53428ca1..4cd94cd9a0 100644
--- a/modules/gui/qt/dialogs/dialogs_provider.hpp
+++ b/modules/gui/qt/dialogs/dialogs_provider.hpp
@@ -33,6 +33,9 @@
#include "qt.hpp"
#include "dialogs/open/open.hpp"
+
+#include "playlist/playlist_item.hpp"
+
#include <QObject>
#include <QStringList>
@@ -119,7 +122,8 @@ private:
public slots:
void bookmarksDialog();
- void mediaInfoDialog();
+ void mediaInfoDialog( void );
+ void mediaInfoDialog( const PlaylistItem& pItem );
void mediaCodecDialog();
void prefsDialog();
void extendedDialog();
More information about the vlc-commits
mailing list