diff options
author | Arno <arno@disconnect.de> | 2018-04-03 07:52:56 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-04-03 07:52:56 +0200 |
commit | bac6fe431150bb5706fe0fb349e753b8fe08c12e (patch) | |
tree | 2841c2c8c3e8e33321855a0635f4b8f0d6891b46 /smdirmodel.h | |
parent | 2213d00d25b6b3127e33a0df63cae54d29748d06 (diff) | |
download | SheMov-bac6fe431150bb5706fe0fb349e753b8fe08c12e.tar.gz SheMov-bac6fe431150bb5706fe0fb349e753b8fe08c12e.tar.bz2 SheMov-bac6fe431150bb5706fe0fb349e753b8fe08c12e.zip |
Good riddance Filesystem Widget!
Get rid of FilesystemWidget and helper classes. The SmDirWatcher was
useful, once, I guess, nice to implement it by foot, but with the
current workflow it isn't needed any more.
Diffstat (limited to 'smdirmodel.h')
-rw-r--r-- | smdirmodel.h | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/smdirmodel.h b/smdirmodel.h deleted file mode 100644 index 9128797..0000000 --- a/smdirmodel.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version - 2 of the License, or (at your option) any later version. -*/ - -#ifndef SMDIRMODEL_H -#define SMDIRMODEL_H - -#include <QDir> - -#include <smtreemodel.h> -#include <smdirwatcher.h> - -class SmDirWatcher; -class QTimer; -class SmTreeItem; -class QMutex; -class SmDataColletor; - -class SmDirModel : public SmTreeModel { - Q_OBJECT - public: - enum CustomRoles { NameRole = Qt::UserRole + 1, SizeRole = Qt::UserRole + 2, TypeRole = Qt::UserRole + 3, CreatedRole = Qt::UserRole + 4, Md5sumRole = Qt::UserRole + 5, DurSizeRole = Qt::UserRole + 6, BitrateRole = Qt::UserRole + 7, FullPathRole = Qt::UserRole + 8, PresentRole = Qt::UserRole + 9 }; - enum Fields { Name = 0, Size = 1, Type = 2, Created = 3, Md5sum = 4, DurSize = 5, Bitrate = 6, FullPath = 7, Present = 8 }; - enum { NumFields = 9 }; - enum FileDate { Access, Modified, Status }; - enum Present { InFiles, InOrigin, InPictures, InNone }; - explicit SmDirModel(const QStringList &headers, QObject *parent = 0); - virtual ~SmDirModel(); - virtual QVariant data(const QModelIndex &index, int role) const; - virtual bool setData(const QModelIndex &index, const QVariant &value, int role); - bool isDir(const QModelIndex &idx) const; - QDir dir() const; - QFileInfo fileInfo(const QModelIndex &idx) const; - QTimer *refreshTimer() { return mRefreshTimer; } - SmDirWatcher *watcher() { return mWatch; } - - public slots: - void setDir(const QString &dir); - void dirEvent(const QList<QVariant> &data, int e); - void readSettings(); - void refresh(); - - private slots: - void populate(SmTreeItem *root); - void addFile(const QList<QVariant> &data); - - signals: - void needResize(); - void totalFiles(int numFiles); - void progress(); - void fsFreeChanged(); - - private: - SmDirWatcher *mWatch; - QStringList mHeaders; - QString mCurrentDir; - QTimer *mRunTimer; - QTimer *mRefreshTimer; - QMap<QString, QIcon> mIcons; - bool mExpensiveOps; -}; - -class TimerHandler { - public: - TimerHandler(QTimer *timer); - ~TimerHandler(); - - private: - QTimer *mTimer; -}; - -class WatcherHandler { - public: - WatcherHandler(SmDirWatcher *watcher); - ~WatcherHandler(); - - private: - SmDirWatcher *mWatcher; -}; - -#endif // SMDIRMODEL_H |