PageRenderTime 14ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/dialogs/GUIDialogSmartPlaylistRule.h

http://github.com/xbmc/xbmc
C Header | 38 lines | 26 code | 5 blank | 7 comment | 0 complexity | 3140cb47f12557708240cf3e81032ac8 MD5 | raw file
 1/*
 2 *  Copyright (C) 2005-2018 Team Kodi
 3 *  This file is part of Kodi - https://kodi.tv
 4 *
 5 *  SPDX-License-Identifier: GPL-2.0-or-later
 6 *  See LICENSES/README.md for more information.
 7 */
 8
 9#pragma once
10
11#include "guilib/GUIDialog.h"
12#include "playlists/SmartPlayList.h"
13
14class CGUIDialogSmartPlaylistRule :
15      public CGUIDialog
16{
17public:
18  CGUIDialogSmartPlaylistRule(void);
19  ~CGUIDialogSmartPlaylistRule(void) override;
20  bool OnMessage(CGUIMessage& message) override;
21  bool OnBack(int actionID) override;
22  void OnInitWindow() override;
23  void OnDeinitWindow(int nextWindowID) override;
24
25  static bool EditRule(CSmartPlaylistRule &rule, const std::string& type="songs");
26
27protected:
28  void OnField();
29  void OnOperator();
30  void OnOK();
31  void OnCancel();
32  void UpdateButtons();
33  void OnBrowse();
34  std::vector< std::pair<std::string, int> > GetValidOperators(const CSmartPlaylistRule& rule);
35  CSmartPlaylistRule m_rule;
36  bool m_cancelled;
37  std::string m_type;
38};