4 * Copyright (C) 2005-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #include "guilib/GUIDialog.h"
24 #include "playlists/SmartPlayList.h"
28 class CGUIDialogSmartPlaylistEditor :
32 enum PLAYLIST_TYPE { TYPE_SONGS = 1, TYPE_ALBUMS, TYPE_ARTISTS, TYPE_MIXED, TYPE_MUSICVIDEOS, TYPE_MOVIES, TYPE_TVSHOWS, TYPE_EPISODES };
34 CGUIDialogSmartPlaylistEditor(void);
35 virtual ~CGUIDialogSmartPlaylistEditor(void);
36 virtual bool OnMessage(CGUIMessage& message);
37 virtual bool OnBack(int actionID);
38 virtual void OnWindowLoaded();
39 virtual void OnInitWindow();
40 virtual void OnDeinitWindow(int nextWindowID);
42 static bool EditPlaylist(const CStdString &path, const CStdString &type = "");
43 static bool NewPlaylist(const CStdString &type);
46 void OnRuleList(int item);
48 void OnRuleRemove(int item);
53 void OnOrderDirection();
59 void UpdateRuleControlButtons();
60 int GetSelectedItem();
61 void HighlightItem(int item);
62 PLAYLIST_TYPE ConvertType(const CStdString &type);
63 CStdString ConvertType(PLAYLIST_TYPE type);
64 int GetLocalizedType(PLAYLIST_TYPE type);
66 CSmartPlaylist m_playlist;
68 // our list of rules for display purposes
69 CFileItemList* m_ruleLabels;
73 CStdString m_mode; // mode we're in (partymode etc.)