1 /*
2    Project: MPDCon
3 
4    Copyright (C) 2012
5 
6    Author: Sebastian Reitenbach
7 
8    Created: 2012-10-31
9 
10    Playlist Inspector
11 
12    This application is free software; you can redistribute it and/or
13    modify it under the terms of the GNU General Public
14    License as published by the Free Software Foundation; either
15    version 2 of the License, or (at your option) any later version.
16 
17    This application is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20    Library General Public License for more details.
21 
22    You should have received a copy of the GNU General Public
23    License along with this library; if not, write to the Free
24    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
25 */
26 
27 #include <AppKit/AppKit.h>
28 #include "MPDController.h"
29 #include "PlaylistController.h"
30 
31 @interface PlaylistInspector : NSWindowController
32 {
33   IBOutlet NSTableView *maxRatingStars;
34   IBOutlet NSTableView *minRatingStars;
35 
36   id currentSongNr;
37   id nrOfSongsInPlaylist;
38   id nrNewSongs;
39   id nrPlayedSongs;
40   id nrOfNewSongsText;
41   id nrOfPlayedSongsText;
42   id playlistPlayingTime;
43   id randomPlaylistFeed;
44   id ratingBasedFeed;
45   id includeUnratedSongs;
46   id maxRatingText;
47   id minRatingText;
48 
49   MPDController *mpdController;
50   PlaylistController *playlistController;
51   NSTableColumn *minRatingCol;
52   NSTableColumn *maxRatingCol;
53   NSUserDefaults *defaults;
54   NSLock *threadlock;
55 }
56 + (id) sharedPlaylistInspector;
57 
58 - (void) updateCurrentSongNr;
59 - (void) updatePlaylistInfo;
60 - (void) updatePlaylistInspector;
61 - (void) songChanged:(NSNotification *)aNotif;
62 
63 // Gui Methods
64 - (void) includeUnratedSongsChanged: (id)sender;
65 - (void) nrOfFutureSongsChanged: (id)sender;
66 - (void) nrOfOldSongsToKeepChanged: (id)sender;
67 - (void) randomPlaylistFeedStateChanged: (id)sender;
68 - (void) ratingBasedFeedStateChanged: (id)sender;
69 - (void) sendRandomPlaylistFeedDefaultsChangedNotification;
70 @end
71