From 4e00d3b0f49f89a26c8bbe864f9af58a38d5aba8 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 23 Dec 2020 19:04:46 +0000 Subject: library: added widget git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9601 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/library/libraryfactory.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/plugins/General/library/libraryfactory.cpp') diff --git a/src/plugins/General/library/libraryfactory.cpp b/src/plugins/General/library/libraryfactory.cpp index 50894cabe..f581ca26b 100644 --- a/src/plugins/General/library/libraryfactory.cpp +++ b/src/plugins/General/library/libraryfactory.cpp @@ -23,7 +23,7 @@ #include #include "library.h" #include "settingsdialog.h" -//#include "historysettingsdialog.h" +#include "librarywidget.h" #include "libraryfactory.h" GeneralProperties LibraryFactory::properties() const @@ -34,6 +34,8 @@ GeneralProperties LibraryFactory::properties() const properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; + properties.widgets = { { LIBRARY_WIDGET, tr("Media Library"), Qt::RightDockWidgetArea, + Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea } }; return properties; } @@ -42,6 +44,16 @@ QObject *LibraryFactory::create(QObject *parent) return new Library(parent); } +QWidget *LibraryFactory::createWidget(int id, QWidget *parent) +{ + if(id == LIBRARY_WIDGET) + { + m_libraryWidget = new LibraryWidget(false, parent); + return m_libraryWidget; + } + return nullptr; +} + QDialog *LibraryFactory::createConfigDialog(QWidget *parent) { return new SettingsDialog(parent); -- cgit v1.2.3-13-gbd6f