Baloo::IndexerConfig
#include <Baloo/IndexerConfig>
Public Member Functions | |
IndexerConfig (const IndexerConfig &)=delete | |
bool | canBeSearched (const QString &folder) const |
QStringList | excludeFilters () const |
QStringList | excludeFolders () const |
QStringList | excludeMimetypes () const |
bool | fileIndexingEnabled () const |
QStringList | includeFolders () const |
bool | indexHidden () const |
bool | onlyBasicIndexing () const |
IndexerConfig & | operator= (const IndexerConfig &)=delete |
void | refresh () const |
void | setExcludeFilters (const QStringList &excludeFilters) |
void | setExcludeFolders (const QStringList &excludeFolders) |
void | setExcludeMimetypes (const QStringList &excludeMimetypes) |
void | setFileIndexingEnabled (bool enabled) const |
void | setIncludeFolders (const QStringList &includeFolders) |
void | setIndexHidden (bool value) const |
void | setOnlyBasicIndexing (bool value) |
bool | shouldBeIndexed (const QString &path) const |
Detailed Description
This class allows it to access the current config, to read and modify it.
It is not meant as a means to infer the current state of the Indexer or the DB. The DB is updated asynchronously, and changes of the config will not be reflected immediately.
Definition at line 28 of file indexerconfig.h.
Constructor & Destructor Documentation
◆ IndexerConfig()
IndexerConfig::IndexerConfig | ( | ) |
Definition at line 26 of file indexerconfig.cpp.
◆ ~IndexerConfig()
IndexerConfig::~IndexerConfig | ( | ) |
Definition at line 31 of file indexerconfig.cpp.
Member Function Documentation
◆ canBeSearched()
bool IndexerConfig::canBeSearched | ( | const QString & | folder | ) | const |
Check if folder
can be searched.
folder
can be searched if itself or one of its descendants is indexed.
Example: if ~/foo is not indexed and ~/foo/bar is indexed then ~/foo can be searched.
- Returns
true
if thefolder
can be searched.
Definition at line 51 of file indexerconfig.cpp.
◆ excludeFilters()
QStringList IndexerConfig::excludeFilters | ( | ) | const |
Definition at line 66 of file indexerconfig.cpp.
◆ excludeFolders()
QStringList IndexerConfig::excludeFolders | ( | ) | const |
Folders that are excluded from indexing.
(Descendant folders of an excluded folder can be added and they will be indexed.)
- Returns
- list of paths.
Definition at line 56 of file indexerconfig.cpp.
◆ excludeMimetypes()
QStringList IndexerConfig::excludeMimetypes | ( | ) | const |
Definition at line 71 of file indexerconfig.cpp.
◆ fileIndexingEnabled()
bool IndexerConfig::fileIndexingEnabled | ( | ) | const |
Definition at line 36 of file indexerconfig.cpp.
◆ includeFolders()
QStringList IndexerConfig::includeFolders | ( | ) | const |
Folders to search for files to index and analyze.
- Returns
- list of paths.
Definition at line 61 of file indexerconfig.cpp.
◆ indexHidden()
bool IndexerConfig::indexHidden | ( | ) | const |
Definition at line 96 of file indexerconfig.cpp.
◆ onlyBasicIndexing()
bool IndexerConfig::onlyBasicIndexing | ( | ) | const |
Definition at line 106 of file indexerconfig.cpp.
◆ refresh()
void IndexerConfig::refresh | ( | ) | const |
Definition at line 116 of file indexerconfig.cpp.
◆ setExcludeFilters()
void IndexerConfig::setExcludeFilters | ( | const QStringList & | excludeFilters | ) |
Definition at line 86 of file indexerconfig.cpp.
◆ setExcludeFolders()
void IndexerConfig::setExcludeFolders | ( | const QStringList & | excludeFolders | ) |
Definition at line 76 of file indexerconfig.cpp.
◆ setExcludeMimetypes()
void IndexerConfig::setExcludeMimetypes | ( | const QStringList & | excludeMimetypes | ) |
Definition at line 91 of file indexerconfig.cpp.
◆ setFileIndexingEnabled()
void IndexerConfig::setFileIndexingEnabled | ( | bool | enabled | ) | const |
Definition at line 41 of file indexerconfig.cpp.
◆ setIncludeFolders()
void IndexerConfig::setIncludeFolders | ( | const QStringList & | includeFolders | ) |
Definition at line 81 of file indexerconfig.cpp.
◆ setIndexHidden()
void IndexerConfig::setIndexHidden | ( | bool | value | ) | const |
Definition at line 101 of file indexerconfig.cpp.
◆ setOnlyBasicIndexing()
void IndexerConfig::setOnlyBasicIndexing | ( | bool | value | ) |
Definition at line 111 of file indexerconfig.cpp.
◆ shouldBeIndexed()
bool IndexerConfig::shouldBeIndexed | ( | const QString & | path | ) | const |
Check if the file or folder path
should be indexed.
If itself or its nearest explicitly included or excluded ancestor is excluded it is not indexed. Otherwise it is indexed according to the includeFolders and excludeFilters config.
- Returns
true
if the file or folder atpath
should be indexed according to the configuration.
TODO KF6: deprecate, not of any concern for ouside users. Use Baloo::File
to know if a file has been indexed.
- See also
- Baloo::File
Definition at line 46 of file indexerconfig.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.