From 3956fb84ccc26d5ba3be1814192b0c377adfbad0 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 6 Apr 2013 07:19:55 +0200 Subject: SmDirModel: check if file already is in database Indicate if we already have a file by coloring the filename darkGreen when browsing the filesystem. --- smdirwatcher.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'smdirwatcher.h') diff --git a/smdirwatcher.h b/smdirwatcher.h index 4a85c5a..3a30360 100644 --- a/smdirwatcher.h +++ b/smdirwatcher.h @@ -13,6 +13,9 @@ #include #include #include +#include +#include +#include class SmTreeItem; class QSemaphore; @@ -53,6 +56,7 @@ class SmDataColletor : public QThread { void init(QSemaphore *set, QSemaphore *get, QQueue > *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 fileData(const QFileInfo &fi) const; + const QList fileData(const QFileInfo &fi); QString mCurrent; QSemaphore *mSemFree; QSemaphore *mSemUsed; QQueue > *mDataQueue; int mMode; const int mNumFields; + bool mCheckForPresent; + QMutex mCheckForPresentMx; + QSqlQuery *mPicPresentQ; + QSqlQuery *mMovPresentQ; }; #endif // SMDIRWATCHER_H -- cgit v1.2.3-70-g09d2