Go to the documentation of this file.
12 #ifndef IMAGESCANNER_H
13 #define IMAGESCANNER_H
17 #include <QElapsedTimer>
18 #include <QRegularExpression>
34 void ChangeState(
bool scan);
35 void EnqueueClear(
int devId,
const QString &
action);
36 QStringList GetProgress();
44 void SyncSubTree(
const QFileInfo &dirInfo,
int parentId,
int devId,
46 int SyncDirectory(
const QFileInfo &dirInfo,
int devId,
47 const QString &base,
int parentId);
48 void PopulateMetadata(
const QString &path,
int type, QString &comment,
49 std::chrono::seconds &time,
51 void SyncFile(
const QFileInfo &fileInfo,
int devId,
52 const QString &base,
int parentId);
53 void CountTree(QDir &dir);
54 void CountFiles(
const QStringList &
paths);
59 bool m_scanning {
false};
79 int m_progressCount {0};
80 int m_progressTotalCount {0};
89 #endif // IMAGESCANNER_H
QHash< QString, QString > NameHash
ImageHash m_dbFileMap
Files in the Db from last scan, Map<Db filepath, Db Image>
QStringList m_changedImages
Ids of dirs/files that have been updates/modified.
QElapsedTimer m_bcastTimer
Elapsed time since last progress event generated.
QMutex m_mutexState
Mutex protecting scan state.
QMutex m_mutexProgress
Progress counts mutex.
QPair< int, QString > ClearTask
def scan(profile, smoonURL, gate)
ImageHash m_seenDir
Dirs seen by current scan, Map<Db filepath, Earlier Image>
QHash< QString, ImagePtr > ImageHash
ImageThumb< DBFS > & m_thumb
Companion thumbnail generator.
QList< ClearTask > m_clearQueue
Queue of pending Clear requests.
ImageHash m_dbDirMap
Dirs in the Db from last scan, Map<Db filepath, Db Image>
QDir m_dir
Global working dir for file detection.
virtual void run(void)
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
QRegularExpression m_exclusions
Pattern of dir names to ignore whilst scanning.
Image Scanner thread requires a database/filesystem adapter.
NameHash m_seenFile
Files seen by current scan Map <Db filepath, Earlier abs filepath>
QMutex m_mutexQueue
Mutex protecting Clear requests.
Creates and manages thumbnails.
This is a wrapper around QThread that does several additional things.
DBFS & m_dbfs
Database/filesystem adapter.