2565{
2567
2568 int retval = exec();
2569 Q_UNUSED(retval);
2570
2572
2575
2578 cfg.setSeparateEraserCursor(
m_general->m_chkSeparateEraserCursor->isChecked());
2583 cfg.setForceAlwaysFullSizedOutline(!
m_general->m_changeBrushOutline->isChecked());
2585 cfg.setForceAlwaysFullSizedEraserOutline(!
m_general->m_changeEraserBrushOutline->isChecked());
2588
2589 KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
2590 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
2591
2592 cfgImage.setMaxBrushSize(
m_general->intMaxBrushSize->value());
2593 cfg.setIgnoreHighFunctionKeys(
m_general->chkIgnoreHighFunctionKeys->isChecked());
2594
2595 cfg.writeEntry<
bool>(
"use_custom_system_font",
m_general->chkUseCustomFont->isChecked());
2596 if (
m_general->chkUseCustomFont->isChecked()) {
2597 cfg.writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
2598 cfg.writeEntry<
int>(
"custom_font_size",
m_general->intFontSize->value());
2599 }
2600 else {
2601 cfg.writeEntry<QString>("custom_system_font", "");
2602 cfg.writeEntry<int>("custom_font_size", -1);
2603 }
2604
2606 cfg.setMDIBackgroundColor(
m_general->m_mdiColor->color().toXML());
2607 cfg.setMDIBackgroundImage(
m_general->m_backgroundimage->text());
2608 cfg.writeEntry<
int>(
"mdi_rubberband",
m_general->m_chkRubberBand->isChecked());
2610 cfg.writeEntry(
"autosavefileshidden",
m_general->chkHideAutosaveFiles->isChecked());
2611
2612 cfg.setBackupFile(
m_general->m_backupFileCheckBox->isChecked());
2613 cfg.writeEntry(
"backupfilelocation",
m_general->cmbBackupFileLocation->currentIndex());
2614 cfg.writeEntry(
"backupfilesuffix",
m_general->txtBackupFileSuffix->text());
2615 cfg.writeEntry(
"numberofbackupfiles",
m_general->intNumBackupFiles->value());
2616
2617
2625
2626 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2627 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
2628 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
2629#ifdef HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY
2630 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
2631#endif
2632 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
2633
2635
2636 cfg.writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
2637 cfg.writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
2638
2645
2647
2650 cfg.writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
2651 cfg.setActivateTransformToolAfterPaste(
m_general->chkEnableTransformToolAfterPaste->isChecked());
2652 cfg.setZoomHorizontal(
m_general->chkZoomHorizontally->isChecked());
2653 cfg.setSelectionActionBar(
m_general->chkEnableSelectionActionBar->isChecked());
2656 cfg.setCumulativeUndoRedo(
m_general->chkCumulativeUndo->isChecked());
2658
2659
2663
2664#ifdef Q_OS_ANDROID
2665 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
2666#else
2667 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
2668#endif
2669 if (fi.isWritable()) {
2671 }
2672
2676
2677
2680 for (int i = 0; i < QApplication::screens().count(); ++i) {
2684 cfg.setMonitorForScreen(i, monitorid);
2685 } else {
2686 cfg.setMonitorProfile(i,
2689 }
2690 }
2691 } else {
2695 }
2697 if (cfg.useDefaultColorSpace())
2698 {
2700 cfg.setWorkingColorSpace(currentWorkingColorSpace.
id());
2703 }
2704
2705 cfg.writeEntry(
"ExrDefaultColorProfile",
m_colorSettings->
m_page->cmbColorProfileForEXR->currentText());
2706
2707 cfgImage.setDefaultProofingConfig(*
m_colorSettings->
m_page->wdgProofingOptions->currentProofingConfig());
2713
2714
2716 cfg.setUseRightMiddleTabletButtonWorkaround(
2718
2719#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
2721
2722# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2723
2724 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
2725 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
2726 nativeWindowsApp->setWinTabEnabled(!cfg.useWin8PointerInput());
2727 }
2728# endif
2729#endif
2730 cfg.writeEntry<
bool>(
"useTimestampsForBrushSpeed",
m_tabletSettings->
m_page->chkUseTimestampsForBrushSpeed->isChecked());
2733
2734 cfg.writeEntry<
int>(
"tiltDirectionOffset", -
m_tabletSettings->
m_page->tiltDirectionOffsetAngle->angle());
2735
2737
2739 cfg.setCanvasState("TRY_OPENGL");
2740
2746 } else {
2748 }
2749
2750 cfg.setUseOpenGLTextureBuffer(
m_displaySettings->chkUseTextureBuffer->isChecked());
2752 cfg.setRootSurfaceFormat(&kritarc, indexToFormat(
m_displaySettings->cmbPreferedRootSurfaceFormat->currentIndex()));
2753 cfg.setAssistantsDrawMode(indexToAssistantDrawMode(
m_displaySettings->cmbAssistantsDrawMode->currentIndex()));
2754
2763 cfgImage.setSelectionOverlayMaskColor(c.
toQColor());
2764 cfgImage.setSelectionOutlineOpacity(
m_displaySettings->sldSelectionOutlineOpacity->value());
2766 cfg.setAntialiasSelectionOutline(
m_displaySettings->chkSelectionOutlineAntialiasing->isChecked());
2767 cfg.setShowSingleChannelAsColor(
m_displaySettings->chkChannelsAsColor->isChecked());
2769
2776
2777 cfg.setCursorMainColor(
m_general->cursorColorButton->color().toQColor());
2778 cfg.setEraserCursorMainColor(
m_general->eraserCursorColorButton->color().toQColor());
2779 cfg.setPixelGridColor(
m_displaySettings->pixelGridColorButton->color().toQColor());
2780 cfg.setPixelGridDrawingThreshold(
m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
2781
2784
2785 cfg.logImportantSettings();
2787 }
2788
2790}
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
bool autoZoomTimelineToPlaybackRange()
bool renamePastedLayers()
bool kineticScrollingEnabled()
bool toolOptionsInDocker()
bool convertToImageColorspaceOnImport()
QButtonGroup m_pasteFormatGroup
OutlineStyle eraserOutlineStyle()
bool switchSelectionCtrlAlt()
int kineticScrollingSensitivity()
KisCumulativeUndoData m_cumulativeUndoData
bool showOutlineWhilePainting()
CursorStyle eraserCursorStyle()
bool renameMergedLayers()
bool adaptivePlaybackRange()
OutlineStyle outlineStyle()
bool autopinLayersToTimeline()
bool showEraserOutlineWhilePainting()
CursorStyle cursorStyle()
int kineticScrollingGesture()
CanvasSurfaceBitDepthMode
void slotButtonClicked(QAbstractButton *button)
void setRenameDuplicatedLayers(bool value)
void setRenameMergedLayers(bool value)
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