MythTV  master
videolist.h
Go to the documentation of this file.
1 #ifndef VIDEOLIST_H_
2 #define VIDEOLIST_H_
3 
4 // Type of the item added to the tree
6  kSubFolder = -1,
7  kUpFolder = -2,
8  kRootNode = -3,
11 };
12 
13 // Tree node attribute index
16 };
17 
18 class MythGenericTree;
21 class ParentalLevel;
22 
23 class VideoList
24 {
25  public:
26  VideoList();
27  ~VideoList();
28 
29  // Deleted functions should be public.
30  VideoList(const VideoList &) = delete; // not copyable
31  VideoList &operator=(const VideoList &) = delete; // not copyable
32 
33  MythGenericTree *buildVideoList(bool filebrowser, bool flatlist,
34  int group_type,
35  const ParentalLevel &parental_level,
36  bool include_updirs);
37 
38  void refreshList(bool filebrowser, const ParentalLevel &parental_level,
39  bool flat_list, int group_type);
40  bool refreshNode(MythGenericTree *node);
41 
42  unsigned int count() const;
43 
45  void setCurrentVideoFilter(const VideoFilterSettings &filter);
46 
47  // returns the number of videos matched by this filter
48  int TryFilter(const VideoFilterSettings &filter) const;
49 
50  unsigned int getFilterChangedState();
51 
52  bool Delete(int video_id);
53 
55 
57 
58  void InvalidateCache();
59 
60  private:
62 };
63 
64 class VideoMetadata;
66 {
67  public:
68  TreeNodeData() = default;;
69  explicit TreeNodeData(VideoMetadata *metadata);
70  TreeNodeData(QString path, QString host, QString prefix);
71 
72  TreeNodeData(const TreeNodeData &other);
73  TreeNodeData &operator=(const TreeNodeData &rhs);
74 
75  ~TreeNodeData();
76 
78  const VideoMetadata *GetMetadata() const;
79  QString GetPath() const;
80  QString GetHost() const;
81  QString GetPrefix() const;
82 
83  private:
84  class TreeNodeDataPrivate *m_d {nullptr};
85 };
86 
88 
89 #endif // VIDEOLIST_H
unsigned int count() const
Definition: videolist.cpp:485
MythGenericTree * buildVideoList(bool filebrowser, bool flatlist, int group_type, const ParentalLevel &parental_level, bool include_updirs)
Definition: videolist.cpp:464
void setCurrentVideoFilter(const VideoFilterSettings &filter)
Definition: videolist.cpp:495
QString GetHost() const
Definition: videolist.cpp:132
const VideoMetadataListManager & getListCache() const
Definition: videolist.cpp:505
VideoMetadata * GetMetadata()
Definition: videolist.cpp:109
QString GetPrefix() const
Definition: videolist.cpp:139
const VideoFilterSettings & getCurrentVideoFilter() const
Definition: videolist.cpp:490
MythGenericTree * GetTreeRoot()
Definition: videolist.cpp:520
Q_DECLARE_METATYPE(GrabberScript *)
unsigned int getFilterChangedState()
Definition: videolist.cpp:510
TreeNodeType
Definition: videolist.h:5
QString GetPath() const
Definition: videolist.cpp:125
class VideoListImp * m_imp
Definition: videolist.h:61
void InvalidateCache()
Definition: videolist.cpp:525
VideoList & operator=(const VideoList &)=delete
void refreshList(bool filebrowser, const ParentalLevel &parental_level, bool flat_list, int group_type)
Definition: videolist.cpp:473
int TryFilter(const VideoFilterSettings &filter) const
Definition: videolist.cpp:500
bool refreshNode(MythGenericTree *node)
Definition: videolist.cpp:480
TreeNodeData & operator=(const TreeNodeData &rhs)
Definition: videolist.cpp:93
TreeNodeAttributes
Definition: videolist.h:14
bool Delete(int video_id)
Definition: videolist.cpp:515
class TreeNodeDataPrivate * m_d
Definition: videolist.h:84
TreeNodeData()=default