Debian Codegraph @

include/util/dpinyin.h

raw
1 // SPDX-FileCopyrightText: 2017 - 2023 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4
5 #ifndef DPINYIN_H
6 #define DPINYIN_H
7
8 #include <dtkcore_global.h>
9
10 #include <QHash>
11
12 DCORE_BEGIN_NAMESPACE
13
14 // without polyphonic support
15 QString LIBDTKCORESHARED_EXPORT Chinese2Pinyin(const QString& words);
16
17 //!< @~english enum ToneStyle - pinyin tone style
18 enum ToneStyle {
19 TS_NoneTone, /*!< @~english pinyin without tone */
20 TS_Tone, /*!< @~english pinyin tone, default style in dictory file*/
21 TS_ToneNum, /*!< @~english pinyin tone number */
22 };
23
24 // support polyphonic
25 QStringList LIBDTKCORESHARED_EXPORT pinyin(const QString& words, ToneStyle ts = TS_Tone, bool *ok = nullptr);
26
27 // support polyphonic
28 QStringList LIBDTKCORESHARED_EXPORT firstLetters(const QString& words);
29
30 DCORE_END_NAMESPACE
31
32 #endif // DPINYIN_H