aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/Browser.h
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-23 22:21:42 -0400
committerKen Moore <ken@pcbsd.org>2016-09-23 22:21:42 -0400
commit5a4a64fe38e4ac356ee1375cb909075717738c18 (patch)
tree349d2be107cafac3b5c99746523a29522f791380 /src-qt5/desktop-utils/lumina-fm/Browser.h
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-5a4a64fe38e4ac356ee1375cb909075717738c18.tar.gz
lumina-5a4a64fe38e4ac356ee1375cb909075717738c18.tar.bz2
lumina-5a4a64fe38e4ac356ee1375cb909075717738c18.zip
Disable the Completer used within lumina-fm to speed up loading.
Also add the beginnings of a new backend for directory browsing.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/Browser.h')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/Browser.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.h b/src-qt5/desktop-utils/lumina-fm/Browser.h
new file mode 100644
index 00000000..21dd7789
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-fm/Browser.h
@@ -0,0 +1,47 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This is the main browsing backend for the file manager
+//===========================================
+#ifndef _LUMINA_FM_BROWSE_BACKEND_H
+#define _LUMINA_FM_BROWSE_BACKEND_H
+
+class Browser : public QObject{
+ Q_OBJECT
+public:
+ Browser(QObject *parent = 0);
+ ~Browser();
+
+ void showHiddenFiles(bool);
+ bool showingHiddenFiles();
+
+private:
+ QString currentDir;
+ QFileSystemWatcher *watcher;
+ bool showHidden;
+
+ void loadItem(QFileInfo info); //this is the main loader class - multiple instances each run in a separate thread
+
+private slots:
+ void fileChanged(QString); //tied into the watcher - for file change notifications
+ void dirChanged(QString); // tied into the watcher - for new/removed files in the current dir
+
+public slots:
+ QString loadDirectory(QString dir = "");
+
+signals:
+ //Main Signals
+ void itemUpdated(QString item); //emitted if a file changes after the initial scan
+ void clearItems(); //emitted when dirs change for example
+ void itemDataAvailable(QIcon, LFileInfo);
+
+ //Start/Stop signals for loading of data
+ void itemsLoading(int); //number of items which are getting loaded
+ void itemsDoneLoading(); //emitted when all items are done loading
+
+};
+
+#endif
bgstack15