3072{
3073 connect(this->buttonBox(), SIGNAL(clicked(QAbstractButton*)),
this, SLOT(
slotButtonClicked(QAbstractButton*)));
3074
3075 if (page.has_value()) {
3076 PageDesc page_val = page.value();
3077 setCurrentPage(
getPage(page_val.page));
3079 }
3080
3081 int retval = exec();
3082 Q_UNUSED(retval);
3083
3085
3088
3091 cfg.setSeparateEraserCursor(
m_general->m_chkSeparateEraserCursor->isChecked());
3102
3105 cfg.setForceAlwaysFullSizedOutline(!
m_general->m_changeBrushOutline->isChecked());
3107 cfg.setForceAlwaysFullSizedEraserOutline(!
m_general->m_changeEraserBrushOutline->isChecked());
3111
3112 KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
3113 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
3114
3115 cfgImage.setMaxBrushSize(
m_general->intMaxBrushSize->value());
3116 cfg.setIgnoreHighFunctionKeys(
m_general->chkIgnoreHighFunctionKeys->isChecked());
3117
3118 cfg.writeEntry<
bool>(
"use_custom_system_font",
m_general->chkUseCustomFont->isChecked());
3119 if (
m_general->chkUseCustomFont->isChecked()) {
3120 cfg.writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
3121 cfg.writeEntry<
int>(
"custom_font_size",
m_general->intFontSize->value());
3122 }
3123 else {
3124 cfg.writeEntry<QString>("custom_system_font", "");
3125 cfg.writeEntry<int>("custom_font_size", -1);
3126 }
3127
3129 cfg.setMDIBackgroundColor(
m_general->m_mdiColor->color().toXML());
3130 cfg.setMDIBackgroundImage(
m_general->m_backgroundimage->text());
3131 cfg.writeEntry<
int>(
"mdi_rubberband",
m_general->m_chkRubberBand->isChecked());
3133 cfg.writeEntry(
"autosavefileshidden",
m_general->chkHideAutosaveFiles->isChecked());
3134
3135 cfg.setBackupFile(
m_general->m_backupFileCheckBox->isChecked());
3136 cfg.writeEntry(
"backupfilelocation",
m_general->cmbBackupFileLocation->currentIndex());
3137 cfg.writeEntry(
"backupfilesuffix",
m_general->txtBackupFileSuffix->text());
3138 cfg.writeEntry(
"numberofbackupfiles",
m_general->intNumBackupFiles->value());
3139
3140
3148
3149 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
3150 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
3151 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
3152#if defined(Q_OS_WIN) && defined(HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY)
3153 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
3154#endif
3155 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
3156
3158
3159 cfg.writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
3160 cfg.writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
3161
3168
3170
3173 cfg.writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
3174 cfg.setActivateTransformToolAfterPaste(
m_general->chkEnableTransformToolAfterPaste->isChecked());
3175 cfg.setZoomHorizontal(
m_general->chkZoomHorizontally->isChecked());
3176 cfg.setSelectionActionBar(
m_general->chkEnableSelectionActionBar->isChecked());
3177
3181 cfg.setCumulativeUndoRedo(
m_general->chkCumulativeUndo->isChecked());
3183
3184
3188
3189#ifdef Q_OS_ANDROID
3190 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
3191#else
3192 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
3193#endif
3194 if (fi.isWritable()) {
3196 }
3197
3201
3202
3204 cfg.setEnableCanvasSurfaceColorSpaceManagement(
3206 cfg.setCanvasSurfaceColorSpaceManagementMode(
3210 }
3211 else {
3212 for (int i = 0; i < QApplication::screens().count(); ++i) {
3214 }
3215 }
3217 if (cfg.useDefaultColorSpace())
3218 {
3220 cfg.setWorkingColorSpace(currentWorkingColorSpace.
id());
3223 }
3224
3225 cfg.writeEntry(
"ExrDefaultColorProfile",
m_colorSettings->
m_page->cmbColorProfileForEXR->currentText());
3226
3227 cfgImage.setDefaultProofingConfig(*
m_colorSettings->
m_page->wdgProofingOptions->currentProofingConfig());
3233
3234
3236 cfg.setUseRightMiddleTabletButtonWorkaround(
3238
3239#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
3241
3242# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
3243
3244 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
3245 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
3246 nativeWindowsApp->setWinTabEnabled(!cfg.useWin8PointerInput());
3247 }
3248# endif
3249#endif
3250 cfg.writeEntry<
bool>(
"useTimestampsForBrushSpeed",
m_tabletSettings->
m_page->chkUseTimestampsForBrushSpeed->isChecked());
3251
3252#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_PAGE_UP_DOWN
3253 cfg.setUsePageUpDownMouseButtonEmulationWorkaround(
3255#endif
3256
3257#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_HIGH_FUNCTION_KEYS
3258 cfg.setUseHighFunctionKeyMouseButtonEmulationWorkaround(
3260#endif
3261
3262#if KRITA_QT_HAS_ANDROID_IGNORE_HISTORIC_TABLET_EVENTS
3263 cfg.setUseIgnoreHistoricTabletEventsWorkaround(
3265#endif
3266
3267#ifdef Q_OS_ANDROID
3269 cfg.setHideTouchAndStylusCursorsWorkaround(
3271 }
3272#endif
3273
3276
3277 cfg.writeEntry<
int>(
"tiltDirectionOffset", -
m_tabletSettings->
m_page->tiltDirectionOffsetAngle->angle());
3278
3280
3282 cfg.setCanvasState("TRY_OPENGL");
3283
3289 } else {
3291 }
3292
3295 }
3296
3297 cfg.setUseOpenGLTextureBuffer(
m_displaySettings->chkUseTextureBuffer->isChecked());
3299 cfg.setRootSurfaceFormat(&kritarc, indexToFormat(
m_displaySettings->cmbPreferedRootSurfaceFormat->currentIndex()));
3300 cfg.setAssistantsDrawMode(indexToAssistantDrawMode(
m_displaySettings->cmbAssistantsDrawMode->currentIndex()));
3301
3310 cfgImage.setSelectionOverlayMaskColor(c.
toQColor());
3311 cfgImage.setSelectionOutlineOpacity(
m_displaySettings->sldSelectionOutlineOpacity->value());
3313 cfg.setAntialiasSelectionOutline(
m_displaySettings->chkSelectionOutlineAntialiasing->isChecked());
3314 cfg.setShowSingleChannelAsColor(
m_displaySettings->chkChannelsAsColor->isChecked());
3316
3323
3324 cfg.setCursorMainColor(
m_general->cursorColorButton->color().toQColor());
3325 cfg.setEraserCursorMainColor(
m_general->eraserCursorColorButton->color().toQColor());
3326 cfg.setPixelGridColor(
m_displaySettings->pixelGridColorButton->color().toQColor());
3327 cfg.setPixelGridDrawingThreshold(
m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
3328
3331
3332 cfg.logImportantSettings();
3334 }
3335
3337}
QButtonGroup m_pasteBehaviourGroup
QPointer< QCheckBox > m_chkEnableCanvasColorSpaceManagement
QPointer< KisSqueezedComboBox > m_canvasSurfaceBitDepth
QPointer< KisSqueezedComboBox > m_canvasSurfaceColorSpace
QList< KisSqueezedComboBox * > m_monitorProfileWidgets
WdgColorSettings * m_page
QString splashScreenImage() const
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()
qreal colorSamplerZoomPreviewScale() const
bool colorSamplerPreviewCircleExtraCirclesEnabled() const
bool convertToImageColorspaceOnImport()
QButtonGroup m_pasteFormatGroup
OutlineStyle eraserOutlineStyle()
bool switchSelectionCtrlAlt()
int kineticScrollingSensitivity()
KisCumulativeUndoData m_cumulativeUndoData
bool showOutlineWhilePainting()
CursorStyle eraserCursorStyle()
KisConfig::IconsInMenu iconsInMenu() const
bool renameMergedLayers()
KisConfig::ColorSamplerPreviewCirclePosition colorSamplerPreviewCirclePosition() const
bool colorSamplerPreviewCircleOutlineEnabled() const
bool colorSamplerZoomPreviewEnabled() 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
bool canHideTouchAndStylusCursors()
int toInt(const QString &str, bool *ok=nullptr)
static KoColorSpaceRegistry * instance()
KoID colorSpaceColorDepthId(const QString &_colorSpaceId) const
KoID colorSpaceColorModelId(const QString &_colorSpaceId) const