Qmmp
Loading...
Searching...
No Matches
generalfactory.h
1/***************************************************************************
2 * Copyright (C) 2008-2022 by Ilya Kotov *
3 * forkotov02@ya.ru *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
20#ifndef GENERALFACTORY_H
21#define GENERALFACTORY_H
22
23#include "qmmpui_export.h"
24
25class QObject;
26class QDialog;
27class QString;
28class QWidget;
29class Control;
30class General;
31
35{
36 int id;
37 QString name;
38 QString shortcut;
39 Qt::DockWidgetArea area;
40 Qt::DockWidgetAreas allowedAreas;
41};
42
43
47{
48 QString name;
49 QString shortName;
50 bool hasAbout = false;
51 bool hasSettings = false;
52 bool visibilityControl = false;
54 QList<WidgetDescription> widgets;
55};
56
60class QMMPUI_EXPORT GeneralFactory
61{
62public:
66 virtual ~GeneralFactory() {}
70 virtual GeneralProperties properties() const = 0;
74 virtual QObject *create(QObject *parent) = 0;
80 virtual QWidget *createWidget(int id, QWidget *parent);
86 virtual QDialog *createConfigDialog(QWidget *parent) = 0;
91 virtual void showAbout(QWidget *parent) = 0;
95 virtual QString translation() const = 0;
96};
97
98Q_DECLARE_INTERFACE(GeneralFactory, "GeneralFactory/1.0")
99#endif
General plugin interface.
Definition generalfactory.h:61
virtual GeneralProperties properties() const =0
virtual QWidget * createWidget(int id, QWidget *parent)
virtual QString translation() const =0
virtual QObject * create(QObject *parent)=0
virtual void showAbout(QWidget *parent)=0
virtual ~GeneralFactory()
Definition generalfactory.h:66
virtual QDialog * createConfigDialog(QWidget *parent)=0
The General class provides simple access to general plugins.
Definition general.h:35
Structure to store general plugin properies.
Definition generalfactory.h:47
bool hasAbout
Definition generalfactory.h:50
bool visibilityControl
Definition generalfactory.h:52
bool hasSettings
Definition generalfactory.h:51
QList< WidgetDescription > widgets
Definition generalfactory.h:54
QString name
Definition generalfactory.h:48
QString shortName
Definition generalfactory.h:49
Structure to store widget description provided by general plugin.
Definition generalfactory.h:35
Qt::DockWidgetArea area
Definition generalfactory.h:39
QString shortcut
Definition generalfactory.h:38
int id
Definition generalfactory.h:36
QString name
Definition generalfactory.h:37
Qt::DockWidgetAreas allowedAreas
Definition generalfactory.h:40