libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-client-qt
include
osmscoutclientqt
Voice.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_CLIENT_QT_VOICE_H
2
#define OSMSCOUT_CLIENT_QT_VOICE_H
3
/*
4
OSMScout - a Qt backend for libosmscout and libosmscout-map
5
Copyright (C) 2020 Lukas Karas
6
7
This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation; either
10
version 2.1 of the License, or (at your option) any later version.
11
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
*/
21
22
#include <
osmscoutclientqt/ClientQtImportExport.h
>
23
24
#include <osmscoutclient/VoiceProvider.h>
25
26
#include <QObject>
27
#include <QDir>
28
29
namespace
osmscout
{
30
31
class
OSMSCOUT_CLIENT_QT_API
AvailableVoice
:
public
QObject {
32
Q_OBJECT
33
34
Q_PROPERTY(
bool
valid
READ
isValid
() CONSTANT)
35
36
Q_PROPERTY(QString
lang
READ
getLang
() CONSTANT)
37
Q_PROPERTY(QString
gender
READ
getGender
() CONSTANT)
38
Q_PROPERTY(QString
name
READ
getName
() CONSTANT)
39
Q_PROPERTY(QString
license
READ
getLicense
() CONSTANT)
40
Q_PROPERTY(QString
directory
READ
getDirectory
() CONSTANT)
41
Q_PROPERTY(QString
author
READ
getAuthor
() CONSTANT)
42
Q_PROPERTY(QString
description
READ
getDescription
() CONSTANT)
43
44
private:
45
bool
valid
{
false
};
46
47
VoiceProvider provider;
48
49
QString lang;
50
QString gender;
51
QString name;
52
QString license;
53
QString directory;
54
QString author;
55
QString description;
56
57
public
:
58
AvailableVoice
() =
default
;
59
60
AvailableVoice
(
const
VoiceProvider &provider,
61
const
QString &
lang
,
62
const
QString &
gender
,
63
const
QString &
name
,
64
const
QString &
license
,
65
const
QString &
directory
,
66
const
QString &
author
,
67
const
QString &
description
);
68
69
AvailableVoice
(
const
AvailableVoice
& o);
70
71
~AvailableVoice
()
override
=
default
;
72
73
VoiceProvider
getProvider
()
const
74
{
75
return
provider;
76
}
77
78
QString
getLang
()
const
79
{
80
return
lang
;
81
}
82
QString
getGender
()
const
83
{
84
return
gender
;
85
}
86
QString
getName
()
const
87
{
88
return
name
;
89
}
90
QString
getLicense
()
const
91
{
92
return
license
;
93
}
94
QString
getDirectory
()
const
95
{
96
return
directory
;
97
}
98
QString
getAuthor
()
const
99
{
100
return
author
;
101
}
102
QString
getDescription
()
const
103
{
104
return
description
;
105
}
106
107
bool
isValid
()
const
108
{
109
return
valid
;
110
}
111
};
112
118
class
OSMSCOUT_CLIENT_QT_API
Voice
119
{
120
public
:
121
Voice
() =
default
;
122
explicit
Voice
(QDir dir);
123
~Voice
() =
default
;
124
125
Voice
(
const
Voice
&other) =
default
;
126
Voice
&
operator=
(
const
Voice
&other) =
default
;
127
128
Voice
(
Voice
&&other) =
default
;
129
Voice
&
operator=
(
Voice
&&other) =
default
;
130
131
QDir
getDir
()
const
132
{
133
return
dir;
134
}
135
136
QString
getLang
()
const
137
{
138
return
lang;
139
}
140
141
QString
getGender
()
const
142
{
143
return
gender;
144
}
145
146
QString
getName
()
const
147
{
148
return
name;
149
}
150
151
QString
getLicense
()
const
152
{
153
return
license;
154
}
155
156
QString
getAuthor
()
const
157
{
158
return
author;
159
}
160
161
QString
getDescription
()
const
162
{
163
return
description;
164
}
165
166
bool
isValid
()
const
167
{
168
return
valid;
169
}
170
171
bool
deleteVoice
();
172
173
static
QStringList
files
();
174
175
private
:
176
QDir dir;
177
bool
valid{
false
};
178
bool
metadata{
false
};
179
180
QString lang;
181
QString gender;
182
QString name;
183
QString license;
184
QString author;
185
QString description;
186
};
187
188
}
189
190
#endif
//OSMSCOUT_CLIENT_QT_VOICE_H
ClientQtImportExport.h
OSMSCOUT_CLIENT_QT_API
#define OSMSCOUT_CLIENT_QT_API
Definition
ClientQtImportExport.h:45
osmscout::AvailableVoice::~AvailableVoice
~AvailableVoice() override=default
osmscout::AvailableVoice::getGender
QString getGender() const
Definition
Voice.h:82
osmscout::AvailableVoice::name
CONSTANTQString name
Definition
Voice.h:38
osmscout::AvailableVoice::getLang
QString getLang() const
Definition
Voice.h:78
osmscout::AvailableVoice::getAuthor
QString getAuthor() const
Definition
Voice.h:98
osmscout::AvailableVoice::lang
CONSTANTQString lang
Definition
Voice.h:36
osmscout::AvailableVoice::valid
bool valid
Definition
Voice.h:34
osmscout::AvailableVoice::AvailableVoice
AvailableVoice()=default
osmscout::AvailableVoice::getDescription
QString getDescription() const
Definition
Voice.h:102
osmscout::AvailableVoice::AvailableVoice
AvailableVoice(const VoiceProvider &provider, const QString &lang, const QString &gender, const QString &name, const QString &license, const QString &directory, const QString &author, const QString &description)
osmscout::AvailableVoice::license
CONSTANTQString license
Definition
Voice.h:39
osmscout::AvailableVoice::isValid
bool isValid() const
Definition
Voice.h:107
osmscout::AvailableVoice::directory
CONSTANTQString directory
Definition
Voice.h:40
osmscout::AvailableVoice::getProvider
VoiceProvider getProvider() const
Definition
Voice.h:73
osmscout::AvailableVoice::author
CONSTANTQString author
Definition
Voice.h:41
osmscout::AvailableVoice::AvailableVoice
AvailableVoice(const AvailableVoice &o)
osmscout::AvailableVoice::getName
QString getName() const
Definition
Voice.h:86
osmscout::AvailableVoice::gender
CONSTANTQString gender
Definition
Voice.h:37
osmscout::AvailableVoice::getLicense
QString getLicense() const
Definition
Voice.h:90
osmscout::AvailableVoice::getDirectory
QString getDirectory() const
Definition
Voice.h:94
osmscout::AvailableVoice::description
CONSTANTQString description
Definition
Voice.h:42
osmscout::Voice::Voice
Voice(const Voice &other)=default
osmscout::Voice::~Voice
~Voice()=default
osmscout::Voice::isValid
bool isValid() const
Definition
Voice.h:166
osmscout::Voice::files
static QStringList files()
osmscout::Voice::Voice
Voice()=default
osmscout::Voice::operator=
Voice & operator=(const Voice &other)=default
osmscout::Voice::getName
QString getName() const
Definition
Voice.h:146
osmscout::Voice::Voice
Voice(Voice &&other)=default
osmscout::Voice::Voice
Voice(QDir dir)
osmscout::Voice::getGender
QString getGender() const
Definition
Voice.h:141
osmscout::Voice::getLicense
QString getLicense() const
Definition
Voice.h:151
osmscout::Voice::getAuthor
QString getAuthor() const
Definition
Voice.h:156
osmscout::Voice::getLang
QString getLang() const
Definition
Voice.h:136
osmscout::Voice::deleteVoice
bool deleteVoice()
osmscout::Voice::getDescription
QString getDescription() const
Definition
Voice.h:161
osmscout::Voice::operator=
Voice & operator=(Voice &&other)=default
osmscout::Voice::getDir
QDir getDir() const
Definition
Voice.h:131
osmscout
Definition
Area.h:39
Generated by
1.17.0