kodi
SlideShowDelegator.h
1 /*
2  * Copyright (C) 2023 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 "interfaces/ISlideShowDelegate.h"
12 
13 #include <memory>
14 #include <string>
15 #include <vector>
16 
18 {
19 public:
20  CSlideShowDelegator() = default;
21  ~CSlideShowDelegator() = default;
22 
23  void SetDelegate(ISlideShowDelegate* delegate);
24  void ResetDelegate();
25 
26  // Implementation of ISlideShowDelegate
27  void Add(const CFileItem* picture) override;
28  bool IsPlaying() const override;
29  void Select(const std::string& picture) override;
30  void GetSlideShowContents(CFileItemList& list) override;
31  std::shared_ptr<const CFileItem> GetCurrentSlide() override;
32  void StartSlideShow() override;
33  void PlayPicture() override;
34  bool InSlideShow() const override;
35  int NumSlides() const override;
36  int CurrentSlide() const override;
37  bool IsPaused() const override;
38  bool IsShuffled() const override;
39  void Reset() override;
40  void Shuffle() override;
41  int GetDirection() const override;
42  void RunSlideShow(const std::string& strPath,
43  bool bRecursive = false,
44  bool bRandom = false,
45  bool bNotRandom = false,
46  const std::string& beginSlidePath = "",
47  bool startSlideShow = true,
48  SortBy method = SortByLabel,
49  SortOrder order = SortOrderAscending,
50  SortAttribute sortAttributes = SortAttributeNone,
51  const std::string& strExtensions = "") override;
52  void AddFromPath(const std::string& strPath,
53  bool bRecursive,
54  SortBy method = SortByLabel,
55  SortOrder order = SortOrderAscending,
56  SortAttribute sortAttributes = SortAttributeNone,
57  const std::string& strExtensions = "") override;
58 
59 private:
60  ISlideShowDelegate* m_delegate;
61 };
void AddFromPath(const std::string &strPath, bool bRecursive, SortBy method=SortByLabel, SortOrder order=SortOrderAscending, SortAttribute sortAttributes=SortAttributeNone, const std::string &strExtensions="") override
Definition: SlideShowDelegator.cpp:167
Represents a list of files.
Definition: FileItem.h:702
Definition: ISlideShowDelegate.h:18
Definition: SlideShowDelegator.h:17
SortBy
Definition: SortUtils.h:49
void RunSlideShow(const std::string &strPath, bool bRecursive=false, bool bRandom=false, bool bNotRandom=false, const std::string &beginSlidePath="", bool startSlideShow=true, SortBy method=SortByLabel, SortOrder order=SortOrderAscending, SortAttribute sortAttributes=SortAttributeNone, const std::string &strExtensions="") override
Definition: SlideShowDelegator.cpp:149
Represents a file on a share.
Definition: FileItem.h:102
1 : Sort by Name (String: Label)
Definition: SortUtils.h:54