eVaf
eVaf::FileFinder::iFileFinder Class Referenceabstract

File finder interface. More...

#include </var/tmp/work/evaf/src/apps/FileFinder/Engine/ifilefinder.h>

Signals

void finished (bool canceled)
 Signal emitted when the search is finished. More...
 
void found (QString const &fileName, QString const &dir)
 Signal emitted for every file found during the search. More...
 

Public Member Functions

virtual bool busy () const =0
 Indicates that a search is ongoing. More...
 
virtual void cancel ()=0
 Cancels an ongoing search. More...
 
 iFileFinder ()
 Interface constructor. More...
 
virtual void search (QString const &dir, bool recursive, Filter const &filter)=0
 Starts a file search in the directory dir using filter. More...
 
virtual ~iFileFinder ()
 Empty virtual destructor. More...
 

Detailed Description

File finder interface.

The iFileFinder interface is used to search for files using name and content filters.

Definition at line 73 of file ifilefinder.h.

Constructor & Destructor Documentation

eVaf::FileFinder::iFileFinder::iFileFinder ( )
inline

Interface constructor.

Definition at line 80 of file ifilefinder.h.

virtual eVaf::FileFinder::iFileFinder::~iFileFinder ( )
inlinevirtual

Empty virtual destructor.

Definition at line 83 of file ifilefinder.h.

Member Function Documentation

virtual bool eVaf::FileFinder::iFileFinder::busy ( ) const
pure virtual

Indicates that a search is ongoing.

virtual void eVaf::FileFinder::iFileFinder::cancel ( )
pure virtual

Cancels an ongoing search.

void eVaf::FileFinder::iFileFinder::finished ( bool  canceled)
signal

Signal emitted when the search is finished.

Parameters
canceledTrue if the search was canceled instead of finished
void eVaf::FileFinder::iFileFinder::found ( QString const &  fileName,
QString const &  dir 
)
signal

Signal emitted for every file found during the search.

Parameters
fileNamename of the file with a path relative to the search directory
dirSearch directory
virtual void eVaf::FileFinder::iFileFinder::search ( QString const &  dir,
bool  recursive,
Filter const &  filter 
)
pure virtual

Starts a file search in the directory dir using filter.

Parameters
dirDirectory where to search
recursiveIf True, searches also in sub-directories
filterFile name and content filter

The search() function searches for files matching the given filter. The search is started in the directory dir and continues recursively into sub-directories if the recursive flag is set to true.

The function is non-blocking and returns immediately. Results of the search are reported with found() signals and the finished() signal indicates that the search is either finished or canceled.

If a new search is started before the current search is finished, then the current search is canceled.


The documentation for this class was generated from the following file: