Mercurial > dedupe
view DataController.hpp @ 4:f489b0c9bf99
Refactored to allow commandline tools to use DataController.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Tue, 21 Aug 2012 15:27:29 +0200 |
| parents | 2833b7f8884a |
| children | 5e4985407feb |
line wrap: on
line source
#ifndef DATACONTROLLER_HPP #define DATACONTROLLER_HPP #include <QtCore/QObject> #include <QtCore/QDir> #include "FileDBLink.hpp" class QMainWindow; class QTreeWidget; class QTreeWidgetItem; class QAction; class QSpinBox; class QTimer; class DataController : QObject { private: Q_OBJECT public: DataController(const QString& path, bool showGUI); DataController(bool showGUI); ~DataController(); void findFiles(const QDir& dir, FileDBLink& dblink); static void findFiles(const QDir& dir, QStringList& list); static QStringList findFiles(const QDir& dir); void setDir(const QDir& dir); public: void buildDB(const QDir& dir); public slots: //void cellClicked(int row, int column); void cellDoubleClicked(int row, int column); bool toggleShowFullPath(); void setShowFullPath(bool); void populate(); void delayPopulate(); signals: void populateProgress(int); private: void setup(const QString& dbpath, const QString& searchPath, bool showGUI); void populate(bool showNameDups, bool showSizeDups, bool showMTimeDups, bool showCheckSumDups, float editDistanceCutoff); void setupGUI(); QTreeWidgetItem* createItem(const FileDBLink::DBInfo& info); bool showFullPath; QMainWindow* mw; QTreeWidget* tw; FileDBLink* dblink; QAction* nameFilter; QAction* sizeFilter; QAction* mtimeFilter; QAction* checksumFilter; QSpinBox* editCutoffSpin; QTimer* populateDelay; QDir dir; }; #endif //DATACONTROLLER_HPP
