From e83e63bc9edb60980daa66bacf284297aa5a565f Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 21 Oct 2020 21:06:43 +0000 Subject: lyrics: added widget for qsui git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9515 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/lyrics/lyricsfactory.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/plugins/General/lyrics/lyricsfactory.cpp') diff --git a/src/plugins/General/lyrics/lyricsfactory.cpp b/src/plugins/General/lyrics/lyricsfactory.cpp index 7ef3a3df4..6a64689af 100644 --- a/src/plugins/General/lyrics/lyricsfactory.cpp +++ b/src/plugins/General/lyrics/lyricsfactory.cpp @@ -21,7 +21,7 @@ #include #include "settingsdialog.h" #include "lyrics.h" -#include "lyricswindow.h" +#include "lyricswidget.h" #include "lyricsfactory.h" GeneralProperties LyricsFactory::properties() const @@ -32,19 +32,22 @@ GeneralProperties LyricsFactory::properties() const properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; - properties.widgets = { { 0, tr("Lyrics"), Qt::LeftDockWidgetArea, Qt::AllDockWidgetAreas } }; + properties.widgets = { { LYRICS_WIDGET, tr("Lyrics"), Qt::LeftDockWidgetArea, Qt::AllDockWidgetAreas } }; return properties; } QObject *LyricsFactory::create(QObject *parent) { - return new Lyrics(parent); + return new Lyrics(&m_lyricsWidget, parent); } QWidget *LyricsFactory::createWidget(int id, QWidget *parent) { - if(id == 0) - return new LyricsWindow(nullptr, parent); + if(id == LYRICS_WIDGET) + { + m_lyricsWidget = new LyricsWidget(false, parent); + return m_lyricsWidget; + } return nullptr; } -- cgit v1.2.3-13-gbd6f