|
dtkio
dtk library for dtkio.
|
用于文件和文件内容搜索的类 更多...
#include <dsearch.h>


信号 | |
| void | matched () |
| void | completed () |
| void | stoped () |
Public 成员函数 | |
| DSearch (QObject *parent=nullptr) | |
| DSearch (quint32 maxResultCount, SearchFlags flags, QObject *parent=nullptr) | |
| bool | search (const QString &path, const QString &keyword) |
| 发起搜索 | |
| bool | stop () |
| 停止搜索 | |
| QStringList | matchedResults () const |
| 获取当前搜索结果 | |
| void | setResultFilter (const ResultFilterFunc &filter) |
| 设置搜索结果过滤器 | |
| void | setMaxResultCount (quint32 maxResultCount) |
| 设置最大搜索结果数量,应用与各搜索模式 | |
| quint32 | maxResultCount () const |
| 获取最大搜索结果数 | |
| void | setSearchFlags (SearchFlags flags) |
| 设置搜索模式 | |
| SearchFlags | searchFlags () const |
| 获取当前搜索模式 | |
| void | setIndexPath (const QString &path) |
| 设置索引文件存储路径 | |
| QString | indexPath () const |
| 获取索引存储路径 | |
属性 | |
| quint32 | maxResultCount |
| SearchFlags | searchFlags |
| QString | indexPath |
用于文件和文件内容搜索的类
| QString DSearch::indexPath | ( | ) | const |
| QStringList DSearch::matchedResults | ( | ) | const |
获取当前搜索结果
| quint32 DSearch::maxResultCount | ( | ) | const |
| bool DSearch::search | ( | const QString & | path, |
| const QString & | keyword | ||
| ) |
| SearchFlags DSearch::searchFlags | ( | ) | const |
| void DSearch::setIndexPath | ( | const QString & | path | ) |
设置索引文件存储路径
| [in] | 存储路径 |
| void DSearch::setMaxResultCount | ( | quint32 | maxResultCount | ) |
设置最大搜索结果数量,应用与各搜索模式
| [in] | maxResultCount | 最大数量 |
| void DSearch::setResultFilter | ( | const ResultFilterFunc & | filter | ) |
设置搜索结果过滤器
| [in] | filter | 过滤函数 |
| void DSearch::setSearchFlags | ( | SearchFlags | flags | ) |
设置搜索模式
| [in] | flags | 搜索模式 |
| bool DSearch::stop | ( | ) |
停止搜索