MCPcopy Create free account
hub / github.com/QNapi/qnapi / ScanFilesThread

Class ScanFilesThread

gui/src/forms/frmscan.h:32–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include <QtWidgets>
31
32class ScanFilesThread : public QNapiThread {
33 Q_OBJECT
34 public:
35 ScanFilesThread();
36 void run();
37 void setSearchPath(const QString &path) { searchPath = path; }
38 void setFilters(const QString &filters) { scanFilters = filters.split(" "); }
39 void setSkipFilters(const QString &filters) {
40 skipFilters = filters.split(" ");
41 }
42 void setSkipIfSubtitlesExists(bool skip) { skipIfSubtitlesExists = skip; }
43 void setFollowSymLinks(bool follow) { followSymLinks = follow; }
44
45 QStringList fileList;
46
47 signals:
48 void addFile(const QString &fileName);
49 void scanFinished(bool result);
50 void folderChange(const QString &folder);
51
52 private:
53 bool doScan(const QString &path, QDir::Filters filters);
54
55 QSharedPointer<const StaticConfig> staticConfig;
56 QString searchPath;
57 QStringList scanFilters, skipFilters;
58 bool skipIfSubtitlesExists, followSymLinks;
59 QSet<QString> visited;
60};
61
62class frmScan : public QDialog {
63 Q_OBJECT

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected