Revert previous commit, was incorrect
[amarok.git] / src / podcastsettings.h
blob716815797e664909fb68367b9fd668b9b2558d4a
1 // (c) 2005 Seb Ruiz <ruiz@kde.org>
2 // See COPYING file for licensing information.
4 #ifndef AMAROK_PODCASTSETTINGS_H
5 #define AMAROK_PODCASTSETTINGS_H
7 #include <KDialog> //baseclass
8 #include <KUrl>
10 #include <q3ptrlist.h>
12 class PodcastSettingsDialogBase;
13 class QDomNode;
15 enum MediaFetch{ STREAM=0, AUTOMATIC=1 };
17 class PodcastSettings
19 public:
20 PodcastSettings( const QDomNode &channelSettings, const QString &title );
21 PodcastSettings( const PodcastSettings *parentSettings, const QString &title );
22 PodcastSettings( const QString &title ); // standard settings
23 PodcastSettings( const QString &title, const QString &save, const bool autoScan,
24 const int fetchType, const bool autotransfer, const bool purge, const int purgecount );
26 const QString &saveLocation() { return m_saveLocation; }
27 const QString &title() { return m_title; }
28 bool autoscan() { return m_autoScan; }
29 int fetchType() { return m_fetch; }
30 bool autoTransfer() { return m_addToMediaDevice; }
31 bool hasPurge() { return m_purge; }
32 int purgeCount() { return m_purgeCount; }
34 QString m_title; //the title of the podcast or category these settings belong to
35 QString m_saveLocation;
36 bool m_autoScan;
37 int m_fetch;
38 bool m_addToMediaDevice;
39 bool m_purge;
40 int m_purgeCount;
44 class PodcastSettingsDialog : public KDialog
46 Q_OBJECT
48 public:
49 explicit PodcastSettingsDialog( PodcastSettings *list, QWidget* parent=0 );
50 PodcastSettingsDialog( const Q3PtrList<PodcastSettings> &list, const QString &caption, QWidget* parent=0 );
52 bool configure();
53 PodcastSettings *getSettings() { return m_settings; }
55 protected:
56 bool hasChanged();
58 protected slots:
59 void checkModified();
60 void slotOk();
61 void slotUser1();
63 private:
64 void init();
65 void setSettings( PodcastSettings *settings );
66 QString requesterSaveLocation();
68 PodcastSettingsDialogBase *m_ps;
69 Q3PtrList<PodcastSettings> m_settingsList;
70 PodcastSettings *m_settings;
73 #endif /*AMAROK_PODCASTSETTINGS_H*/