Mercurial > dedupe
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 3:7a44ba08673d | 4:f489b0c9bf99 |
|---|---|
| 16 class DataController : QObject { | 16 class DataController : QObject { |
| 17 private: | 17 private: |
| 18 Q_OBJECT | 18 Q_OBJECT |
| 19 | 19 |
| 20 public: | 20 public: |
| 21 DataController(); | 21 DataController(const QString& path, bool showGUI); |
| 22 DataController(bool showGUI); | |
| 22 ~DataController(); | 23 ~DataController(); |
| 23 | 24 |
| 24 void findFiles(const QDir& dir, FileDBLink& dblink); | 25 void findFiles(const QDir& dir, FileDBLink& dblink); |
| 25 static void findFiles(const QDir& dir, QStringList& list); | 26 static void findFiles(const QDir& dir, QStringList& list); |
| 26 static QStringList findFiles(const QDir& dir); | 27 static QStringList findFiles(const QDir& dir); |
| 27 | 28 |
| 28 void setDir(const QDir& dir); | 29 void setDir(const QDir& dir); |
| 30 | |
| 31 public: | |
| 32 void buildDB(const QDir& dir); | |
| 29 | 33 |
| 30 public slots: | 34 public slots: |
| 31 //void cellClicked(int row, int column); | 35 //void cellClicked(int row, int column); |
| 32 void cellDoubleClicked(int row, int column); | 36 void cellDoubleClicked(int row, int column); |
| 33 bool toggleShowFullPath(); | 37 bool toggleShowFullPath(); |
| 38 | 42 |
| 39 signals: | 43 signals: |
| 40 void populateProgress(int); | 44 void populateProgress(int); |
| 41 | 45 |
| 42 private: | 46 private: |
| 47 void setup(const QString& dbpath, const QString& searchPath, bool showGUI); | |
| 43 void populate(bool showNameDups, bool showSizeDups, | 48 void populate(bool showNameDups, bool showSizeDups, |
| 44 bool showMTimeDups, bool showCheckSumDups, | 49 bool showMTimeDups, bool showCheckSumDups, |
| 45 float editDistanceCutoff); | 50 float editDistanceCutoff); |
| 51 | |
| 52 void setupGUI(); | |
| 46 | 53 |
| 47 QTreeWidgetItem* createItem(const FileDBLink::DBInfo& info); | 54 QTreeWidgetItem* createItem(const FileDBLink::DBInfo& info); |
| 48 | 55 |
| 49 bool showFullPath; | 56 bool showFullPath; |
| 50 QMainWindow* mw; | 57 QMainWindow* mw; |
