aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/library/libraryfactory.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-12-23 19:04:46 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-12-23 19:04:46 +0000
commit4e00d3b0f49f89a26c8bbe864f9af58a38d5aba8 (patch)
treed121e10c883a91521f0eab8f96b7d362668773d6 /src/plugins/General/library/libraryfactory.cpp
parent8fa1aec3cd3413dc6ff0c4049395cc0a70afe15f (diff)
downloadqmmp-4e00d3b0f49f89a26c8bbe864f9af58a38d5aba8.tar.gz
qmmp-4e00d3b0f49f89a26c8bbe864f9af58a38d5aba8.tar.bz2
qmmp-4e00d3b0f49f89a26c8bbe864f9af58a38d5aba8.zip
library: added widget
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9601 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/library/libraryfactory.cpp')
-rw-r--r--src/plugins/General/library/libraryfactory.cpp14
1 files changed, 13 insertions, 1 deletions
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 <qmmp/qmmp.h>
#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);