diff options
author | Arno <am@disconnect.de> | 2013-04-06 07:19:55 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-04-06 07:19:55 +0200 |
commit | 3956fb84ccc26d5ba3be1814192b0c377adfbad0 (patch) | |
tree | b120bc942235f542797d4c4de8a69cfaf8df4eba /smdirwatcher.h | |
parent | 511d1f9cd61586336014c55e32f67872e5e4ee10 (diff) | |
download | SheMov-3956fb84ccc26d5ba3be1814192b0c377adfbad0.tar.gz SheMov-3956fb84ccc26d5ba3be1814192b0c377adfbad0.tar.bz2 SheMov-3956fb84ccc26d5ba3be1814192b0c377adfbad0.zip |
SmDirModel: check if file already is in database
Indicate if we already have a file by coloring the filename darkGreen
when browsing the filesystem.
Diffstat (limited to 'smdirwatcher.h')
-rw-r--r-- | smdirwatcher.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/smdirwatcher.h b/smdirwatcher.h index 4a85c5a..3a30360 100644 --- a/smdirwatcher.h +++ b/smdirwatcher.h @@ -13,6 +13,9 @@ #include <QVariant> #include <QFileInfo> #include <QQueue> +#include <QMutex> +#include <QSqlDatabase> +#include <QSqlQuery> class SmTreeItem; class QSemaphore; @@ -53,6 +56,7 @@ class SmDataColletor : public QThread { void init(QSemaphore *set, QSemaphore *get, QQueue<QPair<QString, SmDirWatcher::DWEvent> > *data); public slots: + void setCheckForPresent(bool present); void run(); signals: @@ -62,13 +66,17 @@ class SmDataColletor : public QThread { private: SmTreeItem *populate(const QString &dir); - const QList<QVariant> fileData(const QFileInfo &fi) const; + const QList<QVariant> fileData(const QFileInfo &fi); QString mCurrent; QSemaphore *mSemFree; QSemaphore *mSemUsed; QQueue<QPair<QString, SmDirWatcher::DWEvent> > *mDataQueue; int mMode; const int mNumFields; + bool mCheckForPresent; + QMutex mCheckForPresentMx; + QSqlQuery *mPicPresentQ; + QSqlQuery *mMovPresentQ; }; #endif // SMDIRWATCHER_H |