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  MythGenericTree *buildVideoList(bool filebrowser, bool flatlist,
30  int group_type,
31  const ParentalLevel &parental_level,
32  bool include_updirs);
33 
34  void refreshList(bool filebrowser, const ParentalLevel &parental_level,
35  bool flat_list, int group_type);
36  bool refreshNode(MythGenericTree *node);
37 
38  unsigned int count() const;
39 
41  void setCurrentVideoFilter(const VideoFilterSettings &filter);
42 
43  // returns the number of videos matched by this filter
44  int TryFilter(const VideoFilterSettings &filter) const;
45 
46  unsigned int getFilterChangedState();
47 
48  bool Delete(int video_id);
49 
51 
53 
54  void InvalidateCache();
55 
56  private:
57  VideoList(const VideoList &) = delete; // not copyable
58  VideoList &operator=(const VideoList &) = delete; // not copyable
59 
61 };
62 
63 class VideoMetadata;
65 {
66  public:
67  TreeNodeData() = default;;
68  explicit TreeNodeData(VideoMetadata *metadata);
69  TreeNodeData(QString path, QString host, QString prefix);
70 
71  TreeNodeData(const TreeNodeData &other);
72  TreeNodeData &operator=(const TreeNodeData &rhs);
73 
74  ~TreeNodeData();
75 
77  const VideoMetadata *GetMetadata() const;
78  QString GetPath() const;
79  QString GetHost() const;
80  QString GetPrefix() const;
81 
82  private:
83  class TreeNodeDataPrivate *m_d {nullptr};
84 };
85 
87 
88 #endif // VIDEOLIST_H
unsigned int count() const
Definition: videolist.cpp:488
MythGenericTree * buildVideoList(bool filebrowser, bool flatlist, int group_type, const ParentalLevel &parental_level, bool include_updirs)
Definition: videolist.cpp:467
void setCurrentVideoFilter(const VideoFilterSettings &filter)
Definition: videolist.cpp:498
QString GetHost() const
Definition: videolist.cpp:132
const VideoMetadataListManager & getListCache() const
Definition: videolist.cpp:508
VideoMetadata * GetMetadata()
Definition: videolist.cpp:109
QString GetPrefix() const
Definition: videolist.cpp:139
const VideoFilterSettings & getCurrentVideoFilter() const
Definition: videolist.cpp:493
MythGenericTree * GetTreeRoot()
Definition: videolist.cpp:523
Q_DECLARE_METATYPE(GrabberScript *)
unsigned int getFilterChangedState()
Definition: videolist.cpp:513
TreeNodeType
Definition: videolist.h:5
QString GetPath() const
Definition: videolist.cpp:125
class VideoListImp * m_imp
Definition: videolist.h:60
void InvalidateCache()
Definition: videolist.cpp:528
VideoList & operator=(const VideoList &)=delete
void refreshList(bool filebrowser, const ParentalLevel &parental_level, bool flat_list, int group_type)
Definition: videolist.cpp:476
int TryFilter(const VideoFilterSettings &filter) const
Definition: videolist.cpp:503
bool refreshNode(MythGenericTree *node)
Definition: videolist.cpp:483
TreeNodeData & operator=(const TreeNodeData &rhs)
Definition: videolist.cpp:93
TreeNodeAttributes
Definition: videolist.h:14
bool Delete(int video_id)
Definition: videolist.cpp:518
class TreeNodeDataPrivate * m_d
Definition: videolist.h:83
TreeNodeData()=default