kwave  18.07.70
FilterPlugin.h
Go to the documentation of this file.
1 /***************************************************************************
2  FilterPlugin.h - generic class for filter plugins with setup
3  -------------------
4  begin : Sat Jun 07 2003
5  copyright : (C) 2003 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef FILTER_PLUGIN_H
19 #define FILTER_PLUGIN_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QObject>
25 #include <QString>
26 
27 #include "libkwave/Plugin.h"
29 
30 class QStringList;
31 class QWidget;
32 
33 namespace Kwave
34 {
35 
36  class SampleSource;
37  class SampleSink;
38 
39  class Q_DECL_EXPORT FilterPlugin: public Kwave::Plugin
40  {
41  Q_OBJECT
42  public:
43 
49  FilterPlugin(QObject *parent, const QVariantList &args);
50 
52  virtual ~FilterPlugin() Q_DECL_OVERRIDE;
53 
55  virtual int interpreteParameters(QStringList & /* params */) = 0;
56 
60  virtual Kwave::PluginSetupDialog *createDialog(QWidget * /*parent*/) = 0;
61 
67  virtual Kwave::SampleSource *createFilter(unsigned int tracks) = 0;
68 
73  virtual QStringList *setup(QStringList &previous_params) Q_DECL_OVERRIDE;
74 
79  virtual void run(QStringList params) Q_DECL_OVERRIDE;
80 
85  virtual bool paramsChanged();
86 
94  virtual void updateFilter(Kwave::SampleSource *filter,
95  bool force = false);
96 
102  virtual QString actionName() = 0;
103 
108  virtual QString progressText() Q_DECL_OVERRIDE;
109 
110  signals:
111 
117  void sigCancelPressed();
118 
119  protected slots:
120 
122  void startPreListen();
123 
125  void stopPreListen();
126 
127  private:
129  QStringList m_params;
130 
132  bool m_listen;
133 
135  bool m_pause;
136 
142 
143  };
144 }
145 
146 #endif /* FILTER_PLUGIN_H */
147 
148 //***************************************************************************
149 //***************************************************************************
Definition: App.h:33
Kwave::SampleSink * m_sink
Definition: FilterPlugin.h:141
QStringList m_params
Definition: FilterPlugin.h:129