Sayonara Player
Loading...
Searching...
No Matches
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
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
52class 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,
75 Apply,
76 Artist,
77 Artists,
78 Ascending,
79 Automatic,
80 Bitrate,
82 Broadcast,
83 By,
84 Cancel,
85 CannotFindLame,
86 CaseInsensitive,
87 Comment,
88 Continue,
89 Covers,
90 Clear,
91 ClearSelection,
92 Close,
93 CloseOthers,
94 CloseTab,
95 CreateDirectory,
96 Created,
97 CreateNewLibrary,
98 DarkMode,
99 Date,
100 Days,
101 DaysShort,
102 Default,
103 Delete,
104 Descending,
105 Directory,
106 Directories,
107 Disc,
108 Duration,
109 DurationShort,
110 DynamicPlayback,
111 Edit,
112 EmptyInput,
113 EnterName,
114 EnterNewName,
115 EnterUrl,
116 Entries,
117 Entry,
118 Error,
119 Fast,
120 File,
121 Filename,
122 Files,
123 Filesize,
124 Filetype,
125 Filter,
126 First,
127 Font,
128 Fonts,
129 Fulltext,
130 GaplessPlayback,
131 GB,
132 Genre,
133 Genres,
134 Hide,
135 Hours,
136 HoursShort,
137 IgnoreSpecialChars,
138 IgnoreAccents,
139 ImportDir,
140 ImportFiles,
141 Inactive,
142 Info,
143 InvalidChars,
144 KB,
145 Key_Find,
146 Key_Delete,
147 Key_Escape,
148 Key_Control,
149 Key_Alt,
150 Key_Shift,
151 Key_Backspace,
152 Key_Tab,
153 Library,
154 LibraryPath,
155 LibraryView,
156 Listen,
157 LiveSearch,
158 Loading,
159 LoadingArg,
160 LockPlaylist,
161 Logger,
162 LogLevel,
163 Lyrics,
164 MB,
165 Menu,
166 Minimize,
167 Minutes,
168 MinutesShort,
169 Missing,
170 Modified,
171 Months,
172 MoveDown,
173 MoveUp,
174 MuteOn,
175 MuteOff,
176 Name,
177 New,
178 NextPage,
179 NextTrack,
180 No,
181 NoAlbums,
182 NumTracks,
183 OK,
184 On,
185 Open,
186 OpenDir,
187 OpenFile,
188 Or,
189 Overwrite,
190 Pause,
191 Play,
192 PlayingTime,
193 PlayInNewTab,
194 Playlist,
195 Playlists,
196 PlayNext,
197 PlayPause,
198 Plugin,
199 Podcasts,
200 Preferences,
201 PreviousPage,
202 PreviousTrack,
203 PurchaseUrl,
204 Quit,
205 Radio,
207 Rating,
208 Really,
209 Refresh,
210 ReloadLibrary,
211 Remove,
212 Rename,
213 Repeat1,
214 RepeatAll,
215 Replace,
216 Reset,
217 Retry,
218 ReverseOrder,
219 Sampler,
220 Save,
221 SaveAs,
222 SaveToFile,
223 ScanForFiles,
224 SearchNoun,
225 SearchVerb,
226 SearchNext,
227 SearchPrev,
228 Second,
229 Seconds,
230 SecondsShort,
231 SeekForward,
232 SeekBackward,
233 Show,
234 ShowAlbumArtists,
235 ShowCovers,
236 ShowLibrary,
237 Shuffle,
238 ShufflePlaylist,
239 Shutdown,
240 SimilarArtists,
241 SmartPlaylists,
242 SortBy,
243 Stop,
244 Streams,
245 StreamUrl,
246 Success,
247 Th,
248 Third,
249 Title,
250 Track,
251 TrackOn,
252 TrackNo,
253 Tracks,
254 Tree,
255 Undo,
256 UnknownAlbum,
257 UnknownArtist,
258 UnknownTitle,
259 UnknownGenre,
260 UnknownYear,
261 UnknownPlaceholder,
262 UnlockPlaylist,
263 Various,
264 VariousAlbums,
265 VariousArtists,
266 VariousTracks,
267 Version,
268 VolumeDown,
269 VolumeUp,
270 Warning,
271 Weeks,
272 Year,
273 Years,
274 Yes,
275 Zoom,
276 NUMBER_OF_LANGUAGE_KEYS
277 };
278
279 enum TermNr
280 {
281 NrDirectories = 0,
282 NrFiles,
283 NrPlaylists,
284 NrTracks,
285 NrTracksFound,
286 NUMBER_OF_LANGUAGE_PARAM_KEYS
287 };
288
289 public:
290 Lang();
291 ~Lang();
292
293 static LanguageString get(Lang::Term term, bool* ok = nullptr);
294
295 static LanguageString getWithNumber(Lang::TermNr term, int param, bool* ok = nullptr);
296};
297
298#endif // LANGUAGE_H
Definition Album.h:37
Definition Application.h:32
Definition Artist.h:34
Definition Bookmarks.h:35
Definition Genre.h:31
Definition Language.h:54
The LanguageString class.
Definition Language.h:35
The Logger class.
Definition Logger.h:62
Definition Shutdown.h:33
Definition RadioStation.h:36