FileSearchPath Class Reference

Public Member Functions

 FileSearchPath (const QString &path)
 
bool contains (const QString &path) const
 Check if path is contained within this path.
 
const QMap< QString, QString > & getCache ()
 
bool hasCache ()
 
bool isRecursive () const
 
bool isValid () const
 
const QString & path () const
 
void setCache (const QMap< QString, QString > &files)
 Set the list of the names files located in the directory.
 
void setPath (const QString &path)
 
void setRecursive (bool b)
 
QVariant toVariant () const
 

Static Public Member Functions

static QList< FileSearchPathfromStringList (const QStringList &collection)
 
static FileSearchPath fromVariant (const QVariant &var)
 
static QList< FileSearchPathfromVariantList (const QVariantList &collection)
 
static void merge (QList< FileSearchPath > &paths)
 Merge paths that contain each other.
 
static FileSearchPath resolveTemplated (TemplatedPathResolver &resolver, const FileSearchPath &path)
 
static QList< FileSearchPathresolveTemplated (TemplatedPathResolver &resolver, const QList< FileSearchPath > &paths)
 
static QVariantList toVariantList (const QList< FileSearchPath > &collection)
 

Detailed Description

Definition at line 33 of file filesearchpath.h.

Member Function Documentation

bool FileSearchPath::contains ( const QString &  path) const

Check if path is contained within this path.

A path is contained within this path if the paths are equal or if this path is recursive and the passed path is in its directory tree.

Definition at line 132 of file filesearchpath.cpp.

void FileSearchPath::merge ( QList< FileSearchPath > &  paths)
static

Merge paths that contain each other.

The merge is performed in-place, modifying the passed in list.

Definition at line 147 of file filesearchpath.cpp.

void FileSearchPath::setCache ( const QMap< QString, QString > &  files)

Set the list of the names files located in the directory.

The cache is a map where the key is the name in lowercase and the entry will be case sensitive or not depending on the implementation.

Definition at line 117 of file filesearchpath.cpp.


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