1 #ifndef VIDEOMETADATALISTMANAGER_H_
2 #define VIDEOMETADATALISTMANAGER_H_
19 const QString &sql =
"",
20 const QString &bindValue =
"");
32 bool purgeByFilename(
const QString &file_name);
33 bool purgeByID(
unsigned int db_id);
43 m_parent(parent), m_pathRoot(is_path_root) {}
46 virtual const QString &getName()
const = 0;
47 virtual const QString &getPath()
const;
48 const QString &getFQPath();
50 void setPathRoot(
bool is_root =
true);
66 const QString &
getName()
const override;
95 QString host =
"", QString
prefix =
"",
96 QVariant data = QVariant());
99 void ensureSortFields();
100 void setName(
const QString &name);
101 const QString &
getName()
const override;
102 void SetHost(
const QString &host);
103 const QString &GetHost()
const;
104 void SetPrefix(
const QString &
prefix);
105 const QString &GetPrefix()
const;
106 const QString &
getPath()
const override;
107 const QString &getSortPath()
const;
108 void setPath(
const QString &path,
const QString &sortPath =
nullptr);
109 void SetData(
const QVariant &data);
110 const QVariant &GetData()
const;
111 bool DataIsValid(
void)
const;
113 const QString &name =
"",
114 const QString &host =
"",
115 const QString &
prefix =
"",
116 const QVariant &data = QVariant());
119 const QString &name =
"",
121 const QString &host =
"",
122 const QString &
prefix =
"",
123 const QVariant &data = QVariant());
127 int subdir_count()
const;
128 template <
typename DirSort,
typename EntrySort>
129 void sort(DirSort dir_sort, EntrySort entry_sort)
131 m_subdirs.sort(dir_sort);
132 m_entries.sort(entry_sort);
134 for (
auto & subdir : m_subdirs)
136 if (subdir ==
nullptr)
138 subdir->sort(dir_sort, entry_sort);
141 dir_iterator dirs_begin();
142 dir_iterator dirs_end();
143 const_dir_iterator dirs_begin()
const;
144 const_dir_iterator dirs_end()
const;
145 entry_iterator entries_begin();
146 entry_iterator entries_end();
147 const_entry_iterator entries_begin()
const;
148 const_entry_iterator entries_end()
const;
149 bool has_entries()
const;
162 #endif // VIDEOMETADATALISTMANAGER_H_