From 047d5bb26c81578808fb4b8583888f8dcdff533e Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 2 Oct 2015 06:27:28 +0000 Subject: Show track details when double-clicking on song title in main window (patch by Thomas Perl) (#812) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5642 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistmodel.cpp | 13 +++++++++++++ src/qmmpui/playlistmodel.h | 5 +++++ 2 files changed, 18 insertions(+) (limited to 'src/qmmpui') diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index e381b109f..768dd6e36 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -624,6 +624,19 @@ void PlayListModel::showDetails(QWidget *parent) } } +void PlayListModel::showDetailsForCurrent(QWidget *parent) +{ + if (m_current_track) + { + QList l; + l.append(m_current_track); + QDialog *d = new DetailsDialog(l, parent); + TagUpdater *updater = new TagUpdater(d, l); + connect(updater, SIGNAL(destroyed(QObject *)),SLOT(updateMetaData())); + d->show(); + } +} + int PlayListModel::firstSelectedUpper(int row) { for (int i = row - 1;i >= 0;i--) diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h index d8602d531..bc39fe2aa 100644 --- a/src/qmmpui/playlistmodel.h +++ b/src/qmmpui/playlistmodel.h @@ -457,6 +457,11 @@ public slots: * @param parent parent Widget. */ void showDetails(QWidget *parent = 0); + /*! + * Shows the details for the current song (if any). + * @param parent parent widget. + */ + void showDetailsForCurrent(QWidget *parent = 0); /*! * Ensures that the current track is visible. */ -- cgit v1.2.3-13-gbd6f