-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAnsleDictConfigFile.h
57 lines (50 loc) · 1.39 KB
/
AnsleDictConfigFile.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef CONFIGFILE_H
#define CONFIGFILE_H
#include "QSettings"
typedef QList< QMap<QString, QVariant> > LISTMAPINFO;
class ConfigFile
{
public:
ConfigFile(const QString &path);
~ConfigFile();
public:
void initMainConfig();
///////////////////////////////////////////////////////////////////
//获取发声方法
QString getSpeakMethod()
{
return cfg->value("SpeakTTS/SpeakMethod", "eSpeakTTS").toString();
}
void setSpeakMethod(const QString &speakMethod)
{
cfg->setValue("SpeakTTS/SpeakMethod", speakMethod);
}
///////////////////////////////////////////////////////////////////
//获取第三方发音引擎方
QString getQtSpeakTTS()
{
return cfg->value("SpeakTTS/QtSpeakTTS", "").toString();
}
void setQtSpeakTTS(const QString &QtSpeakTTS)
{
cfg->setValue("SpeakTTS/QtSpeakTTS", QtSpeakTTS);
}
///////////////////////////////////////////////////////////////////
//SpeakTTS
///////////////////////
//语速调节记录
QString getSpeakSpeed()
{
return cfg->value("SpeakTTS/SpeackRate", "0").toString();
}
void setSpeakSpeed(const QString &speakSpeed)
{
cfg->setValue("SpeakTTS/SpeackRate", speakSpeed);
}
private:
LISTMAPINFO getLMI(const QString & prefix);
void setLMI(const QString & prefix, LISTMAPINFO &lmi);
private:
QSettings *cfg;
};
#endif // CONFIGFILE_H