Qmmp
effectfactory.h
1 /***************************************************************************
2  * Copyright (C) 2007-2019 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 EFFECTFACTORY_H
21 #define EFFECTFACTORY_H
22 
23 #include <QObject>
24 #include "qmmp_export.h"
25 
26 class QObject;
27 class QWidget;
28 class Effect;
29 
33 class QMMP_EXPORT EffectProperties
34 {
35 public:
39  enum Priority
40  {
41  EFFECT_PRIORITY_LOW = 0,
43  EFFECT_PRIORITY_HIGH
44  };
49  {
50  hasAbout = false;
51  hasSettings = false;
52  priority = EFFECT_PRIORITY_DEFAULT;
53  }
54  QString name;
55  QString shortName;
56  bool hasAbout;
57  bool hasSettings;
58  int priority;
59 };
64 {
65 public:
69  virtual const EffectProperties properties() const = 0;
73  virtual Effect *create() = 0;
78  virtual void showSettings(QWidget *parent) = 0;
83  virtual void showAbout(QWidget *parent) = 0;
87  virtual QString translation() const = 0;
88 };
89 
90 Q_DECLARE_INTERFACE(EffectFactory, "EffectFactory/1.0")
91 
92 #endif
QString name
Definition: effectfactory.h:54
The Effect class provides the base interface class of audio effects.
Definition: effect.h:35
Effect plugin interface (effect factory).
Definition: effectfactory.h:63
QString shortName
Definition: effectfactory.h:55
virtual Effect * create()=0
Definition: effectfactory.h:42
virtual void showAbout(QWidget *parent)=0
bool hasSettings
Definition: effectfactory.h:57
Helper class to store effect plugin properties.
Definition: effectfactory.h:33
virtual const EffectProperties properties() const =0
EffectProperties()
Definition: effectfactory.h:48
virtual QString translation() const =0
bool hasAbout
Definition: effectfactory.h:56
virtual void showSettings(QWidget *parent)=0
Priority
Definition: effectfactory.h:39
int priority
Definition: effectfactory.h:58