10 #include "scribusapi.h"
11 #include "deferredtask.h"
12 #include <QStringList>
43 FileSearch(QObject* parent,
const QString & fileName,
const QString & searchBase = QString::null,
int depthLimit = -1,
bool caseSensitive=
true);
54 const QStringList & matchingFiles()
const;
57 int foundCount()
const;
60 const QString & fileName()
const;
66 const QDir & currentDir()
const;
74 void searchComplete(
const QStringList& paths,
const QString& filename);
86 void addCurrentDirFiles();
109 QStack<QStringList::const_iterator>
m_iter;
QStack< QStringList > m_tree
This stack holds a list of directories on the tree, from the base to the level we're currently search...
Definition: filesearch.h:104
QString m_searchBase
Where the search starts from.
Definition: filesearch.h:92
QDir m_dir
A QDir set to the current directory, used for listing files and directories.
Definition: filesearch.h:113
QStack< QStringList::const_iterator > m_iter
A matching stack of iterators into the lists in m_tree. We use this stack to iterate directory by dir...
Definition: filesearch.h:109
A class to do a depth-first search for a file in a directory tree efficiently and safely (I hope)...
Definition: filesearch.h:24
virtual void next()=0
Do the next small chunk of processing, then return. You must implement this method to do whatever pro...
bool m_caseSensitive
Case sensitive flag.
Definition: filesearch.h:89
int m_depth
Conveniently keep track of how deeply we've recursed.
Definition: filesearch.h:116
QString m_fileName
What the filename we're looking for is.
Definition: filesearch.h:95
virtual void start()
Starts the timer and begins processing. If you override this you must call DeferredTask::start() at t...
Definition: deferredtask.cpp:68
DeferredTask is an abstraction of a generally long-running operation that is done in small steps unde...
Definition: deferredtask.h:37
QStringList m_matchingFiles
The list of files matched in the search.
Definition: filesearch.h:98
int m_maxdepth
Maximum depth to search to.
Definition: filesearch.h:119