summaryrefslogtreecommitdiffstats
path: root/smdirwatcher.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2014-12-07 22:40:10 +0100
committerArno <am@disconnect.de>2014-12-07 22:40:10 +0100
commit3adf6f859dd4d5df8e8fceacce74487814867e61 (patch)
tree5725a517b379ceeb30eda09fbe6a7405e5f6bbe8 /smdirwatcher.h
parent51bc87ebc73b5777ad36e35ec20445b07a0d7639 (diff)
downloadSheMov-3adf6f859dd4d5df8e8fceacce74487814867e61.tar.gz
SheMov-3adf6f859dd4d5df8e8fceacce74487814867e61.tar.bz2
SheMov-3adf6f859dd4d5df8e8fceacce74487814867e61.zip
Major revamp of the file Manager
Nothing is async any more. Didn't work, anyway. Instead show a QProgressDialog when gathering data. Was kinda surprising that processEvents has to be called explicitly... Well, done!
Diffstat (limited to 'smdirwatcher.h')
-rw-r--r--smdirwatcher.h54
1 files changed, 1 insertions, 53 deletions
diff --git a/smdirwatcher.h b/smdirwatcher.h
index 775ca63..579a4c3 100644
--- a/smdirwatcher.h
+++ b/smdirwatcher.h
@@ -44,70 +44,18 @@ class SmDirWatcher : public QThread {
void run();
void stop();
void setDir(const QString &dir);
- void startAsyncJobs();
- void gatherAsync(const QString &path);
void setExpensiveOps(bool expensiveOps);
private:
QList<QVariant> generalData(const QString &path);
+ int presenceData(QString &md5);
int mFd;
int mDescr;
QString mCurrent;
char *mINdata;
int mBufLen;
- QThreadPool *mAsyncPool;
int mNumFields;
- QList<AsyncTask*> mAsyncTasks;
bool mExpensiveOps;
};
-class AsyncTask : public QObject, public QRunnable {
- Q_OBJECT
- public:
- explicit AsyncTask(const QString &path = QString());
- bool skipMe();
-
- protected:
- virtual void run() = 0;
- bool mSkip;
- QMutex mStatusMx;
- const QString mPath;
-};
-
-class Md5Summer : public AsyncTask {
- Q_OBJECT
- public:
- explicit Md5Summer(const QString &path);
-
- signals:
- void md5sumDone(QString, QString);
-
- protected:
- virtual void run();
-};
-
-class FfmpegGatherer : public AsyncTask {
- Q_OBJECT
- public:
- explicit FfmpegGatherer(const QString &path);
-
- signals:
- void ffmpegDone(QString, QVariantMap);
-
- protected:
- virtual void run();
-};
-
-class PicSizeGatherer : public AsyncTask {
- Q_OBJECT
- public:
- explicit PicSizeGatherer(const QString &path);
-
- signals:
- void picSizeDone(QString, QVariant);
-
- protected:
- virtual void run();
-};
-
#endif // SMDIRWATCHER_H