#include <Nepomuk/Query/FileQuery>

Public Types | |
| enum | FileModeFlags { QueryFiles = 0x1, QueryFolders = 0x2, QueryFilesAndFolders = QueryFiles|QueryFolders } |
Public Member Functions | |
| FileQuery () | |
| FileQuery (const Term &term) | |
| FileQuery (const Query &query) | |
| ~FileQuery () | |
| void | addExcludeFolder (const KUrl &folder) |
| void | addIncludeFolder (const KUrl &folder) |
| void | addIncludeFolder (const KUrl &folder, bool recursive) |
| QHash< KUrl, bool > | allIncludeFolders () const |
| KUrl::List | excludeFolders () const |
| FileMode | fileMode () const |
| KUrl::List | includeFolders () const |
| FileQuery & | operator= (const Query &) |
| void | setExcludeFolders (const KUrl::List &folders) |
| void | setFileMode (FileMode mode) |
| void | setIncludeFolders (const KUrl::List &folders) |
| void | setIncludeFolders (const QHash< KUrl, bool > &folders) |
Detailed Description
A Nepomuk desktop query specialized for file searches.
FileQuery is an extension to Query which adds some syntactic sugar for dealing with file queries. This includes a restriction of the results to files and the possibility to restrict the search to specific folders via setIncludeFolders() and setExcludeFolders().
- Warning:
- FileQuery does only return files and folders as results.
- Since:
- 4.4
Member Enumeration Documentation
An enumeration used in setFileMode() to state wether the query should return files and folders or only files or only folders.
- Since:
- 4.5
Definition at line 167 of file filequery.h.
Constructor & Destructor Documentation
| Nepomuk::Query::FileQuery::FileQuery | ( | ) |
Create an empty invalid file query object.
| Nepomuk::Query::FileQuery::FileQuery | ( | const Term & | term | ) | [explicit] |
Create a file query with root term term.
- Since:
- 4.6
| Nepomuk::Query::FileQuery::FileQuery | ( | const Query & | query | ) |
Copy constructor.
| Nepomuk::Query::FileQuery::~FileQuery | ( | ) |
Destructor.
Member Function Documentation
| void Nepomuk::Query::FileQuery::addExcludeFolder | ( | const KUrl & | folder | ) |
Add a folder to exclude from the search.
If exclude folders are set the query will be restricted to files that are not in that folder and its subfolders.
- Parameters:
-
folder The folder to exclude from the search.
- See also:
- setExcludeFolders, excludeFolders, addIncludeFolder
| void Nepomuk::Query::FileQuery::addIncludeFolder | ( | const KUrl & | folder | ) |
Add a folder to include in the search.
If include folders are set the query will be restricted to files from that folders and their subfolders.
- Parameters:
-
folder The folder to include in the search.
- See also:
- setIncludeFolders, includeFolders, addExcludeFolder
| void Nepomuk::Query::FileQuery::addIncludeFolder | ( | const KUrl & | folder, |
| bool | recursive | ||
| ) |
Add a folder to include in the search path.
If include folders are set the query will be restricted to files from that folders and optionally their subfolders.
- Parameters:
-
folder The folder to include in the search. recursive If truesubfolders offolderwill be searched, too.
- See also:
- setIncludeFolders, includeFolders, addExcludeFolder
- Since:
- 4.6
| QHash<KUrl, bool> Nepomuk::Query::FileQuery::allIncludeFolders | ( | ) | const |
The hash of include folders set via addIncludeFolder() and setIncludeFolders() including their recursive flag.
- Since:
- 4.6
| KUrl::List Nepomuk::Query::FileQuery::excludeFolders | ( | ) | const |
The list of exclude folders set via addExcludeFolder() and setExcludeFolders().
- See also:
- addExcludeFolder, setExcludeFolders, includeFolders
| FileMode Nepomuk::Query::FileQuery::fileMode | ( | ) | const |
- Returns:
- The file mode set in setFileMode()
- Since:
- 4.5
| KUrl::List Nepomuk::Query::FileQuery::includeFolders | ( | ) | const |
The list of include folders set via addIncludeFolder() and setIncludeFolders().
Assignment operator.
Reimplemented from Nepomuk::Query::Query.
| void Nepomuk::Query::FileQuery::setExcludeFolders | ( | const KUrl::List & | folders | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
-
folders The folders to exclude from the search.
- See also:
- addExcludeFolder, excludeFolders, setIncludeFolders
| void Nepomuk::Query::FileQuery::setFileMode | ( | FileMode | mode | ) |
Set the file mode, i.e.
wether the query should return files and folders or only files or only folders. By default both files and folders are returned.
- See also:
- fileMode()
- Since:
- 4.5
| void Nepomuk::Query::FileQuery::setIncludeFolders | ( | const KUrl::List & | folders | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
-
folders The folders to include in the search.
- See also:
- addIncludeFolder, includeFolders, setExcludeFolders
| void Nepomuk::Query::FileQuery::setIncludeFolders | ( | const QHash< KUrl, bool > & | folders | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
-
folders A hash of the folders to include in the search and their recursive flag.
- Since:
- 4.6
The documentation for this class was generated from the following file:
KDE 4.7 API Reference