diff options
author | Ken Moore <ken@pcbsd.org> | 2014-11-05 14:50:53 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-11-05 14:50:53 -0500 |
commit | db428a4da0be7672ddcaa48747fd063b8e6a08b6 (patch) | |
tree | 6810c67c6b73ee23534b950a4d98b83d05170cbe /lumina-fm/MainUI.h | |
parent | Fix the display of a few of the search results in lumina-search (diff) | |
download | lumina-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/MainUI.h')
-rw-r--r-- | lumina-fm/MainUI.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h index 31a0269e..61e34ffe 100644 --- a/lumina-fm/MainUI.h +++ b/lumina-fm/MainUI.h @@ -38,9 +38,10 @@ #include <QDesktopWidget> #include <QThread> #include <QUrl> +#include <QThread> //Phonon widgets -#include <Phonon/BackendCapabilities> +//#include <Phonon/BackendCapabilities> #include <Phonon/MediaObject> #include <Phonon/VideoWidget> #include <Phonon/AudioOutput> @@ -55,6 +56,7 @@ #include "FODialog.h" //file operation dialog #include "BMMDialog.h" //bookmark manager dialog #include "MimeIconProvider.h" //icon provider for the view widgets +#include "BackgroundWorker.h" namespace Ui{ class MainUI; @@ -73,6 +75,8 @@ public slots: private: Ui::MainUI *ui; + QThread *workThread; + BackgroundWorker *worker; //Internal non-ui widgets QTabBar *tabBar; QLineEdit *currentDir; @@ -94,7 +98,7 @@ private: //Internal variables QStringList snapDirs; //internal saved variable for the discovered zfs snapshot dirs QString CItem; //the item that was right-clicked (for the context menu) - QStringList imgFilter, multiFilter; //image/multimedia filters + //QStringList imgFilter, multiFilter; //image/multimedia filters QSettings *settings; QShortcut *nextTabLShort, *nextTabRShort, *closeTabShort, *copyFilesShort, *pasteFilesShort, *deleteFilesShort; QCompleter *dirCompleter; @@ -122,10 +126,10 @@ private slots: this->OpenDirs(in.split("\n")); } - //General button check functions (start in a new thread!) - void checkForMultimediaFiles(); - void checkForBackups(); - void checkForPictures(); + //General button check functions (started in a seperate thread!) + void AvailableMultimediaFiles(QStringList files); + void AvailableBackups(QString basedir, QStringList snapdirs); + void AvailablePictures(QStringList files); //General page switching void goToMultimediaPage(); @@ -202,6 +206,9 @@ private slots: void CopyItems(); void PasteItems(); +signals: + void DirChanged(QString path); + protected: void resizeEvent(QResizeEvent*); |