Qmmp
generalfactory.h
1 /***************************************************************************
2  * Copyright (C) 2008-2020 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 
25 class QObject;
26 class QDialog;
27 class QString;
28 class QWidget;
29 class Control;
30 class General;
31 
35 {
36  QString name;
37  QString shortName;
38  bool hasAbout = false;
39  bool hasSettings = false;
40  bool visibilityControl = false;
42 };
47 {
48 public:
52  virtual ~GeneralFactory() {}
56  virtual GeneralProperties properties() const = 0;
60  virtual QObject *create(QObject *parent) = 0;
66  virtual QDialog *createConfigDialog(QWidget *parent) = 0;
71  virtual void showAbout(QWidget *parent) = 0;
75  virtual QString translation() const = 0;
76 };
77 
78 Q_DECLARE_INTERFACE(GeneralFactory, "GeneralFactory/1.0")
79 #endif
The General class provides simple access to general plugins.
Definition: general.h:34
virtual QDialog * createConfigDialog(QWidget *parent)=0
virtual QObject * create(QObject *parent)=0
bool visibilityControl
Definition: generalfactory.h:40
QString name
Definition: generalfactory.h:36
Structure to store general plugin properies.
Definition: generalfactory.h:34
bool hasAbout
Definition: generalfactory.h:38
QString shortName
Definition: generalfactory.h:37
virtual GeneralProperties properties() const =0
bool hasSettings
Definition: generalfactory.h:39
General plugin interface.
Definition: generalfactory.h:46
virtual ~GeneralFactory()
Definition: generalfactory.h:52
virtual void showAbout(QWidget *parent)=0
virtual QString translation() const =0