Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Utils
Language
Language.h
1
/* Language.h */
2
3
/* Copyright (C) 2011-2024 Michael Lugmair (Lucio Carreras)
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program 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
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef LANGUAGE_H
22
#define LANGUAGE_H
23
24
#include <QObject>
25
#include <QList>
26
#include <QMap>
27
#include <QLocale>
28
33
class
LanguageString :
34
public
QString
35
{
36
public
:
37
LanguageString(
const
QString& other);
38
LanguageString(
const
LanguageString& other) =
default
;
39
40
LanguageString& operator=(
const
QString& other);
41
LanguageString& operator=(
const
LanguageString& other) =
default
;
42
43
LanguageString& toFirstUpper();
44
45
LanguageString& space();
46
47
LanguageString& question();
48
49
LanguageString& triplePt();
50
};
51
52
class
Lang :
53
public
QObject
54
{
55
Q_OBJECT
56
57
public
:
58
enum
Term
59
{
60
About = 0,
61
Action,
62
Actions,
63
Activate,
64
Active,
65
Add,
66
AddArtist,
67
AddTab,
68
Album,
69
AlbumArtist,
70
AlbumArtists,
71
Albums,
72
All,
73
Append,
74
Application,
75
Apply,
76
Artist,
77
Artists,
78
Ascending,
79
Automatic,
80
Bitrate,
81
Bookmarks,
82
Broadcast,
83
By,
84
Cancel,
85
CannotFindLame,
86
CaseInsensitive,
87
Chapters,
88
Comment,
89
Continue,
90
Covers,
91
CoverProvider,
92
Clear,
93
ClearSelection,
94
Close,
95
CloseOthers,
96
CloseTab,
97
CoverView,
98
CreateDirectory,
99
Created,
100
CreateNewLibrary,
101
DarkMode,
102
Date,
103
Days,
104
DaysShort,
105
Default,
106
Delete,
107
Descending,
108
Directory,
109
Directories,
110
Disc,
111
Duration,
112
DurationShort,
113
DynamicPlayback,
114
Edit,
115
EmptyInput,
116
EnterName,
117
EnterNewName,
118
EnterUrl,
119
Entries,
120
Entry,
121
Error,
122
Fast,
123
File,
124
Filename,
125
Files,
126
Filesize,
127
Filetype,
128
Filter,
129
First,
130
Font,
131
Fonts,
132
Fulltext,
133
GaplessPlayback,
134
GB,
135
Genre,
136
Genres,
137
Hide,
138
Hours,
139
HoursShort,
140
IgnoreSpecialChars,
141
IgnoreAccents,
142
ImportDir,
143
ImportFiles,
144
Inactive,
145
Info,
146
InvalidChars,
147
KB,
148
Key_Find,
149
Key_Delete,
150
Key_Escape,
151
Key_Control,
152
Key_Alt,
153
Key_Shift,
154
Key_Backspace,
155
Key_Tab,
156
Library,
157
LibraryPath,
158
LibraryView,
159
Listen,
160
LiveSearch,
161
Loading,
162
LoadingArg,
163
LockPlaylist,
164
Logger,
165
LogLevel,
166
Lyrics,
167
LyricsProvider,
168
MB,
169
Menu,
170
Minimize,
171
Minutes,
172
MinutesShort,
173
Missing,
174
Modified,
175
Months,
176
MoveDown,
177
MoveUp,
178
MuteOn,
179
MuteOff,
180
Name,
181
New,
182
NextPage,
183
NextTrack,
184
No,
185
NoAlbums,
186
NumTracks,
187
OK,
188
On,
189
Open,
190
OpenDir,
191
OpenFile,
192
Or,
193
Overwrite,
194
Pause,
195
Play,
196
PlayingTime,
197
PlayInNewTab,
198
Playlist,
199
Playlists,
200
PlayNext,
201
PlayPause,
202
Plugin,
203
Podcasts,
204
Preferences,
205
PreviousPage,
206
PreviousTrack,
207
Provider,
208
PurchaseUrl,
209
Quit,
210
Radio,
211
RadioStation,
212
Rating,
213
Really,
214
Refresh,
215
ReloadLibrary,
216
Remove,
217
Rename,
218
Repeat1,
219
RepeatAll,
220
Replace,
221
Reset,
222
Retry,
223
ReverseOrder,
224
Sampler,
225
Save,
226
SaveAs,
227
SaveToFile,
228
ScanForFiles,
229
SearchNoun,
230
SearchVerb,
231
SearchNext,
232
SearchPrev,
233
Second,
234
Seconds,
235
SecondsShort,
236
SeekForward,
237
SeekBackward,
238
Show,
239
ShowAlbumArtists,
240
ShowCovers,
241
ShowLibrary,
242
Shuffle,
243
ShufflePlaylist,
244
Shutdown,
245
SimilarArtists,
246
SmartPlaylists,
247
SortBy,
248
Stop,
249
Streams,
250
StreamUrl,
251
Success,
252
Th,
253
Third,
254
Title,
255
Track,
256
TrackOn,
257
TrackNo,
258
Tracks,
259
Tree,
260
Undo,
261
UnknownAlbum,
262
UnknownArtist,
263
UnknownTitle,
264
UnknownGenre,
265
UnknownYear,
266
UnknownPlaceholder,
267
UnlockPlaylist,
268
Various,
269
VariousAlbums,
270
VariousArtists,
271
VariousTracks,
272
Version,
273
VolumeDown,
274
VolumeUp,
275
Warning,
276
Weeks,
277
Year,
278
Years,
279
Yes,
280
Zoom,
281
NUMBER_OF_LANGUAGE_KEYS
282
};
283
284
enum
TermNr
285
{
286
NrDirectories = 0,
287
NrFiles,
288
NrPlaylists,
289
NrTracks,
290
NrTracksFound,
291
NUMBER_OF_LANGUAGE_PARAM_KEYS
292
};
293
294
public
:
295
Lang();
296
~Lang();
297
298
static
LanguageString
get(Lang::Term term,
bool
* ok =
nullptr
);
299
300
static
LanguageString
getWithNumber(Lang::TermNr term,
int
param,
bool
* ok =
nullptr
);
301
};
302
303
#endif
// LANGUAGE_H
LanguageString
The LanguageString class.
Definition
Language.h:35
Generated on
for Sayonara Player by
1.17.0