1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-2021 Ricardo Villalba <ricardo@smplayer.info> 3 4 This program 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 2 of the License, or 7 (at your option) any later version. 8 9 This program 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 this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 #ifndef PREFPLAYLIST_H 20 #define PREFPLAYLIST_H 21 22 #include "ui_prefplaylist.h" 23 #include "prefwidget.h" 24 #include "playlist.h" 25 26 class Preferences; 27 28 class PrefPlaylist : public PrefWidget, public Ui::PrefPlaylist 29 { 30 Q_OBJECT 31 32 public: 33 PrefPlaylist( QWidget * parent = 0, Qt::WindowFlags f = QFlag(0) ); 34 ~PrefPlaylist(); 35 36 virtual QString sectionName(); 37 virtual QPixmap sectionIcon(); 38 39 // Pass data to the dialog 40 void setData(Preferences * pref); 41 42 // Apply changes 43 void getData(Preferences * pref); 44 45 void setDirectoryRecursion(bool b); 46 bool directoryRecursion(); 47 48 void setAutoGetInfo(bool b); 49 bool autoGetInfo(); 50 51 void setSavePlaylistOnExit(bool b); 52 bool savePlaylistOnExit(); 53 54 void setPlayFilesFromStart(bool b); 55 bool playFilesFromStart(); 56 57 void setPlayOnLoad(bool b); 58 bool playOnLoad(); 59 60 void setPlayNextAutomatically(bool b); 61 bool playNextAutomatically(); 62 63 void setIgnorePlayerErrors(bool b); 64 bool ignorePlayerErrors(); 65 66 void setAutoSort(bool b); 67 bool autoSort(); 68 69 void setFilterCaseSensitive(bool b); 70 bool filterCaseSensitive(); 71 72 #ifdef PLAYLIST_DELETE_FROM_DISK 73 void allowDeleteFromDisk(bool b); 74 bool isDeleteFromDiskAllowed(); 75 #endif 76 dockableChanged()77 bool dockableChanged() { return dockable_changed; }; 78 79 protected: 80 virtual void createHelp(); 81 82 void setAutoAddFilesToPlaylist(bool b); 83 bool autoAddFilesToPlaylist(); 84 85 void setMediaToAdd(int); 86 int mediaToAdd(); 87 88 protected: 89 virtual void retranslateStrings(); 90 91 private: 92 bool dockable_changed; 93 }; 94 95 #endif 96