Geometrize  1.0
An application for geometrizing images into geometric primitives
globalpreferences.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <array>
4 #include <cstdint>
5 #include <memory>
6 #include <string>
7 #include <utility>
8 
9 #include <QObject>
10 
11 namespace geometrize
12 {
13 
14 namespace preferences
15 {
16 class GlobalPreferences;
17 }
18 
19 }
20 
21 namespace geometrize
22 {
23 
24 namespace preferences
25 {
26 
32 
37 std::string getGlobalPreferencesConfigPath();
38 
43 class GlobalPreferences : public QObject
44 {
45  Q_OBJECT
46 public:
51 
57  bool load(const std::string& filePath);
58 
64  bool save(const std::string& filePath);
65 
70  unsigned int getApplicationLaunchCount() const;
71 
76 
82 
87  void setShouldShowWelcomeScreenOnLaunch(bool show);
88 
94 
99  void setShouldGeometrizeAppLogoOnLaunch(bool geometrizeLogo);
100 
106 
111  void setShouldPopulateRecentItemsOnLaunch(bool populateRecents);
112 
117  bool shouldPopulateTemplatesOnLaunch() const;
118 
123  void setShouldPopulateTemplatesOnLaunch(bool populateTemplates);
124 
129  std::array<std::int32_t, 4> getCustomImageTaskBackgroundOverrideColor() const;
130 
138  void setCustomImageTaskBackgroundOverrideColor(std::int32_t r, std::int32_t g, std::int32_t b, std::int32_t a);
139 
145 
151 
156  std::array<std::int32_t, 4> getTargetImageAlphaReplacementColor() const;
157 
165  void setTargetImageAlphaReplacementColor(std::int32_t r, std::int32_t g, std::int32_t b, std::int32_t a);
166 
172 
178 
183  bool shouldAutoLoadImageTaskSettings() const;
184 
189  void setShouldAutoLoadImageTaskSettings(bool loadSettings);
190 
195  bool shouldAutoSaveImageTaskSettings() const;
196 
201  void setShouldAutoSaveImageTaskSettings(bool saveSettings);
202 
208 
213  void setShouldShowLaunchConsoleByDefault(bool showConsole);
214 
220 
225  void setShouldShowImageTaskVectorViewByDefault(bool showVectorView);
226 
232 
237  void setShouldShowImageTaskConsoleByDefault(bool showConsole);
238 
244 
249  void setShouldShowImageTaskScriptEditorByDefault(bool showScriptEditor);
250 
256 
261  void setShouldShowImageTaskPixmapViewByDefault(bool showPixmapView);
262 
267  bool isImageTaskImageResizeEnabled() const;
268 
273  void setImageTaskImageResizeEnabled(bool enabled);
274 
279  std::pair<std::uint32_t, std::uint32_t> getImageTaskResizeThreshold() const;
280 
286  void setImageTaskResizeThreshold(std::uint32_t width, std::uint32_t height);
287 
292  std::uint32_t getImageTaskMaxThreads() const;
293 
298  void setImageTaskMaxThreads(std::uint32_t maxThreads);
299 
304  std::string getLanguageIsoCode() const;
305 
310  void setLanguageIsoCode(const std::string& languageIsoCode);
311 
316  std::string getScriptIsoCode() const;
317 
322  void setScriptIsoCode(const std::string& scriptIsoCode);
323 
328  std::string getCountryIsoCode() const;
329 
334  void setCountryIsoCode(const std::string& countryIsoCode);
335 
343  std::string getLocaleName() const;
344 
352  void setLocaleName(const std::string& localeName);
353 
354 private:
355  class GlobalPreferencesImpl;
356  std::unique_ptr<GlobalPreferencesImpl> d;
357 };
358 
359 }
360 
361 }
geometrize::preferences::GlobalPreferences::load
bool load(const std::string &filePath)
load Loads the global preferences from a file.
Definition: globalpreferences.cpp:448
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_scriptIsoCode
std::string m_scriptIsoCode
Definition: globalpreferences.cpp:425
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldShowImageTaskConsoleByDefault
bool shouldShowImageTaskConsoleByDefault() const
Definition: globalpreferences.cpp:219
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getLanguageIsoCode
std::string getLanguageIsoCode() const
Definition: globalpreferences.cpp:280
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getCustomImageTaskBackgroundOverrideColor
std::array< std::int32_t, 4 > getCustomImageTaskBackgroundOverrideColor() const
Definition: globalpreferences.cpp:139
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldPopulateTemplatesOnLaunch
bool shouldPopulateTemplatesOnLaunch() const
Definition: globalpreferences.cpp:129
geometrize::preferences::GlobalPreferences::setShouldShowWelcomeScreenOnLaunch
void setShouldShowWelcomeScreenOnLaunch(bool show)
setShouldShowWelcomeScreenOnLaunch Sets the preference for whether the welcome screen should be displ...
Definition: globalpreferences.cpp:463
geometrize::preferences::GlobalPreferences::getImageTaskMaxThreads
std::uint32_t getImageTaskMaxThreads() const
getImageTaskMaxThreads Gets the maximum number of threads the image task should use.
Definition: globalpreferences.cpp:628
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setImageTaskResizeThreshold
void setImageTaskResizeThreshold(const std::uint32_t width, const std::uint32_t height)
Definition: globalpreferences.cpp:249
geometrize::preferences::GlobalPreferences::setShouldShowImageTaskConsoleByDefault
void setShouldShowImageTaskConsoleByDefault(bool showConsole)
setShouldShowImageTaskConsoleByDefault Sets the preference for whether to show the console on the ima...
Definition: globalpreferences.cpp:583
geometrize::preferences::GlobalPreferences::setShouldReplaceTargetImageAlphaWithCustomColor
void setShouldReplaceTargetImageAlphaWithCustomColor(bool useColor)
setShouldReplaceTargetImageAlphaWithCustomColor Sets the preference for whether to replace the alpha ...
Definition: globalpreferences.cpp:553
geometrize::preferences::GlobalPreferences::setShouldShowImageTaskPixmapViewByDefault
void setShouldShowImageTaskPixmapViewByDefault(bool showPixmapView)
setShouldShowImageTaskPixmapViewByDefault Sets the preference for whether to show the image task pixm...
Definition: globalpreferences.cpp:603
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::save
bool save(const std::string &filePath)
Definition: globalpreferences.cpp:67
geometrize::preferences::GlobalPreferences::GlobalPreferences
GlobalPreferences(const GlobalPreferences &)=delete
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldUseCustomImageTaskBackgroundOverrideColor
void setShouldUseCustomImageTaskBackgroundOverrideColor(const bool useColor)
Definition: globalpreferences.cpp:154
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getApplicationLaunchCount
unsigned int getApplicationLaunchCount() const
Definition: globalpreferences.cpp:89
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldShowImageTaskPixmapViewByDefault
bool m_shouldShowImageTaskPixmapViewByDefault
Definition: globalpreferences.cpp:418
geometrize::preferences::GlobalPreferences::getCountryIsoCode
std::string getCountryIsoCode() const
getCountryIsoCode Gets the ISO-3166 country code preference for the application.
Definition: globalpreferences.cpp:658
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldShowLaunchConsoleByDefault
bool shouldShowLaunchConsoleByDefault() const
Definition: globalpreferences.cpp:199
geometrize::preferences::GlobalPreferences::shouldAutoLoadImageTaskSettings
bool shouldAutoLoadImageTaskSettings() const
shouldAutoLoadImageTaskSettings Gets the preference for whether to automatically load any previously ...
Definition: globalpreferences.cpp:518
geometrize::preferences::GlobalPreferences::~GlobalPreferences
~GlobalPreferences()
Definition: globalpreferences.cpp:434
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldShowImageTaskConsoleByDefault
bool m_shouldShowImageTaskConsoleByDefault
Definition: globalpreferences.cpp:416
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_imageTaskResizeThreshold
std::pair< std::uint32_t, std::uint32_t > m_imageTaskResizeThreshold
Definition: globalpreferences.cpp:421
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::load
bool load(const std::string &filePath)
Definition: globalpreferences.cpp:55
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_countryIsoCode
std::string m_countryIsoCode
Definition: globalpreferences.cpp:426
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldUseCustomImageTaskBackgroundOverrideColor
bool m_shouldUseCustomImageTaskBackgroundOverrideColor
Definition: globalpreferences.cpp:406
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setLocaleName
void setLocaleName(const std::string &localeName)
Definition: globalpreferences.cpp:322
geometrize::preferences::GlobalPreferences::setCustomImageTaskBackgroundOverrideColor
void setCustomImageTaskBackgroundOverrideColor(std::int32_t r, std::int32_t g, std::int32_t b, std::int32_t a)
setUseCustomImageTaskBackgroundOverrideColor Sets the preference for the custom image task background...
Definition: globalpreferences.cpp:503
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setImageTaskImageResizeEnabled
void setImageTaskImageResizeEnabled(const bool enabled)
Definition: globalpreferences.cpp:265
geometrize::preferences::GlobalPreferences::setShouldGeometrizeAppLogoOnLaunch
void setShouldGeometrizeAppLogoOnLaunch(bool geometrizeLogo)
setShouldGeometrizeAppLogoOnLaunch Sets the preference for whether to geometrize the app logo on the ...
Definition: globalpreferences.cpp:473
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldAutoSaveImageTaskSettings
bool shouldAutoSaveImageTaskSettings() const
Definition: globalpreferences.cpp:189
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getImageTaskMaxThreads
std::uint32_t getImageTaskMaxThreads() const
Definition: globalpreferences.cpp:270
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setScriptIsoCode
void setScriptIsoCode(const std::string &scriptIsoCode)
Definition: globalpreferences.cpp:295
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_languageIsoCode
std::string m_languageIsoCode
Definition: globalpreferences.cpp:424
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_imageTaskMaxThreads
std::uint32_t m_imageTaskMaxThreads
Definition: globalpreferences.cpp:422
geometrize::preferences::GlobalPreferences::shouldShowLaunchConsoleByDefault
bool shouldShowLaunchConsoleByDefault() const
shouldShowLaunchConsoleByDefault Gets the preference for whether to show the console on the launch wi...
Definition: globalpreferences.cpp:558
geometrize::preferences::GlobalPreferences::operator=
GlobalPreferences & operator=(const GlobalPreferences &)=delete
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getCountryIsoCode
std::string getCountryIsoCode() const
Definition: globalpreferences.cpp:300
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldAutoLoadImageTaskSettings
bool m_shouldAutoLoadImageTaskSettings
Definition: globalpreferences.cpp:411
geometrize::preferences::GlobalPreferences::setLocaleName
void setLocaleName(const std::string &localeName)
setLocaleName Sets the locale with the specified name, which must have the format "language[_script][...
Definition: globalpreferences.cpp:673
geometrize::preferences::GlobalPreferences::setImageTaskResizeThreshold
void setImageTaskResizeThreshold(std::uint32_t width, std::uint32_t height)
setImageTaskResizeThreshold Sets the maximum dimensions of an image that can be used in an image task...
Definition: globalpreferences.cpp:623
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::performArchival
void performArchival(T &archive)
Definition: globalpreferences.cpp:362
geometrize::preferences::GlobalPreferences::isImageTaskImageResizeEnabled
bool isImageTaskImageResizeEnabled() const
isImageTaskImageResizeEnabled Gets the preference for whether image tasks should resize images that a...
Definition: globalpreferences.cpp:608
geometrize::preferences::GlobalPreferences::setLanguageIsoCode
void setLanguageIsoCode(const std::string &languageIsoCode)
setLanguageIsoCode Sets the ISO 639-1 language preference for the application.
Definition: globalpreferences.cpp:643
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl
Definition: globalpreferences.cpp:39
geometrize::preferences::GlobalPreferences::setImageTaskMaxThreads
void setImageTaskMaxThreads(std::uint32_t maxThreads)
setImageTaskMaxThreads Sets the maximum number of threads the image task should use.
Definition: globalpreferences.cpp:633
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getLocaleName
std::string getLocaleName() const
Definition: globalpreferences.cpp:310
geometrize::preferences::GlobalPreferences::getScriptIsoCode
std::string getScriptIsoCode() const
getScriptIsoCode Gets the ISO-15924 script code preference for the application.
Definition: globalpreferences.cpp:648
geometrize::serialization::GlobalPreferencesData
The GlobalPreferencesData struct represents the data for the global application preferences.
Definition: globalpreferencesdata.h:22
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setTargetImageAlphaReplacementColor
void setTargetImageAlphaReplacementColor(const std::int32_t r, const std::int32_t g, const std::int32_t b, const std::int32_t a)
Definition: globalpreferences.cpp:164
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldShowLaunchConsoleByDefault
void setShouldShowLaunchConsoleByDefault(const bool showConsole)
Definition: globalpreferences.cpp:204
globalpreferencesdata.h
geometrize::preferences::GlobalPreferences::setShouldShowImageTaskVectorViewByDefault
void setShouldShowImageTaskVectorViewByDefault(bool showVectorView)
setShouldShowImageTaskVectorViewByDefault Sets the preference for whether to show the image task vect...
Definition: globalpreferences.cpp:573
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldAutoLoadImageTaskSettings
bool shouldAutoLoadImageTaskSettings() const
Definition: globalpreferences.cpp:179
geometrize::preferences::GlobalPreferences::getImageTaskResizeThreshold
std::pair< std::uint32_t, std::uint32_t > getImageTaskResizeThreshold() const
getImageTaskResizeThreshold Gets the maximum dimensions of an image that can be used in an image task...
Definition: globalpreferences.cpp:618
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldGeometrizeAppLogoOnLaunch
bool shouldGeometrizeAppLogoOnLaunch() const
Definition: globalpreferences.cpp:109
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldAutoSaveImageTaskSettings
bool m_shouldAutoSaveImageTaskSettings
Definition: globalpreferences.cpp:412
geometrize::preferences::GlobalPreferences::shouldPopulateTemplatesOnLaunch
bool shouldPopulateTemplatesOnLaunch() const
shouldPopulateTemplatesOnLaunch Gets the preference for whether to populate the task templates on the...
Definition: globalpreferences.cpp:488
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldPopulateRecentItemsOnLaunch
bool m_shouldPopulateRecentItemsOnLaunch
Definition: globalpreferences.cpp:402
geometrize::preferences::GlobalPreferences::incrementApplicationLaunchCount
void incrementApplicationLaunchCount()
incrementApplicationLaunchCount Increments the count for the number of times the application has been...
Definition: globalpreferences.cpp:443
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldPopulateRecentItemsOnLaunch
void setShouldPopulateRecentItemsOnLaunch(const bool populateRecents)
Definition: globalpreferences.cpp:124
geometrize::preferences::GlobalPreferences::getLocaleName
std::string getLocaleName() const
getLocaleName Gets the locale name in the format "language[_script][_country]". language is a lowerca...
Definition: globalpreferences.cpp:668
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldShowImageTaskScriptEditorByDefault
void setShouldShowImageTaskScriptEditorByDefault(const bool showScriptEditor)
Definition: globalpreferences.cpp:234
geometrize::preferences::GlobalPreferences::setImageTaskImageResizeEnabled
void setImageTaskImageResizeEnabled(bool enabled)
setImageTaskImageResizeEnabled Sets the preference for whether image tasks should resize images that ...
Definition: globalpreferences.cpp:613
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getImageTaskResizeThreshold
std::pair< std::uint32_t, std::uint32_t > getImageTaskResizeThreshold() const
Definition: globalpreferences.cpp:255
geometrize::preferences::GlobalPreferences::setCountryIsoCode
void setCountryIsoCode(const std::string &countryIsoCode)
setCountryIsoCode Sets the ISO-3166 country code preference for the application.
Definition: globalpreferences.cpp:663
geometrize::preferences::GlobalPreferences::getCustomImageTaskBackgroundOverrideColor
std::array< std::int32_t, 4 > getCustomImageTaskBackgroundOverrideColor() const
getCustomImageTaskBackgroundOverrideColor Gets the preference for the custom image task background ov...
Definition: globalpreferences.cpp:498
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_imageTaskResizeEnabled
bool m_imageTaskResizeEnabled
Definition: globalpreferences.cpp:420
geometrize::preferences::GlobalPreferences::save
bool save(const std::string &filePath)
save Saves the global preferences to a file.
Definition: globalpreferences.cpp:453
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldShowImageTaskConsoleByDefault
void setShouldShowImageTaskConsoleByDefault(const bool showConsole)
Definition: globalpreferences.cpp:224
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldShowImageTaskPixmapViewByDefault
bool shouldShowImageTaskPixmapViewByDefault() const
Definition: globalpreferences.cpp:239
geometrize::preferences::GlobalPreferences
The GlobalPreferences class models the preferences associated with the application as a whole....
Definition: globalpreferences.h:44
geometrize
Definition: commandlineparser.cpp:73
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldUseImageAlphaReplacementColor
bool shouldUseImageAlphaReplacementColor() const
Definition: globalpreferences.cpp:169
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldAutoLoadImageTaskSettings
void setShouldAutoLoadImageTaskSettings(const bool loadSettings)
Definition: globalpreferences.cpp:184
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_applicationLaunchCount
unsigned int m_applicationLaunchCount
Definition: globalpreferences.cpp:397
geometrize::preferences::GlobalPreferences::shouldShowWelcomeScreenOnLaunch
bool shouldShowWelcomeScreenOnLaunch() const
shouldShowWelcomeScreenOnLaunch Gets the preference for whether the welcome screen should be displaye...
Definition: globalpreferences.cpp:458
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldShowImageTaskScriptEditorByDefault
bool shouldShowImageTaskScriptEditorByDefault() const
Definition: globalpreferences.cpp:229
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldShowWelcomeScreenOnLaunch
void setShouldShowWelcomeScreenOnLaunch(const bool show)
Definition: globalpreferences.cpp:104
geometrize::preferences::GlobalPreferences::shouldShowImageTaskPixmapViewByDefault
bool shouldShowImageTaskPixmapViewByDefault() const
shouldShowImageTaskPixmapViewByDefault Gets the preference for whether to show the image task pixmap/...
Definition: globalpreferences.cpp:598
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldReplaceTargetImageAlphaWithCustomColor
void setShouldReplaceTargetImageAlphaWithCustomColor(const bool useColor)
Definition: globalpreferences.cpp:174
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldGeometrizeAppLogoOnLaunch
void setShouldGeometrizeAppLogoOnLaunch(const bool geometrizeLogo)
Definition: globalpreferences.cpp:114
geometrize::preferences::GlobalPreferences::shouldPopulateRecentItemsOnLaunch
bool shouldPopulateRecentItemsOnLaunch() const
shouldPopulateRecentItemsOnLaunch Gets the preference for whether the recent items list should be pop...
Definition: globalpreferences.cpp:478
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setLanguageIsoCode
void setLanguageIsoCode(const std::string &languageIsoCode)
Definition: globalpreferences.cpp:285
geometrize::preferences::GlobalPreferences::shouldGeometrizeAppLogoOnLaunch
bool shouldGeometrizeAppLogoOnLaunch() const
shouldGeometrizeAppLogoOnLaunch Gets the preference for whether the app logo on the launch window sho...
Definition: globalpreferences.cpp:468
geometrize::preferences::GlobalPreferences::shouldUseCustomImageTaskBackgroundOverrideColor
bool shouldUseCustomImageTaskBackgroundOverrideColor() const
shouldUseCustomImageTaskBackgroundOverrideColor Gets the preference for whether to use the custom ima...
Definition: globalpreferences.cpp:508
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldShowImageTaskVectorViewByDefault
bool m_shouldShowImageTaskVectorViewByDefault
Definition: globalpreferences.cpp:415
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldShowWelcomeScreenOnLaunch
bool m_shouldShowWelcomeScreenOnLaunch
Definition: globalpreferences.cpp:399
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldShowImageTaskPixmapViewByDefault
void setShouldShowImageTaskPixmapViewByDefault(const bool showPixmapView)
Definition: globalpreferences.cpp:244
geometrize::preferences::GlobalPreferences::shouldUseImageAlphaReplacementColor
bool shouldUseImageAlphaReplacementColor() const
shouldUseImageAlphaReplacementColor Gets the preference for whether to replace the alpha of a target ...
Definition: globalpreferences.cpp:548
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getTargetImageAlphaReplacementColor
std::array< std::int32_t, 4 > getTargetImageAlphaReplacementColor() const
Definition: globalpreferences.cpp:159
geometrize::preferences::GlobalPreferences::setScriptIsoCode
void setScriptIsoCode(const std::string &scriptIsoCode)
setScriptIsoCode Sets the ISO-15924 script code preference for the application.
Definition: globalpreferences.cpp:653
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldAutoSaveImageTaskSettings
void setShouldAutoSaveImageTaskSettings(const bool saveSettings)
Definition: globalpreferences.cpp:194
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldShowImageTaskVectorViewByDefault
void setShouldShowImageTaskVectorViewByDefault(const bool showVectorView)
Definition: globalpreferences.cpp:214
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::isImageTaskImageResizeEnabled
bool isImageTaskImageResizeEnabled() const
Definition: globalpreferences.cpp:260
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::GlobalPreferencesImpl
GlobalPreferencesImpl(const GlobalPreferencesImpl &)=default
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_data
serialization::GlobalPreferencesData m_data
Definition: globalpreferences.cpp:395
geometrize::preferences::GlobalPreferences::shouldShowImageTaskScriptEditorByDefault
bool shouldShowImageTaskScriptEditorByDefault() const
shouldShowImageTaskScriptEditorByDefault Gets the preference for whether to open the script editor wh...
Definition: globalpreferences.cpp:588
geometrize::preferences::GlobalPreferences::setShouldShowLaunchConsoleByDefault
void setShouldShowLaunchConsoleByDefault(bool showConsole)
setShouldShowLaunchConsoleByDefault Sets the preference for whether to show the console on the launch...
Definition: globalpreferences.cpp:563
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::getScriptIsoCode
std::string getScriptIsoCode() const
Definition: globalpreferences.cpp:290
geometrize::preferences::GlobalPreferences::setShouldPopulateTemplatesOnLaunch
void setShouldPopulateTemplatesOnLaunch(bool populateTemplates)
setShouldPopulateTemplatesOnLaunch Sets the preference for whether to populate the task templates on ...
Definition: globalpreferences.cpp:493
geometrize::preferences::GlobalPreferences::getApplicationLaunchCount
unsigned int getApplicationLaunchCount() const
getApplicationLaunchCount
Definition: globalpreferences.cpp:438
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldPopulateRecentItemsOnLaunch
bool shouldPopulateRecentItemsOnLaunch() const
Definition: globalpreferences.cpp:119
geometrize::preferences::GlobalPreferences::getLanguageIsoCode
std::string getLanguageIsoCode() const
getLanguageIsoCode Gets the ISO 639-1 language preference for the application.
Definition: globalpreferences.cpp:638
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldPopulateTemplatesOnLaunch
bool m_shouldPopulateTemplatesOnLaunch
Definition: globalpreferences.cpp:403
geometrize::preferences::GlobalPreferences::setShouldAutoSaveImageTaskSettings
void setShouldAutoSaveImageTaskSettings(bool saveSettings)
setShouldAutoSaveImageTaskSettings Sets the preference for whether to automatically save the last tas...
Definition: globalpreferences.cpp:533
geometrize::preferences::GlobalPreferences::shouldAutoSaveImageTaskSettings
bool shouldAutoSaveImageTaskSettings() const
shouldAutoSaveImageTaskSettings Gets the preference for whether to automatically save the last task s...
Definition: globalpreferences.cpp:528
geometrize::preferences::GlobalPreferences::setShouldPopulateRecentItemsOnLaunch
void setShouldPopulateRecentItemsOnLaunch(bool populateRecents)
setShouldPopulateRecentItemsOnLaunch Sets the preference for whether the recent items list should be ...
Definition: globalpreferences.cpp:483
geometrize::preferences::GlobalPreferences::d
std::unique_ptr< GlobalPreferencesImpl > d
Definition: globalpreferences.h:355
geometrize::preferences::GlobalPreferences::setShouldShowImageTaskScriptEditorByDefault
void setShouldShowImageTaskScriptEditorByDefault(bool showScriptEditor)
setShouldShowImageTaskScriptEditorByDefault Sets the preference for whether to open the script editor...
Definition: globalpreferences.cpp:593
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldShowImageTaskScriptEditorByDefault
bool m_shouldShowImageTaskScriptEditorByDefault
Definition: globalpreferences.cpp:417
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldUseImageAlphaReplacementColor
bool m_shouldUseImageAlphaReplacementColor
Definition: globalpreferences.cpp:409
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setCustomImageTaskBackgroundOverrideColor
void setCustomImageTaskBackgroundOverrideColor(const std::int32_t r, const std::int32_t g, const std::int32_t b, const std::int32_t a)
Definition: globalpreferences.cpp:144
globalpreferences.h
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::operator=
GlobalPreferencesImpl & operator=(const GlobalPreferencesImpl &)=default
geometrize::preferences::GlobalPreferences::setShouldUseCustomImageTaskBackgroundOverrideColor
void setShouldUseCustomImageTaskBackgroundOverrideColor(bool useColor)
setShouldUseCustomImageTaskBackgroundOverrideColor Sets the preference for whether to use the custom ...
Definition: globalpreferences.cpp:513
geometrize::preferences::GlobalPreferences::shouldShowImageTaskConsoleByDefault
bool shouldShowImageTaskConsoleByDefault() const
shouldShowImageTaskConsoleByDefault Gets the preference for whether to show the console on the image ...
Definition: globalpreferences.cpp:578
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_customImageTaskBackgroundOverrideColor
std::array< std::int32_t, 4 > m_customImageTaskBackgroundOverrideColor
Definition: globalpreferences.cpp:405
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldShowWelcomeScreenOnLaunch
bool shouldShowWelcomeScreenOnLaunch() const
Definition: globalpreferences.cpp:99
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_targetImageAlphaReplacementColor
std::array< std::int32_t, 4 > m_targetImageAlphaReplacementColor
Definition: globalpreferences.cpp:408
geometrize::preferences::GlobalPreferences::getTargetImageAlphaReplacementColor
std::array< std::int32_t, 4 > getTargetImageAlphaReplacementColor() const
getTargetImageAlphaReplacementColor Gets the preference for the color to replace the alpha of a targe...
Definition: globalpreferences.cpp:538
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldShowImageTaskVectorViewByDefault
bool shouldShowImageTaskVectorViewByDefault() const
Definition: globalpreferences.cpp:209
geometrize::preferences::GlobalPreferences::setShouldAutoLoadImageTaskSettings
void setShouldAutoLoadImageTaskSettings(bool loadSettings)
setShouldAutoLoadImageTaskSettings Sets the preference for whether to automatically load any previous...
Definition: globalpreferences.cpp:523
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldGeometrizeAppLogoOnLaunch
bool m_shouldGeometrizeAppLogoOnLaunch
Definition: globalpreferences.cpp:401
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::incrementApplicationLaunchCount
void incrementApplicationLaunchCount()
Definition: globalpreferences.cpp:94
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::~GlobalPreferencesImpl
~GlobalPreferencesImpl()
Definition: globalpreferences.cpp:46
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setImageTaskMaxThreads
void setImageTaskMaxThreads(const std::uint32_t maxThreads)
Definition: globalpreferences.cpp:275
geometrize::preferences::GlobalPreferences::setTargetImageAlphaReplacementColor
void setTargetImageAlphaReplacementColor(std::int32_t r, std::int32_t g, std::int32_t b, std::int32_t a)
setTargetImageAlphaReplacementColor Sets the preference for the color to replace the alpha of a targe...
Definition: globalpreferences.cpp:543
geometrize::preferences::getGlobalPreferences
geometrize::preferences::GlobalPreferences & getGlobalPreferences()
getGlobalPreferences Shorthand function that gets a reference to the shared global preferences object...
Definition: globalpreferences.cpp:32
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::m_shouldShowLaunchConsoleByDefault
bool m_shouldShowLaunchConsoleByDefault
Definition: globalpreferences.cpp:414
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::shouldUseCustomImageTaskBackgroundOverrideColor
bool shouldUseCustomImageTaskBackgroundOverrideColor() const
Definition: globalpreferences.cpp:149
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setShouldPopulateTemplatesOnLaunch
void setShouldPopulateTemplatesOnLaunch(const bool populateTemplates)
Definition: globalpreferences.cpp:134
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::GlobalPreferencesImpl
GlobalPreferencesImpl()
Definition: globalpreferences.cpp:41
util.h
geometrize::serialization::GlobalPreferencesData::archive
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
geometrize::preferences::GlobalPreferences::shouldShowImageTaskVectorViewByDefault
bool shouldShowImageTaskVectorViewByDefault() const
shouldShowImageTaskVectorViewByDefault Gets the preference for whether to show the image task vector/...
Definition: globalpreferences.cpp:568
geometrize::preferences::getGlobalPreferencesConfigPath
std::string getGlobalPreferencesConfigPath()
getGlobalPreferencesConfigPath Gets the absolute path to where the global preferences config file sho...
Definition: globalpreferences.cpp:23
geometrize::preferences::GlobalPreferences::GlobalPreferencesImpl::setCountryIsoCode
void setCountryIsoCode(const std::string &countryIsoCode)
Definition: globalpreferences.cpp:305
geometrize::util::split
std::vector< std::string > split(const std::string &s, const char delimiter)
split Splits a given string into a vector of tokens using the given delimiter.
Definition: util.cpp:367
geometrize::preferences::GlobalPreferences::GlobalPreferences
GlobalPreferences()
Definition: globalpreferences.cpp:430