/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. #pragma once
  9. #include "guilib/GUIDialog.h"
  10. #include "playlists/SmartPlayList.h"
  11. class CGUIDialogSmartPlaylistRule :
  12. public CGUIDialog
  13. {
  14. public:
  15. CGUIDialogSmartPlaylistRule(void);
  16. ~CGUIDialogSmartPlaylistRule(void) override;
  17. bool OnMessage(CGUIMessage& message) override;
  18. bool OnBack(int actionID) override;
  19. void OnInitWindow() override;
  20. void OnDeinitWindow(int nextWindowID) override;
  21. static bool EditRule(CSmartPlaylistRule &rule, const std::string& type="songs");
  22. protected:
  23. void OnField();
  24. void OnOperator();
  25. void OnOK();
  26. void OnCancel();
  27. void UpdateButtons();
  28. void OnBrowse();
  29. std::vector< std::pair<std::string, int> > GetValidOperators(const CSmartPlaylistRule& rule);
  30. CSmartPlaylistRule m_rule;
  31. bool m_cancelled;
  32. std::string m_type;
  33. };