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