/ desktop / config / ui_prefs.hpp
ui_prefs.hpp
 1  #pragma once
 2  #include <optional>
 3  #include <string>
 4  #include <string_view>
 5  #include <vector>
 6  
 7  #include "includes/toml.hpp"
 8  
 9  class KotoUiPreferences {
10    public:
11      KotoUiPreferences();
12      KotoUiPreferences(std::optional<toml::value> v);
13      ~KotoUiPreferences();
14  
15      bool  getAlbumInfoShowDescription();
16      bool  getAlbumInfoShowGenre();
17      bool  getAlbumInfoShowNarrator();
18      bool  getAlbumInfoShowYear();
19      float getLastUsedVolume();
20  
21      toml::ordered_value serialize();
22  
23      void setAlbumInfoShowDescription(bool show);
24      void setAlbumInfoShowGenre(bool show);
25      void setAlbumInfoShowNarrator(bool show);
26      void setAlbumInfoShowYear(bool show);
27      void setLastUsedVolume(float volume);
28  
29    private:
30      bool  i_albumInfoShowDescription;
31      bool  i_albumInfoShowGenre;
32      bool  i_albumInfoShowNarrator;
33      bool  i_albumInfoShowYear;
34      float i_lastUsedVolume;
35  };