aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/BackgroundWorker.h
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-11-05 14:50:53 -0500
committerKen Moore <ken@pcbsd.org>2014-11-05 14:50:53 -0500
commitdb428a4da0be7672ddcaa48747fd063b8e6a08b6 (patch)
tree6810c67c6b73ee23534b950a4d98b83d05170cbe /lumina-fm/BackgroundWorker.h
parentFix the display of a few of the search results in lumina-search (diff)
downloadlumina-db428a4da0be7672ddcaa48747fd063b8e6a08b6.tar.gz
lumina-db428a4da0be7672ddcaa48747fd063b8e6a08b6.tar.bz2
lumina-db428a4da0be7672ddcaa48747fd063b8e6a08b6.zip
Streamline the file manager quite a bit by putting the long-lived checks in a seperate thread. This speeds up the loading of a directory quite a bit.
Diffstat (limited to 'lumina-fm/BackgroundWorker.h')
-rw-r--r--lumina-fm/BackgroundWorker.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/lumina-fm/BackgroundWorker.h b/lumina-fm/BackgroundWorker.h
new file mode 100644
index 00000000..3f0410bf
--- /dev/null
+++ b/lumina-fm/BackgroundWorker.h
@@ -0,0 +1,41 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2014, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This is the background class for running long-lived calculations
+//===========================================
+#ifndef _LUMINA_FILE_MANAGER_BACKGROUND_WORKER_H
+#define _LUMINA_FILE_MANAGER_BACKGROUND_WORKER_H
+
+#include <QObject>
+#include <QStringList>
+#include <QString>
+#include <QFileInfo>
+#include <QDir>
+#include <QDateTime>
+
+
+class BackgroundWorker : public QObject{
+ Q_OBJECT
+public:
+ BackgroundWorker();
+ ~BackgroundWorker();
+
+private:
+ QStringList multiFilter, imgFilter;
+
+public slots:
+ //Kickoff processes with these slots
+ // and then listen for the appropriate signals when finished
+ void startDirChecks(QString path);
+
+signals:
+ void ImagesAvailable(QStringList files);
+ void MultimediaAvailable(QStringList files);
+ void SnapshotsAvailable(QString basedir, QStringList snappaths);
+
+};
+
+#endif \ No newline at end of file
bgstack15