2997{
2998 connect(this->buttonBox(), SIGNAL(clicked(QAbstractButton*)),
this, SLOT(
slotButtonClicked(QAbstractButton*)));
2999
3000 if (page.has_value()) {
3001 PageDesc page_val = page.value();
3002 setCurrentPage(
getPage(page_val.page));
3004 }
3005
3006 int retval = exec();
3007 Q_UNUSED(retval);
3008
3010
3013
3016 cfg.setSeparateEraserCursor(
m_general->m_chkSeparateEraserCursor->isChecked());
3024
3027 cfg.setForceAlwaysFullSizedOutline(!
m_general->m_changeBrushOutline->isChecked());
3029 cfg.setForceAlwaysFullSizedEraserOutline(!
m_general->m_changeEraserBrushOutline->isChecked());
3032
3033 KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
3034 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
3035
3036 cfgImage.setMaxBrushSize(
m_general->intMaxBrushSize->value());
3037 cfg.setIgnoreHighFunctionKeys(
m_general->chkIgnoreHighFunctionKeys->isChecked());
3038
3039 cfg.writeEntry<
bool>(
"use_custom_system_font",
m_general->chkUseCustomFont->isChecked());
3040 if (
m_general->chkUseCustomFont->isChecked()) {
3041 cfg.writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
3042 cfg.writeEntry<
int>(
"custom_font_size",
m_general->intFontSize->value());
3043 }
3044 else {
3045 cfg.writeEntry<QString>("custom_system_font", "");
3046 cfg.writeEntry<int>("custom_font_size", -1);
3047 }
3048
3050 cfg.setMDIBackgroundColor(
m_general->m_mdiColor->color().toXML());
3051 cfg.setMDIBackgroundImage(
m_general->m_backgroundimage->text());
3052 cfg.writeEntry<
int>(
"mdi_rubberband",
m_general->m_chkRubberBand->isChecked());
3054 cfg.writeEntry(
"autosavefileshidden",
m_general->chkHideAutosaveFiles->isChecked());
3055
3056 cfg.setBackupFile(
m_general->m_backupFileCheckBox->isChecked());
3057 cfg.writeEntry(
"backupfilelocation",
m_general->cmbBackupFileLocation->currentIndex());
3058 cfg.writeEntry(
"backupfilesuffix",
m_general->txtBackupFileSuffix->text());
3059 cfg.writeEntry(
"numberofbackupfiles",
m_general->intNumBackupFiles->value());
3060
3061
3069
3070 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
3071 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
3072 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
3073#if defined(Q_OS_WIN) && defined(HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY)
3074 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
3075#endif
3076 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
3077
3079
3080 cfg.writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
3081 cfg.writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
3082
3089
3091
3094 cfg.writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
3095 cfg.setActivateTransformToolAfterPaste(
m_general->chkEnableTransformToolAfterPaste->isChecked());
3096 cfg.setZoomHorizontal(
m_general->chkZoomHorizontally->isChecked());
3097 cfg.setSelectionActionBar(
m_general->chkEnableSelectionActionBar->isChecked());
3100 cfg.setCumulativeUndoRedo(
m_general->chkCumulativeUndo->isChecked());
3102
3103
3107
3108#ifdef Q_OS_ANDROID
3109 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
3110#else
3111 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
3112#endif
3113 if (fi.isWritable()) {
3115 }
3116
3120
3121
3124 for (int i = 0; i < QApplication::screens().count(); ++i) {
3128 cfg.setMonitorForScreen(i, monitorid);
3129 } else {
3130 cfg.setMonitorProfile(i,
3133 }
3134 }
3135 } else {
3139 }
3141 if (cfg.useDefaultColorSpace())
3142 {
3144 cfg.setWorkingColorSpace(currentWorkingColorSpace.
id());
3147 }
3148
3149 cfg.writeEntry(
"ExrDefaultColorProfile",
m_colorSettings->
m_page->cmbColorProfileForEXR->currentText());
3150
3151 cfgImage.setDefaultProofingConfig(*
m_colorSettings->
m_page->wdgProofingOptions->currentProofingConfig());
3157
3158
3160 cfg.setUseRightMiddleTabletButtonWorkaround(
3162
3163#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
3165
3166# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
3167
3168 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
3169 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
3170 nativeWindowsApp->setWinTabEnabled(!cfg.useWin8PointerInput());
3171 }
3172# endif
3173#endif
3174 cfg.writeEntry<
bool>(
"useTimestampsForBrushSpeed",
m_tabletSettings->
m_page->chkUseTimestampsForBrushSpeed->isChecked());
3175
3176#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_PAGE_UP_DOWN
3177 cfg.setUsePageUpDownMouseButtonEmulationWorkaround(
3179#endif
3180
3181#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_HIGH_FUNCTION_KEYS
3182 cfg.setUseHighFunctionKeyMouseButtonEmulationWorkaround(
3184#endif
3185
3186#if KRITA_QT_HAS_ANDROID_IGNORE_HISTORIC_TABLET_EVENTS
3187 cfg.setUseIgnoreHistoricTabletEventsWorkaround(
3189#endif
3190
3193
3194 cfg.writeEntry<
int>(
"tiltDirectionOffset", -
m_tabletSettings->
m_page->tiltDirectionOffsetAngle->angle());
3195
3197
3199 cfg.setCanvasState("TRY_OPENGL");
3200
3206 } else {
3208 }
3209
3212 }
3213
3214 cfg.setUseOpenGLTextureBuffer(
m_displaySettings->chkUseTextureBuffer->isChecked());
3216 cfg.setRootSurfaceFormat(&kritarc, indexToFormat(
m_displaySettings->cmbPreferedRootSurfaceFormat->currentIndex()));
3217 cfg.setAssistantsDrawMode(indexToAssistantDrawMode(
m_displaySettings->cmbAssistantsDrawMode->currentIndex()));
3218
3227 cfgImage.setSelectionOverlayMaskColor(c.
toQColor());
3228 cfgImage.setSelectionOutlineOpacity(
m_displaySettings->sldSelectionOutlineOpacity->value());
3230 cfg.setAntialiasSelectionOutline(
m_displaySettings->chkSelectionOutlineAntialiasing->isChecked());
3231 cfg.setShowSingleChannelAsColor(
m_displaySettings->chkChannelsAsColor->isChecked());
3233
3240
3241 cfg.setCursorMainColor(
m_general->cursorColorButton->color().toQColor());
3242 cfg.setEraserCursorMainColor(
m_general->eraserCursorColorButton->color().toQColor());
3243 cfg.setPixelGridColor(
m_displaySettings->pixelGridColorButton->color().toQColor());
3244 cfg.setPixelGridDrawingThreshold(
m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
3245
3248
3249 cfg.logImportantSettings();
3251 }
3252
3254}
QButtonGroup m_pasteBehaviourGroup
QPointer< QCheckBox > m_chkEnableCanvasColorSpaceManagement
QPointer< KisSqueezedComboBox > m_canvasSurfaceBitDepth
QPointer< KisSqueezedComboBox > m_canvasSurfaceColorSpace
QList< KisSqueezedComboBox * > m_monitorProfileWidgets
WdgColorSettings * m_page
KisConfig::SessionOnStartup sessionOnStartup() const
bool kineticScrollingHiddenScrollbars()
bool renameDuplicatedLayers()
bool showCanvasMessages()
bool saveSessionOnQuit() const
int colorSamplerPreviewCircleDiameter() const
bool autoZoomTimelineToPlaybackRange()
bool renamePastedLayers()
KisConfig::ColorSamplerPreviewStyle colorSamplerPreviewStyle() const
bool kineticScrollingEnabled()
bool toolOptionsInDocker()
bool colorSamplerPreviewCircleExtraCirclesEnabled() const
bool convertToImageColorspaceOnImport()
QButtonGroup m_pasteFormatGroup
OutlineStyle eraserOutlineStyle()
bool switchSelectionCtrlAlt()
int kineticScrollingSensitivity()
KisCumulativeUndoData m_cumulativeUndoData
bool showOutlineWhilePainting()
CursorStyle eraserCursorStyle()
bool renameMergedLayers()
bool colorSamplerPreviewCircleOutlineEnabled() const
bool adaptivePlaybackRange()
OutlineStyle outlineStyle()
bool autopinLayersToTimeline()
bool showEraserOutlineWhilePainting()
CursorStyle cursorStyle()
int kineticScrollingGesture()
qreal colorSamplerPreviewCircleThickness() const
CanvasSurfaceBitDepthMode
KPageWidgetItem * getPage(Page page_enum)
void slotButtonClicked(QAbstractButton *button)
void switchTab(PageDesc tab)
void setRenameDuplicatedLayers(bool value)
void setRenameMergedLayers(bool value)
static std::optional< XcbGLProviderProtocol > xcbGlProviderProtocol()
static void setUserPreferredOpenGLRendererConfig(OpenGLRenderer renderer)
static const QString resourceLocationKey
void setOpacity(quint8 alpha)
void toQColor(QColor *c) const
a convenience method for the above.
WdgTabletSettings * m_page
int toInt(const QString &str, bool *ok=nullptr)
static KoColorSpaceRegistry * instance()
KoID colorSpaceColorDepthId(const QString &_colorSpaceId) const
KoID colorSpaceColorModelId(const QString &_colorSpaceId) const