blob: 2d75fc3358aad58365b2a78c26982ade0e964015 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef XT9LDBMANAGER_H
#define XT9LDBMANAGER_H
#include <QLocale>
#include <QSharedPointer>
#include <QRegularExpression>
#include <QSet>
QT_BEGIN_NAMESPACE
namespace QtVirtualKeyboard {
class Xt9DbFile;
class Xt9LdbManager
{
public:
Xt9LdbManager();
void addSearchPath(const QString &ldbDirectory);
void setPhdEnabled(bool enabled);
bool phdEnabled() const;
bool loadDictionary(const QLocale &locale, const void *&data, qint64 &size);
void closeAll();
QString findDictionary(const QLocale &locale) const;
private:
QStringList searchPaths;
QMap<QString, QSharedPointer<Xt9DbFile>> ldbMap;
bool _phdEnabled;
static const QRegularExpression ldbRegex;
};
} // namespace QtVirtualKeyboard
QT_END_NAMESPACE
#endif // XT9LDBMANAGER_H
|