1 #ifndef VIDEOMETADATALISTMANAGER_H_
2 #define VIDEOMETADATALISTMANAGER_H_
19 const QString &sql =
"");
31 bool purgeByFilename(
const QString &file_name);
32 bool purgeByID(
unsigned int db_id);
42 m_parent(parent), m_pathRoot(is_path_root) {}
45 virtual const QString &getName()
const = 0;
46 virtual const QString &getPath()
const;
47 const QString &getFQPath();
49 void setPathRoot(
bool is_root =
true);
65 const QString &
getName()
const override;
94 QString host =
"", QString
prefix =
"",
95 QVariant data = QVariant());
98 void ensureSortFields();
99 void setName(
const QString &name);
100 const QString &
getName()
const override;
101 void SetHost(
const QString &host);
102 const QString &GetHost()
const;
103 void SetPrefix(
const QString &
prefix);
104 const QString &GetPrefix()
const;
105 const QString &
getPath()
const override;
106 const QString &getSortPath()
const;
107 void setPath(
const QString &path,
const QString &sortPath =
nullptr);
108 void SetData(
const QVariant &data);
109 const QVariant &GetData()
const;
110 bool DataIsValid(
void)
const;
112 const QString &name =
"",
113 const QString &host =
"",
114 const QString &
prefix =
"",
115 const QVariant &data = QVariant());
118 const QString &name =
"",
120 const QString &host =
"",
121 const QString &
prefix =
"",
122 const QVariant &data = QVariant());
126 int subdir_count()
const;
127 template <
typename DirSort,
typename EntrySort>
128 void sort(DirSort dir_sort, EntrySort entry_sort)
130 m_subdirs.sort(dir_sort);
131 m_entries.sort(entry_sort);
133 for (
auto & subdir : m_subdirs)
135 subdir->sort(dir_sort, entry_sort);
138 dir_iterator dirs_begin();
139 dir_iterator dirs_end();
140 const_dir_iterator dirs_begin()
const;
141 const_dir_iterator dirs_end()
const;
142 entry_iterator entries_begin();
143 entry_iterator entries_end();
144 const_entry_iterator entries_begin()
const;
145 const_entry_iterator entries_end()
const;
146 bool has_entries()
const;
159 #endif // VIDEOMETADATALISTMANAGER_H_