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
VideoMetadata
Definition: videometadata.h:24
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(GrabberScript *)
VideoList::getFilterChangedState
unsigned int getFilterChangedState()
Definition: videolist.cpp:513
TreeNodeDataPrivate
Definition: videolist.cpp:28
kRootNode
@ kRootNode
Definition: videolist.h:8
TreeNodeData::TreeNodeData
TreeNodeData()=default
VideoMetadataListManager
Definition: videometadatalistmanager.h:10
VideoList::refreshList
void refreshList(bool filebrowser, const ParentalLevel &parental_level, bool flat_list, int group_type)
Definition: videolist.cpp:476
VideoList::TryFilter
int TryFilter(const VideoFilterSettings &filter) const
Definition: videolist.cpp:503
TreeNodeData
Definition: videolist.h:65
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition: data_mythtv.py:40
VideoList::InvalidateCache
void InvalidateCache()
Definition: videolist.cpp:528
VideoList::buildVideoList
MythGenericTree * buildVideoList(bool filebrowser, bool flatlist, int group_type, const ParentalLevel &parental_level, bool include_updirs)
Definition: videolist.cpp:467
VideoList::VideoList
VideoList()
Definition: videolist.cpp:457
TreeNodeData::GetPath
QString GetPath() const
Definition: videolist.cpp:124
VideoList::Delete
bool Delete(int video_id)
Definition: videolist.cpp:518
kSubFolder
@ kSubFolder
Definition: videolist.h:6
TreeNodeData::GetMetadata
VideoMetadata * GetMetadata()
Definition: videolist.cpp:108
VideoList::m_imp
class VideoListImp * m_imp
Definition: videolist.h:61
VideoList::operator=
VideoList & operator=(const VideoList &)=delete
VideoList::getCurrentVideoFilter
const VideoFilterSettings & getCurrentVideoFilter() const
Definition: videolist.cpp:493
kUpFolder
@ kUpFolder
Definition: videolist.h:7
VideoList::setCurrentVideoFilter
void setCurrentVideoFilter(const VideoFilterSettings &filter)
Definition: videolist.cpp:498
TreeNodeAttributes
TreeNodeAttributes
Definition: videolist.h:14
VideoList
Definition: videolist.h:23
TreeNodeData::operator=
TreeNodeData & operator=(const TreeNodeData &rhs)
Definition: videolist.cpp:92
VideoFilterSettings
Definition: videofilter.h:73
kNodeSort
@ kNodeSort
Definition: videolist.h:15
TreeNodeData::m_d
class TreeNodeDataPrivate * m_d
Definition: videolist.h:84
VideoListImp
Definition: videolist.cpp:332
ParentalLevel
Definition: parentalcontrols.h:9
VideoList::count
unsigned int count() const
Definition: videolist.cpp:488
MythGenericTree
Definition: mythgenerictree.h:20
VideoList::~VideoList
~VideoList()
Definition: videolist.cpp:462
TreeNodeType
TreeNodeType
Definition: videolist.h:5
VideoList::refreshNode
bool refreshNode(MythGenericTree *node)
Definition: videolist.cpp:483
VideoList::GetTreeRoot
MythGenericTree * GetTreeRoot()
Definition: videolist.cpp:523
kDynamicSubFolder
@ kDynamicSubFolder
Definition: videolist.h:10
TreeNodeData::GetHost
QString GetHost() const
Definition: videolist.cpp:131
TreeNodeData::~TreeNodeData
~TreeNodeData()
Definition: videolist.cpp:103
VideoList::getListCache
const VideoMetadataListManager & getListCache() const
Definition: videolist.cpp:508
kNoFilesFound
@ kNoFilesFound
Definition: videolist.h:9
TreeNodeData::GetPrefix
QString GetPrefix() const
Definition: videolist.cpp:138