1 /* This file is part of Clementine.
2    Copyright 2010, David Sansome <me@davidsansome.com>
3 
4    Clementine is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8 
9    Clementine is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with Clementine.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef WIZARDPLUGIN_H
19 #define WIZARDPLUGIN_H
20 
21 #include <QObject>
22 
23 #include "generator_fwd.h"
24 
25 class Application;
26 class LibraryBackend;
27 
28 class QWizard;
29 
30 namespace smart_playlists {
31 
32 class WizardPlugin : public QObject {
33   Q_OBJECT
34 
35  public:
36   WizardPlugin(Application* app, LibraryBackend* library, QObject* parent);
37 
38   virtual QString type() const = 0;
39   virtual QString name() const = 0;
40   virtual QString description() const = 0;
is_dynamic()41   virtual bool is_dynamic() const { return false; }
start_page()42   int start_page() const { return start_page_; }
43 
44   virtual void SetGenerator(GeneratorPtr gen) = 0;
45   virtual GeneratorPtr CreateGenerator() const = 0;
46 
47   void Init(QWizard* wizard, int finish_page_id);
48 
49  protected:
50   virtual int CreatePages(QWizard* wizard, int finish_page_id) = 0;
51 
52   Application* app_;
53   LibraryBackend* library_;
54 
55  private:
56   int start_page_;
57 };
58 
59 }  // namespace smart_playlists
60 
61 #endif  // WIZARDPLUGIN_H
62