26 #include "Utils/typedefs.h"
28 enum class SettingKey : unsigned short
48 Lib_SplitterStateArtist,
49 Lib_SplitterStateTrack,
50 Lib_SplitterStateGenre,
51 Lib_SplitterStateDate,
55 Lib_DC_PlayImmediately,
57 Lib_DD_PlayIfStoppedAndEmpty,
69 Lib_CoverScaledPMCache,
73 Lib_UseViewClearButton,
75 Lib_SortIgnoreArtistArticle,
76 Lib_HeaderAutoResizeArtists,
77 Lib_HeaderAutoResizeAlbums,
78 Lib_HeaderAutoResizeTracks,
82 Dir_TagToFilenameExpression,
100 Player_NotifyNewVersion,
101 Player_SplitterState,
102 Player_SplitterControls,
108 PL_LastTrackBeforeStop,
111 PL_LoadSavedPlaylists,
112 PL_LoadTemporaryPlaylists,
116 PL_RememberTrackAfterStop,
124 Notification_Timeout,
129 AudioConvert_NumberThreads,
130 AudioConvert_PreferredConverter,
131 AudioConvert_QualityLameVBR,
132 AudioConvert_QualityLameCBR,
133 AudioConvert_QualityOgg,
134 Engine_CovertTargetPath,
138 Engine_CurTrackPos_s,
139 Engine_CrossFaderActive,
140 Engine_CrossFaderTime,
142 Engine_PreservePitch,
151 Engine_SR_SessionPath,
152 Engine_SR_SessionPathTemplate,
153 Engine_SR_AutoRecord,
168 Stream_SearchWindowSize,
176 Cover_SaveToSayonaraDir,
179 Icon_ForceInDarkTheme,
188 AlternativeCovers_Size,
212 enum class ViewType : quint8;
215 template<typename DataType, SettingKey keyIndex>
220 const static SettingKey key=keyIndex;
228 #define INST_ABSTR(ns, type, settingkey) \
230 using settingkey = SettingIdentifier<type, SettingKey:: settingkey>; \
233 #define INST(type, settingkey) INST_ABSTR(Set, type, settingkey)
234 #define INST_NO_DB(type, settingkey) INST_ABSTR(SetNoDB, type, settingkey)
241 INST(
int, LFM_ScrobbleTimeSec)
243 INST(QString, LFM_Username)
244 INST(QString, LFM_Password)
246 INST(
bool, LFM_Corrections)
247 INST(
bool, LFM_ShowErrors)
248 INST(QString, LFM_SessionKey)
254 INST(QString, Lib_Path)
255 INST(QByteArray, Lib_ColStateAlbums)
256 INST(QByteArray, Lib_ColStateArtists)
257 INST(QByteArray, Lib_ColStateTracks)
258 INST(
bool, Lib_LiveSearch)
260 INST(QString, Lib_CurPlugin)
261 INST(QByteArray, Lib_SplitterStateArtist)
262 INST(QByteArray, Lib_SplitterStateTrack)
263 INST(QByteArray, Lib_SplitterStateGenre)
264 INST(QByteArray, Lib_SplitterStateDate)
265 INST(
int, Lib_OldWidth)
266 INST(
bool, Lib_DC_DoNothing)
267 INST(
bool, Lib_DC_PlayIfStopped)
268 INST(
bool, Lib_DC_PlayImmediately)
269 INST(
bool, Lib_DD_DoNothing)
270 INST(
bool, Lib_DD_PlayIfStoppedAndEmpty)
271 INST(
int, Lib_FontSize)
272 INST(
bool, Lib_FontBold)
273 INST(
int, Lib_SearchMode)
274 INST(
bool, Lib_AutoUpdate)
275 INST(
bool, Lib_ShowAlbumArtists)
276 INST(
bool, Lib_ShowAlbumCovers)
277 INST(::Library::ViewType, Lib_ViewType)
278 INST(
int, Lib_CoverZoom)
279 INST(
int, Lib_CoverOrigPMCache)
280 INST(
int, Lib_CoverScaledPMCache)
281 INST(
bool, Lib_CoverShowUtils)
282 INST(
bool, Lib_CoverShowArtist)
283 INST(
bool, Lib_GenreTree)
285 INST(
int, Lib_LastIndex)
286 INST(
bool, Lib_UseViewClearButton)
287 INST(
bool, Lib_ShowFilterExtBar)
288 INST(
bool, Lib_SortIgnoreArtistArticle)
289 INST(
bool, Lib_HeaderAutoResizeArtists)
290 INST(
bool, Lib_HeaderAutoResizeAlbums)
291 INST(
bool, Lib_HeaderAutoResizeTracks)
293 INST(
bool, Dir_ShowTracks)
294 INST(QByteArray, Dir_SplitterDirFile)
295 INST(QByteArray, Dir_SplitterTracks)
296 INST(QString, Dir_TagToFilenameExpression)
298 INST(QString, Player_Version)
299 INST(QString, Player_Language)
300 INST(
int, Player_Style)
301 INST(
int, Player_ControlStyle)
302 INST(QString, Player_FontName)
303 INST(
int, Player_FontSize)
304 INST(
bool, Player_FadingCover)
305 INST(
bool, Player_Fullscreen)
306 INST(
bool, Player_Maximized)
307 INST(QByteArray, Player_Geometry)
308 INST(QString, Player_ShownPlugin)
309 INST(
bool, Player_OneInstance)
310 INST(
bool, Player_Min2Tray)
311 INST(
bool, Player_ShowTrayIcon)
312 INST(
bool, Player_StartInTray)
313 INST(
bool, Player_514Fix)
314 INST(
bool, Player_NotifyNewVersion)
315 INST(QByteArray, Player_SplitterState)
317 INST(QByteArray, Player_SplitterControls)
318 INST(QByteArray, Player_PrivId)
319 INST(QByteArray, Player_PublicId)
321 INST(QStringList, PL_Playlist)
322 INST(
bool, PL_LoadSavedPlaylists)
323 INST(
bool, PL_LoadTemporaryPlaylists)
324 INST(
bool, PL_LoadLastTrack)
325 INST(
bool, PL_RememberTime)
326 INST(
bool, PL_StartPlaying)
327 INST(
int, PL_LastTrack)
328 INST(
int, PL_LastTrackBeforeStop)
329 INST(
int, PL_LastPlaylist)
330 INST(QString, PL_EntryLook)
331 INST(
int, PL_FontSize)
332 INST(
bool, PL_ShowClearButton)
334 INST(
bool, PL_ShowNumbers)
335 INST(
bool, PL_ShowBottomBar)
336 INST(
bool, PL_RememberTrackAfterStop)
337 INST(
bool, PL_ShowCovers)
338 INST(
bool, PL_ShowRating)
340 INST(
bool, Notification_Show)
341 INST(
int, Notification_Timeout)
342 INST(QString, Notification_Name)
344 INST(
int, AudioConvert_NumberThreads)
345 INST(QString, AudioConvert_PreferredConverter)
346 INST(
int, AudioConvert_QualityLameVBR)
347 INST(
int, AudioConvert_QualityLameCBR)
348 INST(
int, AudioConvert_QualityOgg)
350 INST(QString, Engine_Name)
351 INST(
int, Engine_Vol)
352 INST(
bool, Engine_Mute)
353 INST(
int, Engine_CurTrackPos_s)
354 INST(QString, Engine_CovertTargetPath)
355 INST(
int, Engine_SpectrumBins)
356 INST(
bool, Engine_ShowSpectrum)
357 INST(
bool, Engine_ShowLevel)
358 INST(
bool, Engine_CrossFaderActive)
359 INST(
int, Engine_CrossFaderTime)
360 INST(
int, Engine_Pitch)
361 INST(
bool, Engine_SpeedActive)
362 INST(
float, Engine_Speed)
363 INST(
bool, Engine_PreservePitch)
364 INST(QString, Engine_Sink)
365 INST(QString, Engine_AlsaDevice)
366 INST(
int, Engine_BufferSizeMS)
368 INST(
bool, Engine_SR_Active)
369 INST(
bool, Engine_SR_Warning)
370 INST(QString, Engine_SR_Path)
371 INST(
bool, Engine_SR_SessionPath)
372 INST(QString, Engine_SR_SessionPathTemplate)
373 INST(
bool, Engine_SR_AutoRecord)
375 INST(
int, Spectrum_Style)
376 INST(
int, Level_Style)
377 INST(
bool, Broadcast_Active)
378 INST(
bool, Broadcast_Prompt)
379 INST(
int, Broadcast_Port)
381 INST(
bool, Remote_Active)
382 INST(
int, Remote_Port)
383 INST(
bool, Remote_Discoverable)
384 INST(
int, Remote_DiscoverPort)
386 INST(
bool, Stream_NewTab)
387 INST(
bool, Stream_ShowHistory)
388 INST(QSize, Stream_SearchWindowSize)
390 INST(
int, Lyrics_Zoom)
391 INST(QString, Lyrics_Server)
393 INST(QStringList, Cover_Server)
394 INST(
bool, Cover_FetchFromWWW)
395 INST(
bool, Cover_SaveToDB)
396 INST(
bool, Cover_StartSearch)
397 INST(
bool, Cover_SaveToLibrary)
398 INST(
bool, Cover_SaveToSayonaraDir)
399 INST(QString, Cover_TemplatePath)
400 INST(QString, Icon_Theme)
401 INST(
bool, Icon_ForceInDarkTheme)
403 INST(
bool, Proxy_Active)
404 INST(QString, Proxy_Username)
405 INST(QString, Proxy_Password)
406 INST(QString, Proxy_Hostname)
407 INST(
int, Proxy_Port)
408 INST(
bool, Proxy_SavePw)
410 INST(
int, Speed_LastTab)
412 INST(QSize, InfoDialog_Size)
413 INST(QSize, AlternativeCovers_Size)
415 INST(
int, Settings_Revision)
417 INST(
int, Logger_Level)
419 INST_NO_DB(
bool, MP3enc_found)
420 INST_NO_DB(
bool, Pitch_found)
421 INST_NO_DB(
bool, Player_Quit)
422 INST_NO_DB(
int, Player_MetaStyle)
424 #endif // SETTINGKEY_H