aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/General/General.pro3
-rw-r--r--src/plugins/General/library/library.pro19
-rw-r--r--src/plugins/General/library/libraryfactory.cpp60
-rw-r--r--src/plugins/General/library/libraryfactory.h44
4 files changed, 125 insertions, 1 deletions
diff --git a/src/plugins/General/General.pro b/src/plugins/General/General.pro
index 69431038b..7286b1426 100644
--- a/src/plugins/General/General.pro
+++ b/src/plugins/General/General.pro
@@ -11,7 +11,8 @@ SUBDIRS += statusicon \
copypaste \
rgscan \
hotkey \
- listenbrainz
+ listenbrainz \
+ library
unix:SUBDIRS += mpris \
kdenotify \
diff --git a/src/plugins/General/library/library.pro b/src/plugins/General/library/library.pro
new file mode 100644
index 000000000..24423bd3a
--- /dev/null
+++ b/src/plugins/General/library/library.pro
@@ -0,0 +1,19 @@
+include(../../plugins.pri)
+
+TARGET = $$PLUGINS_PREFIX/General/library
+
+QT += sql
+
+HEADERS += libraryfactory.h
+
+SOURCES += libraryfactory.cpp
+
+
+#RESOURCES = translations/translations.qrc
+
+LIBS += $$QMMPUI_LIB
+
+unix {
+ target.path = $$PLUGIN_DIR/General
+ INSTALLS += target
+}
diff --git a/src/plugins/General/library/libraryfactory.cpp b/src/plugins/General/library/libraryfactory.cpp
new file mode 100644
index 000000000..9e9e5a54b
--- /dev/null
+++ b/src/plugins/General/library/libraryfactory.cpp
@@ -0,0 +1,60 @@
+/***************************************************************************
+ * Copyright (C) 2017 by Ilya Kotov *
+ * forkotov02@ya.ru *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <QMessageBox>
+#include <QtPlugin>
+#include <qmmp/qmmp.h>
+//#include "history.h"
+//#include "historysettingsdialog.h"
+#include "libraryfactory.h"
+
+GeneralProperties LibraryFactory::properties() const
+{
+ GeneralProperties properties;
+ properties.name = tr("Media Library Plugin");
+ properties.shortName = "library";
+ properties.hasAbout = true;
+ properties.hasSettings = false;
+ properties.visibilityControl = false;
+ return properties;
+}
+
+QObject *LibraryFactory::create(QObject *parent)
+{
+ return nullptr;
+}
+
+QDialog *LibraryFactory::createConfigDialog(QWidget *parent)
+{
+ return nullptr;
+}
+
+void LibraryFactory::showAbout(QWidget *parent)
+{
+ QMessageBox::about (parent, tr("About Media Library Plugin"),
+ tr("Qmmp Media Library Plugin")+"\n"+
+ tr("This plugin represents a database to store music files tags for a fast access")+"\n"+
+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>"));
+}
+
+QString LibraryFactory::translation() const
+{
+ return QLatin1String(":/library_plugin_");
+}
diff --git a/src/plugins/General/library/libraryfactory.h b/src/plugins/General/library/libraryfactory.h
new file mode 100644
index 000000000..d9500bcbb
--- /dev/null
+++ b/src/plugins/General/library/libraryfactory.h
@@ -0,0 +1,44 @@
+/***************************************************************************
+ * Copyright (C) 2020 by Ilya Kotov *
+ * forkotov02@ya.ru *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+#ifndef LIBRARYFACTORY_H
+#define LIBRARYFACTORY_H
+
+#include <QObject>
+#include <QDialog>
+#include <qmmpui/general.h>
+#include <qmmpui/generalfactory.h>
+
+/**
+ @author Ilya Kotov <forkotov02@ya.ru>
+*/
+class LibraryFactory : public QObject, public GeneralFactory
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.GeneralFactoryInterface.1.0")
+Q_INTERFACES(GeneralFactory)
+public:
+ GeneralProperties properties() const override;
+ QObject *create(QObject *parent) override;
+ QDialog *createConfigDialog(QWidget *parent) override;
+ void showAbout(QWidget *parent) override;
+ QString translation() const override;
+};
+
+#endif // LIBRARYFACTORY_H