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< FileSearchPath > | fromStringList (const QStringList &collection) |
static FileSearchPath | fromVariant (const QVariant &var) |
static QList< FileSearchPath > | fromVariantList (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< FileSearchPath > | resolveTemplated (TemplatedPathResolver &resolver, const QList< FileSearchPath > &paths) |
static QVariantList | toVariantList (const QList< FileSearchPath > &collection) |
Definition at line 33 of file filesearchpath.h.
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.
|
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.