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