aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/generalfactory.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-10-19 20:36:51 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-10-19 20:36:51 +0000
commit6baa843a2a0bdf143617df269129d81dae0a3a38 (patch)
tree9a650b4349c1129c8c20b4536228bb838eb9ee67 /src/qmmpui/generalfactory.h
parentb0ab8e75df1bb8c5752ebf3ed60334f1134b04f3 (diff)
downloadqmmp-6baa843a2a0bdf143617df269129d81dae0a3a38.tar.gz
qmmp-6baa843a2a0bdf143617df269129d81dae0a3a38.tar.bz2
qmmp-6baa843a2a0bdf143617df269129d81dae0a3a38.zip
qsui: added feature to add dock widgets from plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9509 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/generalfactory.h')
-rw-r--r--src/qmmpui/generalfactory.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qmmpui/generalfactory.h b/src/qmmpui/generalfactory.h
index 63a8a80fc..404663792 100644
--- a/src/qmmpui/generalfactory.h
+++ b/src/qmmpui/generalfactory.h
@@ -29,6 +29,14 @@ class QWidget;
class Control;
class General;
+struct WidgetDescription
+{
+ int id;
+ QString name;
+ Qt::DockWidgetAreas allowedAreas;
+};
+
+
/*! @brief Structure to store general plugin properies.
*/
struct GeneralProperties
@@ -39,11 +47,13 @@ struct GeneralProperties
bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, and \b false otherwise */
bool visibilityControl = false; /*!< Should be \b true if plugin can show/hide main window of the player,
* and \b false otherwise */
+ QList<WidgetDescription> widgets;
};
+
/*! @brief %General plugin interface.
* @author Ilya Kotov <forkotov02@ya.ru>
*/
-class GeneralFactory
+class QMMPUI_EXPORT GeneralFactory
{
public:
/*!
@@ -58,6 +68,7 @@ public:
* Creates object of the General class.
*/
virtual QObject *create(QObject *parent) = 0;
+ virtual QWidget *createWidget(int id, QWidget *parent);
/*!
* Creates configuration dialog.
* @param parent Parent widget.