 |
Geometrize
1.0
An application for geometrizing images into geometric primitives
|
Go to the documentation of this file.
16 class GlobalPreferences;
57 bool load(
const std::string& filePath);
64 bool save(
const std::string& filePath);
356 std::unique_ptr<GlobalPreferencesImpl>
d;
bool load(const std::string &filePath)
load Loads the global preferences from a file.
Definition: globalpreferences.cpp:448
std::string m_scriptIsoCode
Definition: globalpreferences.cpp:425
bool shouldShowImageTaskConsoleByDefault() const
Definition: globalpreferences.cpp:219
std::string getLanguageIsoCode() const
Definition: globalpreferences.cpp:280
std::array< std::int32_t, 4 > getCustomImageTaskBackgroundOverrideColor() const
Definition: globalpreferences.cpp:139
bool shouldPopulateTemplatesOnLaunch() const
Definition: globalpreferences.cpp:129
void setShouldShowWelcomeScreenOnLaunch(bool show)
setShouldShowWelcomeScreenOnLaunch Sets the preference for whether the welcome screen should be displ...
Definition: globalpreferences.cpp:463
std::uint32_t getImageTaskMaxThreads() const
getImageTaskMaxThreads Gets the maximum number of threads the image task should use.
Definition: globalpreferences.cpp:628
void setImageTaskResizeThreshold(const std::uint32_t width, const std::uint32_t height)
Definition: globalpreferences.cpp:249
void setShouldShowImageTaskConsoleByDefault(bool showConsole)
setShouldShowImageTaskConsoleByDefault Sets the preference for whether to show the console on the ima...
Definition: globalpreferences.cpp:583
void setShouldReplaceTargetImageAlphaWithCustomColor(bool useColor)
setShouldReplaceTargetImageAlphaWithCustomColor Sets the preference for whether to replace the alpha ...
Definition: globalpreferences.cpp:553
void setShouldShowImageTaskPixmapViewByDefault(bool showPixmapView)
setShouldShowImageTaskPixmapViewByDefault Sets the preference for whether to show the image task pixm...
Definition: globalpreferences.cpp:603
bool save(const std::string &filePath)
Definition: globalpreferences.cpp:67
GlobalPreferences(const GlobalPreferences &)=delete
void setShouldUseCustomImageTaskBackgroundOverrideColor(const bool useColor)
Definition: globalpreferences.cpp:154
unsigned int getApplicationLaunchCount() const
Definition: globalpreferences.cpp:89
bool m_shouldShowImageTaskPixmapViewByDefault
Definition: globalpreferences.cpp:418
std::string getCountryIsoCode() const
getCountryIsoCode Gets the ISO-3166 country code preference for the application.
Definition: globalpreferences.cpp:658
bool shouldShowLaunchConsoleByDefault() const
Definition: globalpreferences.cpp:199
bool shouldAutoLoadImageTaskSettings() const
shouldAutoLoadImageTaskSettings Gets the preference for whether to automatically load any previously ...
Definition: globalpreferences.cpp:518
~GlobalPreferences()
Definition: globalpreferences.cpp:434
bool m_shouldShowImageTaskConsoleByDefault
Definition: globalpreferences.cpp:416
std::pair< std::uint32_t, std::uint32_t > m_imageTaskResizeThreshold
Definition: globalpreferences.cpp:421
bool load(const std::string &filePath)
Definition: globalpreferences.cpp:55
std::string m_countryIsoCode
Definition: globalpreferences.cpp:426
bool m_shouldUseCustomImageTaskBackgroundOverrideColor
Definition: globalpreferences.cpp:406
void setLocaleName(const std::string &localeName)
Definition: globalpreferences.cpp:322
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
void setImageTaskImageResizeEnabled(const bool enabled)
Definition: globalpreferences.cpp:265
void setShouldGeometrizeAppLogoOnLaunch(bool geometrizeLogo)
setShouldGeometrizeAppLogoOnLaunch Sets the preference for whether to geometrize the app logo on the ...
Definition: globalpreferences.cpp:473
bool shouldAutoSaveImageTaskSettings() const
Definition: globalpreferences.cpp:189
std::uint32_t getImageTaskMaxThreads() const
Definition: globalpreferences.cpp:270
void setScriptIsoCode(const std::string &scriptIsoCode)
Definition: globalpreferences.cpp:295
std::string m_languageIsoCode
Definition: globalpreferences.cpp:424
std::uint32_t m_imageTaskMaxThreads
Definition: globalpreferences.cpp:422
bool shouldShowLaunchConsoleByDefault() const
shouldShowLaunchConsoleByDefault Gets the preference for whether to show the console on the launch wi...
Definition: globalpreferences.cpp:558
GlobalPreferences & operator=(const GlobalPreferences &)=delete
std::string getCountryIsoCode() const
Definition: globalpreferences.cpp:300
bool m_shouldAutoLoadImageTaskSettings
Definition: globalpreferences.cpp:411
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
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
void performArchival(T &archive)
Definition: globalpreferences.cpp:362
bool isImageTaskImageResizeEnabled() const
isImageTaskImageResizeEnabled Gets the preference for whether image tasks should resize images that a...
Definition: globalpreferences.cpp:608
void setLanguageIsoCode(const std::string &languageIsoCode)
setLanguageIsoCode Sets the ISO 639-1 language preference for the application.
Definition: globalpreferences.cpp:643
Definition: globalpreferences.cpp:39
void setImageTaskMaxThreads(std::uint32_t maxThreads)
setImageTaskMaxThreads Sets the maximum number of threads the image task should use.
Definition: globalpreferences.cpp:633
std::string getLocaleName() const
Definition: globalpreferences.cpp:310
std::string getScriptIsoCode() const
getScriptIsoCode Gets the ISO-15924 script code preference for the application.
Definition: globalpreferences.cpp:648
The GlobalPreferencesData struct represents the data for the global application preferences.
Definition: globalpreferencesdata.h:22
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
void setShouldShowLaunchConsoleByDefault(const bool showConsole)
Definition: globalpreferences.cpp:204
void setShouldShowImageTaskVectorViewByDefault(bool showVectorView)
setShouldShowImageTaskVectorViewByDefault Sets the preference for whether to show the image task vect...
Definition: globalpreferences.cpp:573
bool shouldAutoLoadImageTaskSettings() const
Definition: globalpreferences.cpp:179
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
bool shouldGeometrizeAppLogoOnLaunch() const
Definition: globalpreferences.cpp:109
bool m_shouldAutoSaveImageTaskSettings
Definition: globalpreferences.cpp:412
bool shouldPopulateTemplatesOnLaunch() const
shouldPopulateTemplatesOnLaunch Gets the preference for whether to populate the task templates on the...
Definition: globalpreferences.cpp:488
bool m_shouldPopulateRecentItemsOnLaunch
Definition: globalpreferences.cpp:402
void incrementApplicationLaunchCount()
incrementApplicationLaunchCount Increments the count for the number of times the application has been...
Definition: globalpreferences.cpp:443
void setShouldPopulateRecentItemsOnLaunch(const bool populateRecents)
Definition: globalpreferences.cpp:124
std::string getLocaleName() const
getLocaleName Gets the locale name in the format "language[_script][_country]". language is a lowerca...
Definition: globalpreferences.cpp:668
void setShouldShowImageTaskScriptEditorByDefault(const bool showScriptEditor)
Definition: globalpreferences.cpp:234
void setImageTaskImageResizeEnabled(bool enabled)
setImageTaskImageResizeEnabled Sets the preference for whether image tasks should resize images that ...
Definition: globalpreferences.cpp:613
std::pair< std::uint32_t, std::uint32_t > getImageTaskResizeThreshold() const
Definition: globalpreferences.cpp:255
void setCountryIsoCode(const std::string &countryIsoCode)
setCountryIsoCode Sets the ISO-3166 country code preference for the application.
Definition: globalpreferences.cpp:663
std::array< std::int32_t, 4 > getCustomImageTaskBackgroundOverrideColor() const
getCustomImageTaskBackgroundOverrideColor Gets the preference for the custom image task background ov...
Definition: globalpreferences.cpp:498
bool m_imageTaskResizeEnabled
Definition: globalpreferences.cpp:420
bool save(const std::string &filePath)
save Saves the global preferences to a file.
Definition: globalpreferences.cpp:453
void setShouldShowImageTaskConsoleByDefault(const bool showConsole)
Definition: globalpreferences.cpp:224
bool shouldShowImageTaskPixmapViewByDefault() const
Definition: globalpreferences.cpp:239
The GlobalPreferences class models the preferences associated with the application as a whole....
Definition: globalpreferences.h:44
Definition: commandlineparser.cpp:73
bool shouldUseImageAlphaReplacementColor() const
Definition: globalpreferences.cpp:169
void setShouldAutoLoadImageTaskSettings(const bool loadSettings)
Definition: globalpreferences.cpp:184
unsigned int m_applicationLaunchCount
Definition: globalpreferences.cpp:397
bool shouldShowWelcomeScreenOnLaunch() const
shouldShowWelcomeScreenOnLaunch Gets the preference for whether the welcome screen should be displaye...
Definition: globalpreferences.cpp:458
bool shouldShowImageTaskScriptEditorByDefault() const
Definition: globalpreferences.cpp:229
void setShouldShowWelcomeScreenOnLaunch(const bool show)
Definition: globalpreferences.cpp:104
bool shouldShowImageTaskPixmapViewByDefault() const
shouldShowImageTaskPixmapViewByDefault Gets the preference for whether to show the image task pixmap/...
Definition: globalpreferences.cpp:598
void setShouldReplaceTargetImageAlphaWithCustomColor(const bool useColor)
Definition: globalpreferences.cpp:174
void setShouldGeometrizeAppLogoOnLaunch(const bool geometrizeLogo)
Definition: globalpreferences.cpp:114
bool shouldPopulateRecentItemsOnLaunch() const
shouldPopulateRecentItemsOnLaunch Gets the preference for whether the recent items list should be pop...
Definition: globalpreferences.cpp:478
void setLanguageIsoCode(const std::string &languageIsoCode)
Definition: globalpreferences.cpp:285
bool shouldGeometrizeAppLogoOnLaunch() const
shouldGeometrizeAppLogoOnLaunch Gets the preference for whether the app logo on the launch window sho...
Definition: globalpreferences.cpp:468
bool shouldUseCustomImageTaskBackgroundOverrideColor() const
shouldUseCustomImageTaskBackgroundOverrideColor Gets the preference for whether to use the custom ima...
Definition: globalpreferences.cpp:508
bool m_shouldShowImageTaskVectorViewByDefault
Definition: globalpreferences.cpp:415
bool m_shouldShowWelcomeScreenOnLaunch
Definition: globalpreferences.cpp:399
void setShouldShowImageTaskPixmapViewByDefault(const bool showPixmapView)
Definition: globalpreferences.cpp:244
bool shouldUseImageAlphaReplacementColor() const
shouldUseImageAlphaReplacementColor Gets the preference for whether to replace the alpha of a target ...
Definition: globalpreferences.cpp:548
std::array< std::int32_t, 4 > getTargetImageAlphaReplacementColor() const
Definition: globalpreferences.cpp:159
void setScriptIsoCode(const std::string &scriptIsoCode)
setScriptIsoCode Sets the ISO-15924 script code preference for the application.
Definition: globalpreferences.cpp:653
void setShouldAutoSaveImageTaskSettings(const bool saveSettings)
Definition: globalpreferences.cpp:194
void setShouldShowImageTaskVectorViewByDefault(const bool showVectorView)
Definition: globalpreferences.cpp:214
bool isImageTaskImageResizeEnabled() const
Definition: globalpreferences.cpp:260
GlobalPreferencesImpl(const GlobalPreferencesImpl &)=default
serialization::GlobalPreferencesData m_data
Definition: globalpreferences.cpp:395
bool shouldShowImageTaskScriptEditorByDefault() const
shouldShowImageTaskScriptEditorByDefault Gets the preference for whether to open the script editor wh...
Definition: globalpreferences.cpp:588
void setShouldShowLaunchConsoleByDefault(bool showConsole)
setShouldShowLaunchConsoleByDefault Sets the preference for whether to show the console on the launch...
Definition: globalpreferences.cpp:563
std::string getScriptIsoCode() const
Definition: globalpreferences.cpp:290
void setShouldPopulateTemplatesOnLaunch(bool populateTemplates)
setShouldPopulateTemplatesOnLaunch Sets the preference for whether to populate the task templates on ...
Definition: globalpreferences.cpp:493
unsigned int getApplicationLaunchCount() const
getApplicationLaunchCount
Definition: globalpreferences.cpp:438
bool shouldPopulateRecentItemsOnLaunch() const
Definition: globalpreferences.cpp:119
std::string getLanguageIsoCode() const
getLanguageIsoCode Gets the ISO 639-1 language preference for the application.
Definition: globalpreferences.cpp:638
bool m_shouldPopulateTemplatesOnLaunch
Definition: globalpreferences.cpp:403
void setShouldAutoSaveImageTaskSettings(bool saveSettings)
setShouldAutoSaveImageTaskSettings Sets the preference for whether to automatically save the last tas...
Definition: globalpreferences.cpp:533
bool shouldAutoSaveImageTaskSettings() const
shouldAutoSaveImageTaskSettings Gets the preference for whether to automatically save the last task s...
Definition: globalpreferences.cpp:528
void setShouldPopulateRecentItemsOnLaunch(bool populateRecents)
setShouldPopulateRecentItemsOnLaunch Sets the preference for whether the recent items list should be ...
Definition: globalpreferences.cpp:483
std::unique_ptr< GlobalPreferencesImpl > d
Definition: globalpreferences.h:355
void setShouldShowImageTaskScriptEditorByDefault(bool showScriptEditor)
setShouldShowImageTaskScriptEditorByDefault Sets the preference for whether to open the script editor...
Definition: globalpreferences.cpp:593
bool m_shouldShowImageTaskScriptEditorByDefault
Definition: globalpreferences.cpp:417
bool m_shouldUseImageAlphaReplacementColor
Definition: globalpreferences.cpp:409
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
GlobalPreferencesImpl & operator=(const GlobalPreferencesImpl &)=default
void setShouldUseCustomImageTaskBackgroundOverrideColor(bool useColor)
setShouldUseCustomImageTaskBackgroundOverrideColor Sets the preference for whether to use the custom ...
Definition: globalpreferences.cpp:513
bool shouldShowImageTaskConsoleByDefault() const
shouldShowImageTaskConsoleByDefault Gets the preference for whether to show the console on the image ...
Definition: globalpreferences.cpp:578
std::array< std::int32_t, 4 > m_customImageTaskBackgroundOverrideColor
Definition: globalpreferences.cpp:405
bool shouldShowWelcomeScreenOnLaunch() const
Definition: globalpreferences.cpp:99
std::array< std::int32_t, 4 > m_targetImageAlphaReplacementColor
Definition: globalpreferences.cpp:408
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
bool shouldShowImageTaskVectorViewByDefault() const
Definition: globalpreferences.cpp:209
void setShouldAutoLoadImageTaskSettings(bool loadSettings)
setShouldAutoLoadImageTaskSettings Sets the preference for whether to automatically load any previous...
Definition: globalpreferences.cpp:523
bool m_shouldGeometrizeAppLogoOnLaunch
Definition: globalpreferences.cpp:401
void incrementApplicationLaunchCount()
Definition: globalpreferences.cpp:94
~GlobalPreferencesImpl()
Definition: globalpreferences.cpp:46
void setImageTaskMaxThreads(const std::uint32_t maxThreads)
Definition: globalpreferences.cpp:275
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::GlobalPreferences & getGlobalPreferences()
getGlobalPreferences Shorthand function that gets a reference to the shared global preferences object...
Definition: globalpreferences.cpp:32
bool m_shouldShowLaunchConsoleByDefault
Definition: globalpreferences.cpp:414
bool shouldUseCustomImageTaskBackgroundOverrideColor() const
Definition: globalpreferences.cpp:149
void setShouldPopulateTemplatesOnLaunch(const bool populateTemplates)
Definition: globalpreferences.cpp:134
GlobalPreferencesImpl()
Definition: globalpreferences.cpp:41
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
bool shouldShowImageTaskVectorViewByDefault() const
shouldShowImageTaskVectorViewByDefault Gets the preference for whether to show the image task vector/...
Definition: globalpreferences.cpp:568
std::string getGlobalPreferencesConfigPath()
getGlobalPreferencesConfigPath Gets the absolute path to where the global preferences config file sho...
Definition: globalpreferences.cpp:23
void setCountryIsoCode(const std::string &countryIsoCode)
Definition: globalpreferences.cpp:305
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
GlobalPreferences()
Definition: globalpreferences.cpp:430