dtkio
dtk library for dtkio.
载入中...
搜索中...
未找到
dtksearchtypes.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DTKSEARCHTYPES_H
6#define DTKSEARCHTYPES_H
7
8#include <functional>
9
10#include <QFlags>
11#include <QMetaType>
12
13#include "dtksearch_global.h"
14
15DSEARCH_BEGIN_NAMESPACE
16
17using ResultFilterFunc = std::function<bool (const QString &)>;
18
20enum class SearchFlag : uint8_t {
21 FileName = 0x01,
22 PinYin = 0x02 | FileName,
23 FullText = 0x04,
24 AllEntries = PinYin | FullText
25};
26Q_DECLARE_FLAGS(SearchFlags, SearchFlag)
27
28DSEARCH_END_NAMESPACE
29
30Q_DECLARE_OPERATORS_FOR_FLAGS(DSEARCH_NAMESPACE::SearchFlags);
31Q_DECLARE_METATYPE(DSEARCH_NAMESPACE::SearchFlags)
32Q_DECLARE_METATYPE(DSEARCH_NAMESPACE::ResultFilterFunc)
33
34#endif // DTKSEARCHTYPES_H
SearchFlag
搜索模式
Definition dtksearchtypes.h:20