 |
Geometrize
1.0
An application for geometrizing images into geometric primitives
|
◆ GlobalPreferencesDialogImpl() [1/2]
geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::GlobalPreferencesDialogImpl |
( |
GlobalPreferencesDialog * |
pQ | ) |
|
|
inline |
24 :
ui{std::make_unique<Ui::GlobalPreferencesDialog>()},
q{pQ}
26 q->setWindowFlags(
q->windowFlags() & ~Qt::WindowContextHelpButtonHint);
29 connect(
ui->preferenceCategoryList, &QListWidget::currentRowChanged, [
this](
const int currentRow) {
30 ui->preferencePageStack->setCurrentIndex(currentRow);
◆ GlobalPreferencesDialogImpl() [2/2]
geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::GlobalPreferencesDialogImpl |
( |
const GlobalPreferencesDialogImpl & |
| ) |
|
|
delete |
◆ ~GlobalPreferencesDialogImpl()
geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::~GlobalPreferencesDialogImpl |
( |
| ) |
|
|
inline |
◆ getPrefs()
◆ onLanguageChange()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::onLanguageChange |
( |
| ) |
|
|
inline |
161 ui->retranslateUi(
q);
◆ openCustomImageAlphaReplacementColorPicker()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::openCustomImageAlphaReplacementColorPicker |
( |
| ) |
|
|
inline |
93 const QColor currentColor = QColor(col[0], col[1], col[2], col[3]);
94 const QColor result = QColorDialog::getColor(currentColor,
q, tr(
"Color Picker"), QColorDialog::ColorDialogOption::ShowAlphaChannel);
95 if(!result.isValid()) {
◆ openCustomImageBackgroundBackgroundColorPicker()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::openCustomImageBackgroundBackgroundColorPicker |
( |
| ) |
|
|
inline |
76 const QColor currentColor = QColor(col[0], col[1], col[2], col[3]);
77 const QColor result = QColorDialog::getColor(currentColor,
q, tr(
"Color Picker"), QColorDialog::ColorDialogOption::ShowAlphaChannel);
78 if(!result.isValid()) {
◆ operator=()
◆ populateUi()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::populateUi |
( |
| ) |
|
|
inlineprivate |
◆ setAutoLoadImageTaskSettings()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setAutoLoadImageTaskSettings |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setAutoSaveImageTaskSettings()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setAutoSaveImageTaskSettings |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setButtonColor()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setButtonColor |
( |
QPushButton & |
button, |
|
|
const std::int32_t |
r, |
|
|
const std::int32_t |
g, |
|
|
const std::int32_t |
b, |
|
|
const std::int32_t |
a |
|
) |
| |
|
inlineprivate |
209 const QString buttonStyle =
"QPushButton {border: 0.05em solid lightgray; background-color: rgba(" +
210 QString::number(r) +
"," + QString::number(g) +
"," + QString::number(b) +
"," + QString::number(
static_cast<float>(a) / 255.0f) +
") }";
211 button.setStyleSheet(buttonStyle);
◆ setCustomImageTaskBackgroundOverrideColor()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setCustomImageTaskBackgroundOverrideColor |
( |
const std::int32_t |
r, |
|
|
const std::int32_t |
g, |
|
|
const std::int32_t |
b, |
|
|
const std::int32_t |
a |
|
) |
| |
|
inline |
◆ setGeometrizeLogo()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setGeometrizeLogo |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setImageTaskImageResize()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setImageTaskImageResize |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setImageTaskImageResizeThresholdHeight()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setImageTaskImageResizeThresholdHeight |
( |
const int |
height | ) |
|
|
inline |
◆ setImageTaskImageResizeThresholdWidth()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setImageTaskImageResizeThresholdWidth |
( |
const int |
width | ) |
|
|
inline |
◆ setMaxThreadsPerImageTask()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setMaxThreadsPerImageTask |
( |
const int |
value | ) |
|
|
inline |
◆ setPopulateRecents()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setPopulateRecents |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setPopulateTemplates()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setPopulateTemplates |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShouldReplaceTargetImageAlphaWithCustomColor()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShouldReplaceTargetImageAlphaWithCustomColor |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShouldUseCustomImageTaskBackgroundOverrideColor()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShouldUseCustomImageTaskBackgroundOverrideColor |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShowImageTaskConsoleByDefault()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShowImageTaskConsoleByDefault |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShowLaunchWindowConsoleByDefault()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShowLaunchWindowConsoleByDefault |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShowPixmapResultsByDefault()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShowPixmapResultsByDefault |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShowScriptEditorsByDefault()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShowScriptEditorsByDefault |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setShowVectorResultsByDefault()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setShowVectorResultsByDefault |
( |
const bool |
enabled | ) |
|
|
inline |
◆ setTargetImageAlphaReplacementColor()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::setTargetImageAlphaReplacementColor |
( |
const std::int32_t |
r, |
|
|
const std::int32_t |
g, |
|
|
const std::int32_t |
b, |
|
|
const std::int32_t |
a |
|
) |
| |
|
inline |
104 setButtonColor(*
ui->selectTargetImageAlphaReplacementColorButton, r, g, b, a);
◆ syncUiWithPreferences()
void geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::syncUiWithPreferences |
( |
| ) |
|
|
inlineprivate |
178 ui->geometrizeLogo->setChecked(prefs.shouldGeometrizeAppLogoOnLaunch());
179 ui->populateRecents->setChecked(prefs.shouldPopulateRecentItemsOnLaunch());
180 ui->populateTemplates->setChecked(prefs.shouldPopulateTemplatesOnLaunch());
182 ui->autoLoadImageTaskSettings->setChecked(prefs.shouldAutoLoadImageTaskSettings());
183 ui->autoSaveImageTaskSettings->setChecked(prefs.shouldAutoSaveImageTaskSettings());
185 ui->useCustomImageTaskBackgroundColor->setChecked(prefs.shouldUseCustomImageTaskBackgroundOverrideColor());
187 const std::array<std::int32_t, 4> bgCol = prefs.getCustomImageTaskBackgroundOverrideColor();
188 setButtonColor(*
ui->selectCustomImageBackgroundColorButton, bgCol[0], bgCol[1], bgCol[2], bgCol[3]);
190 ui->replaceTargetImageAlphaWithCustomColor->setChecked(prefs.shouldUseImageAlphaReplacementColor());
192 const std::array<std::int32_t, 4> alphaCol = prefs.getTargetImageAlphaReplacementColor();
193 setButtonColor(*
ui->selectTargetImageAlphaReplacementColorButton, alphaCol[0], alphaCol[1], alphaCol[2], alphaCol[3]);
195 ui->showLaunchWindowConsoleByDefault->setChecked(prefs.shouldShowLaunchConsoleByDefault());
196 ui->showVectorResultsByDefault->setChecked(prefs.shouldShowImageTaskVectorViewByDefault());
197 ui->showPixmapResultsByDefault->setChecked(prefs.shouldShowImageTaskPixmapViewByDefault());
198 ui->showImageTaskConsoleByDefault->setChecked(prefs.shouldShowImageTaskConsoleByDefault());
199 ui->showScriptEditorsByDefault->setChecked(prefs.shouldShowImageTaskScriptEditorByDefault());
201 ui->imageResize->setChecked(prefs.isImageTaskImageResizeEnabled());
202 ui->resizeWidth->setValue(prefs.getImageTaskResizeThreshold().first);
203 ui->resizeHeight->setValue(prefs.getImageTaskResizeThreshold().second);
204 ui->maxThreadsPerImageTask->setValue(prefs.getImageTaskMaxThreads());
◆ ui
std::unique_ptr<Ui::GlobalPreferencesDialog> geometrize::dialog::GlobalPreferencesDialog::GlobalPreferencesDialogImpl::ui |
|
private |
The documentation for this class was generated from the following file:
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
void syncUiWithPreferences()
Definition: globalpreferencesdialog.cpp:174
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 setShouldGeometrizeAppLogoOnLaunch(bool geometrizeLogo)
setShouldGeometrizeAppLogoOnLaunch Sets the preference for whether to geometrize the app logo on the ...
Definition: globalpreferences.cpp:473
void setCustomImageTaskBackgroundOverrideColor(const std::int32_t r, const std::int32_t g, const std::int32_t b, const std::int32_t a)
Definition: globalpreferencesdialog.cpp:84
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 setImageTaskMaxThreads(std::uint32_t maxThreads)
setImageTaskMaxThreads Sets the maximum number of threads the image task should use.
Definition: globalpreferences.cpp:633
GlobalPreferencesDialog * q
Definition: globalpreferencesdialog.cpp:216
void setShouldShowImageTaskVectorViewByDefault(bool showVectorView)
setShouldShowImageTaskVectorViewByDefault Sets the preference for whether to show the image task vect...
Definition: globalpreferences.cpp:573
void setImageTaskImageResizeEnabled(bool enabled)
setImageTaskImageResizeEnabled Sets the preference for whether image tasks should resize images that ...
Definition: globalpreferences.cpp:613
geometrize::preferences::GlobalPreferences & getPrefs()
Definition: globalpreferencesdialog.cpp:169
std::array< std::int32_t, 4 > getCustomImageTaskBackgroundOverrideColor() const
getCustomImageTaskBackgroundOverrideColor Gets the preference for the custom image task background ov...
Definition: globalpreferences.cpp:498
bool save(const std::string &filePath)
save Saves the global preferences to a file.
Definition: globalpreferences.cpp:453
The GlobalPreferences class models the preferences associated with the application as a whole....
Definition: globalpreferences.h:44
void setShouldShowLaunchConsoleByDefault(bool showConsole)
setShouldShowLaunchConsoleByDefault Sets the preference for whether to show the console on the launch...
Definition: globalpreferences.cpp:563
void setShouldPopulateTemplatesOnLaunch(bool populateTemplates)
setShouldPopulateTemplatesOnLaunch Sets the preference for whether to populate the task templates on ...
Definition: globalpreferences.cpp:493
void setShouldAutoSaveImageTaskSettings(bool saveSettings)
setShouldAutoSaveImageTaskSettings Sets the preference for whether to automatically save the last tas...
Definition: globalpreferences.cpp:533
void setShouldPopulateRecentItemsOnLaunch(bool populateRecents)
setShouldPopulateRecentItemsOnLaunch Sets the preference for whether the recent items list should be ...
Definition: globalpreferences.cpp:483
void setShouldShowImageTaskScriptEditorByDefault(bool showScriptEditor)
setShouldShowImageTaskScriptEditorByDefault Sets the preference for whether to open the script editor...
Definition: globalpreferences.cpp:593
void setShouldUseCustomImageTaskBackgroundOverrideColor(bool useColor)
setShouldUseCustomImageTaskBackgroundOverrideColor Sets the preference for whether to use the custom ...
Definition: globalpreferences.cpp:513
void populateUi()
Definition: globalpreferencesdialog.cpp:165
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
void setShouldAutoLoadImageTaskSettings(bool loadSettings)
setShouldAutoLoadImageTaskSettings Sets the preference for whether to automatically load any previous...
Definition: globalpreferences.cpp:523
std::unique_ptr< Ui::GlobalPreferencesDialog > ui
Definition: globalpreferencesdialog.cpp:215
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
void setButtonColor(QPushButton &button, const std::int32_t r, const std::int32_t g, const std::int32_t b, const std::int32_t a)
Definition: globalpreferencesdialog.cpp:207
std::string getGlobalPreferencesConfigPath()
getGlobalPreferencesConfigPath Gets the absolute path to where the global preferences config file sho...
Definition: globalpreferences.cpp:23
void setTargetImageAlphaReplacementColor(const std::int32_t r, const std::int32_t g, const std::int32_t b, const std::int32_t a)
Definition: globalpreferencesdialog.cpp:101