Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
globalpreferencesdata.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <array>
4 #include <cstdint>
5 #include <string>
6 #include <utility>
7 
8 #include "cereal/cereal.hpp"
9 #include "cereal/types/array.hpp"
10 #include "cereal/types/utility.hpp"
11 
12 namespace geometrize
13 {
14 
15 namespace serialization
16 {
17 
22 {
23 public:
24  template<class Archive>
25  void archive(Archive& ar,
26  bool& shouldShowWelcomeScreenOnLaunch,
27 
28  bool& shouldGeometrizeAppLogoOnLaunch,
29  bool& shouldPopulateRecentItemsOnLaunch,
30  bool& shouldPopulateTemplatesOnLaunch,
31 
32  std::array<std::int32_t, 4>& customImageTaskBackgroundOverrideColor,
33  bool& shouldUseCustomImageTaskBackgroundOverrideColor,
34 
35  std::array<std::int32_t, 4>& targetImageAlphaReplacementColor,
36  bool& shouldUseImageAlphaReplacementColor,
37 
38  bool& shouldAutoLoadImageTaskSettings,
39  bool& shouldAutoSaveImageTaskSettings,
40 
41  bool& shouldShowLaunchConsoleByDefault,
42  bool& shouldShowImageTaskVectorViewByDefault,
43  bool& shouldShowImageTaskConsoleByDefault,
44  bool& shouldShowImageTaskScriptEditorByDefault,
45  bool& shouldShowImageTaskPixmapViewByDefault,
46 
47  bool& imageTaskImageResizeEnabled,
48  std::pair<std::uint32_t, std::uint32_t>& imageTaskImageResizeThreshold,
49  std::uint32_t& imageTaskMaxThreads,
50 
51  std::string& isoLanguageCode,
52  std::string& isoScriptCode,
53  std::string& isoCountryCode)
54  {
55  ar(cereal::make_nvp(shouldShowWelcomeScreenOnLaunchKey, shouldShowWelcomeScreenOnLaunch));
56 
57  ar(cereal::make_nvp(shouldGeometrizeAppLogoOnLaunchKey, shouldGeometrizeAppLogoOnLaunch));
58  ar(cereal::make_nvp(shouldPopulateRecentItemsOnLaunchKey, shouldPopulateRecentItemsOnLaunch));
59  ar(cereal::make_nvp(shouldPopulateTemplatesOnLaunchKey, shouldPopulateTemplatesOnLaunch));
60 
61  ar(cereal::make_nvp(customImageTaskBackgroundOverrideColorKey, customImageTaskBackgroundOverrideColor));
62  ar(cereal::make_nvp(shouldUseCustomImageTaskBackgroundOverrideColorKey, shouldUseCustomImageTaskBackgroundOverrideColor));
63 
64  ar(cereal::make_nvp(targetImageAlphaReplacementColorKey, targetImageAlphaReplacementColor));
65  ar(cereal::make_nvp(shouldUseImageAlphaReplacementColorKey, shouldUseImageAlphaReplacementColor));
66 
67  ar(cereal::make_nvp(shouldAutoLoadImageTaskSettingsKey, shouldAutoLoadImageTaskSettings));
68  ar(cereal::make_nvp(shouldAutoSaveImageTaskSettingsKey, shouldAutoSaveImageTaskSettings));
69 
70  ar(cereal::make_nvp(shouldShowLaunchConsoleByDefaultKey, shouldShowLaunchConsoleByDefault));
71  ar(cereal::make_nvp(shouldShowImageTaskVectorViewByDefaultKey, shouldShowImageTaskVectorViewByDefault));
72  ar(cereal::make_nvp(shouldShowImageTaskConsoleByDefaultKey, shouldShowImageTaskConsoleByDefault));
73  ar(cereal::make_nvp(shouldShowImageTaskScriptEditorByDefaultKey, shouldShowImageTaskScriptEditorByDefault));
74  ar(cereal::make_nvp(shouldShowImageTaskPixmapViewByDefaultKey, shouldShowImageTaskPixmapViewByDefault));
75 
76  ar(cereal::make_nvp(imageTaskImageResizeEnabledKey, imageTaskImageResizeEnabled));
77  ar(cereal::make_nvp(imageTaskImageResizeThresholdKey, imageTaskImageResizeThreshold));
78  ar(cereal::make_nvp(imageTaskMaxThreadsKey, imageTaskMaxThreads));
79 
80  ar(cereal::make_nvp(isoLanguageCodeKey, isoLanguageCode));
81  ar(cereal::make_nvp(isoScriptCodeKey, isoScriptCode));
82  ar(cereal::make_nvp(isoCountryCodeKey, isoCountryCode));
83  }
84 
85 private:
86  const std::string shouldShowWelcomeScreenOnLaunchKey{"shouldShowWelcomeScreenOnLaunch"};
87 
88  const std::string shouldGeometrizeAppLogoOnLaunchKey{"shouldGeometrizeAppLogoOnLaunch"};
89  const std::string shouldPopulateRecentItemsOnLaunchKey{"shouldPopulateRecentItemsOnLaunch"};
90  const std::string shouldPopulateTemplatesOnLaunchKey{"shouldPopulateTemplatesOnLaunch"};
91 
92  const std::string customImageTaskBackgroundOverrideColorKey{"customImageTaskBackgroundOverrideColor"};
93  const std::string shouldUseCustomImageTaskBackgroundOverrideColorKey{"shouldUseCustomImageTaskBackgroundOverrideColor"};
94 
95  const std::string targetImageAlphaReplacementColorKey{"targetImageAlphaReplacementColor"};
96  const std::string shouldUseImageAlphaReplacementColorKey{"shouldUseImageAlphaReplacementColor"};
97 
98  const std::string shouldAutoLoadImageTaskSettingsKey{"shouldAutoLoadImageTaskSettingsKey"};
99  const std::string shouldAutoSaveImageTaskSettingsKey{"shouldAutoSaveImageTaskSettingsKey"};
100 
101  const std::string shouldShowLaunchConsoleByDefaultKey{"shouldShowLaunchConsoleByDefault"};
102  const std::string shouldShowImageTaskVectorViewByDefaultKey{"shouldShowImageTaskVectorViewByDefault"};
103  const std::string shouldShowImageTaskConsoleByDefaultKey{"shouldShowImageTaskConsoleByDefault"};
104  const std::string shouldShowImageTaskScriptEditorByDefaultKey{"shouldShowImageTaskScriptEditorByDefault"};
105  const std::string shouldShowImageTaskPixmapViewByDefaultKey{"shouldShowImageTaskPixmapViewByDefault"};
106 
107  const std::string imageTaskImageResizeEnabledKey{"imageTaskImageResizeEnabled"};
108  const std::string imageTaskImageResizeThresholdKey{"imageTaskImageResizeThreshold"};
109  const std::string imageTaskMaxThreadsKey{"imageTaskMaxThreadsKey"};
110 
111  const std::string isoLanguageCodeKey{"isoLanguageCode"};
112  const std::string isoScriptCodeKey{"isoScriptCode"};
113  const std::string isoCountryCodeKey{"isoCountryCode"};
114 };
115 
116 }
117 
118 }
const std::string customImageTaskBackgroundOverrideColorKey
Definition: globalpreferencesdata.h:92
const std::string shouldShowLaunchConsoleByDefaultKey
Definition: globalpreferencesdata.h:101
const std::string shouldAutoSaveImageTaskSettingsKey
Definition: globalpreferencesdata.h:99
const std::string targetImageAlphaReplacementColorKey
Definition: globalpreferencesdata.h:95
const std::string shouldShowImageTaskVectorViewByDefaultKey
Definition: globalpreferencesdata.h:102
const std::string imageTaskMaxThreadsKey
Definition: globalpreferencesdata.h:109
const std::string shouldShowImageTaskPixmapViewByDefaultKey
Definition: globalpreferencesdata.h:105
const std::string shouldUseCustomImageTaskBackgroundOverrideColorKey
Definition: globalpreferencesdata.h:93
The GlobalPreferencesData struct represents the data for the global application preferences.
Definition: globalpreferencesdata.h:21
const std::string imageTaskImageResizeEnabledKey
Definition: globalpreferencesdata.h:107
const std::string shouldShowImageTaskConsoleByDefaultKey
Definition: globalpreferencesdata.h:103
const std::string isoScriptCodeKey
Definition: globalpreferencesdata.h:112
const std::string imageTaskImageResizeThresholdKey
Definition: globalpreferencesdata.h:108
void archive(Archive &ar, bool &shouldShowWelcomeScreenOnLaunch, bool &shouldGeometrizeAppLogoOnLaunch, bool &shouldPopulateRecentItemsOnLaunch, bool &shouldPopulateTemplatesOnLaunch, std::array< std::int32_t, 4 > &customImageTaskBackgroundOverrideColor, bool &shouldUseCustomImageTaskBackgroundOverrideColor, std::array< std::int32_t, 4 > &targetImageAlphaReplacementColor, bool &shouldUseImageAlphaReplacementColor, bool &shouldAutoLoadImageTaskSettings, bool &shouldAutoSaveImageTaskSettings, bool &shouldShowLaunchConsoleByDefault, bool &shouldShowImageTaskVectorViewByDefault, bool &shouldShowImageTaskConsoleByDefault, bool &shouldShowImageTaskScriptEditorByDefault, bool &shouldShowImageTaskPixmapViewByDefault, bool &imageTaskImageResizeEnabled, std::pair< std::uint32_t, std::uint32_t > &imageTaskImageResizeThreshold, std::uint32_t &imageTaskMaxThreads, std::string &isoLanguageCode, std::string &isoScriptCode, std::string &isoCountryCode)
Definition: globalpreferencesdata.h:25
const std::string shouldPopulateRecentItemsOnLaunchKey
Definition: globalpreferencesdata.h:89
const std::string shouldShowWelcomeScreenOnLaunchKey
Definition: globalpreferencesdata.h:86
const std::string isoCountryCodeKey
Definition: globalpreferencesdata.h:113
const std::string isoLanguageCodeKey
Definition: globalpreferencesdata.h:111
const std::string shouldGeometrizeAppLogoOnLaunchKey
Definition: globalpreferencesdata.h:88
const std::string shouldShowImageTaskScriptEditorByDefaultKey
Definition: globalpreferencesdata.h:104
const std::string shouldUseImageAlphaReplacementColorKey
Definition: globalpreferencesdata.h:96
const std::string shouldAutoLoadImageTaskSettingsKey
Definition: globalpreferencesdata.h:98
const std::string shouldPopulateTemplatesOnLaunchKey
Definition: globalpreferencesdata.h:90