1 /* 2 * Cantata 3 * 4 * Copyright (c) 2011-2020 Craig Drummond <craig.p.drummond@gmail.com> 5 * 6 * ---- 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; see the file COPYING. If not, write to 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 * Boston, MA 02110-1301, USA. 22 */ 23 24 #ifndef PODCAST_WIDGET_H 25 #define PODCAST_WIDGET_H 26 27 #include <QWidget> 28 #include "widgets/singlepagewidget.h" 29 #include "podcastservice.h" 30 31 class Action; 32 class ProxyModel; 33 34 class PodcastWidget : public SinglePageWidget 35 { 36 Q_OBJECT 37 public: 38 PodcastWidget(PodcastService *s, QWidget *p); 39 ~PodcastWidget() override; 40 QStringList selectedFiles(bool allowPlaylists) const override; 41 QList<Song> selectedSongs(bool allowPlaylists) const override; 42 43 private Q_SLOTS: 44 void headerClicked(int level); 45 void subscribe(); 46 void unSubscribe(); 47 void download(); 48 void cancelDownload(); 49 void deleteDownload(); 50 void markAsNew(); 51 void markAsListened(); 52 //void showUnplayedOnly(bool on); 53 void configure(); 54 void exportSubscriptions(); 55 56 private: 57 void doSearch() override; 58 void refresh() override; 59 void controlActions() override; 60 61 private: 62 PodcastService *srv; 63 PodcastService::Proxy proxy; 64 Action *subscribeAction; 65 Action *unSubscribeAction; 66 Action *downloadAction; 67 Action *deleteAction; 68 Action *cancelDownloadAction; 69 Action *markAsNewAction; 70 Action *markAsListenedAction; 71 //Action *unplayedOnlyAction; 72 Action *exportAction; 73 }; 74 75 #endif 76