2753{
2754 connect(this->buttonBox(), SIGNAL(clicked(QAbstractButton*)),
this, SLOT(
slotButtonClicked(QAbstractButton*)));
2755
2756 int retval = exec();
2757 Q_UNUSED(retval);
2758
2760
2763
2766 cfg.setSeparateEraserCursor(
m_general->m_chkSeparateEraserCursor->isChecked());
2774
2777 cfg.setForceAlwaysFullSizedOutline(!
m_general->m_changeBrushOutline->isChecked());
2779 cfg.setForceAlwaysFullSizedEraserOutline(!
m_general->m_changeEraserBrushOutline->isChecked());
2782
2783 KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
2784 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
2785
2786 cfgImage.setMaxBrushSize(
m_general->intMaxBrushSize->value());
2787 cfg.setIgnoreHighFunctionKeys(
m_general->chkIgnoreHighFunctionKeys->isChecked());
2788
2789 cfg.writeEntry<
bool>(
"use_custom_system_font",
m_general->chkUseCustomFont->isChecked());
2790 if (
m_general->chkUseCustomFont->isChecked()) {
2791 cfg.writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
2792 cfg.writeEntry<
int>(
"custom_font_size",
m_general->intFontSize->value());
2793 }
2794 else {
2795 cfg.writeEntry<QString>("custom_system_font", "");
2796 cfg.writeEntry<int>("custom_font_size", -1);
2797 }
2798
2800 cfg.setMDIBackgroundColor(
m_general->m_mdiColor->color().toXML());
2801 cfg.setMDIBackgroundImage(
m_general->m_backgroundimage->text());
2802 cfg.writeEntry<
int>(
"mdi_rubberband",
m_general->m_chkRubberBand->isChecked());
2804 cfg.writeEntry(
"autosavefileshidden",
m_general->chkHideAutosaveFiles->isChecked());
2805
2806 cfg.setBackupFile(
m_general->m_backupFileCheckBox->isChecked());
2807 cfg.writeEntry(
"backupfilelocation",
m_general->cmbBackupFileLocation->currentIndex());
2808 cfg.writeEntry(
"backupfilesuffix",
m_general->txtBackupFileSuffix->text());
2809 cfg.writeEntry(
"numberofbackupfiles",
m_general->intNumBackupFiles->value());
2810
2811
2819
2820 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2821 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
2822 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
2823#if defined(Q_OS_WIN) && defined(HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY)
2824 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
2825#endif
2826 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
2827
2829
2830 cfg.writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
2831 cfg.writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
2832
2839
2841
2844 cfg.writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
2845 cfg.setActivateTransformToolAfterPaste(
m_general->chkEnableTransformToolAfterPaste->isChecked());
2846 cfg.setZoomHorizontal(
m_general->chkZoomHorizontally->isChecked());
2847 cfg.setSelectionActionBar(
m_general->chkEnableSelectionActionBar->isChecked());
2850 cfg.setCumulativeUndoRedo(
m_general->chkCumulativeUndo->isChecked());
2852
2853
2857
2858#ifdef Q_OS_ANDROID
2859 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
2860#else
2861 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
2862#endif
2863 if (fi.isWritable()) {
2865 }
2866
2870
2871
2874 for (int i = 0; i < QApplication::screens().count(); ++i) {
2878 cfg.setMonitorForScreen(i, monitorid);
2879 } else {
2880 cfg.setMonitorProfile(i,
2883 }
2884 }
2885 } else {
2889 }
2891 if (cfg.useDefaultColorSpace())
2892 {
2894 cfg.setWorkingColorSpace(currentWorkingColorSpace.
id());
2897 }
2898
2899 cfg.writeEntry(
"ExrDefaultColorProfile",
m_colorSettings->
m_page->cmbColorProfileForEXR->currentText());
2900
2901 cfgImage.setDefaultProofingConfig(*
m_colorSettings->
m_page->wdgProofingOptions->currentProofingConfig());
2907
2908
2910 cfg.setUseRightMiddleTabletButtonWorkaround(
2912
2913#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
2915
2916# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2917
2918 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
2919 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
2920 nativeWindowsApp->setWinTabEnabled(!cfg.useWin8PointerInput());
2921 }
2922# endif
2923#endif
2924 cfg.writeEntry<
bool>(
"useTimestampsForBrushSpeed",
m_tabletSettings->
m_page->chkUseTimestampsForBrushSpeed->isChecked());
2925
2926#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_PAGE_UP_DOWN
2927 cfg.setUsePageUpDownMouseButtonEmulationWorkaround(
2929#endif
2930
2931#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_HIGH_FUNCTION_KEYS
2932 cfg.setUseHighFunctionKeyMouseButtonEmulationWorkaround(
2934#endif
2935
2936#if KRITA_QT_HAS_ANDROID_IGNORE_HISTORIC_TABLET_EVENTS
2937 cfg.setUseIgnoreHistoricTabletEventsWorkaround(
2939#endif
2940
2943
2944 cfg.writeEntry<
int>(
"tiltDirectionOffset", -
m_tabletSettings->
m_page->tiltDirectionOffsetAngle->angle());
2945
2947
2949 cfg.setCanvasState("TRY_OPENGL");
2950
2956 } else {
2958 }
2959
2962 }
2963
2964 cfg.setUseOpenGLTextureBuffer(
m_displaySettings->chkUseTextureBuffer->isChecked());
2966 cfg.setRootSurfaceFormat(&kritarc, indexToFormat(
m_displaySettings->cmbPreferedRootSurfaceFormat->currentIndex()));
2967 cfg.setAssistantsDrawMode(indexToAssistantDrawMode(
m_displaySettings->cmbAssistantsDrawMode->currentIndex()));
2968
2977 cfgImage.setSelectionOverlayMaskColor(c.
toQColor());
2978 cfgImage.setSelectionOutlineOpacity(
m_displaySettings->sldSelectionOutlineOpacity->value());
2980 cfg.setAntialiasSelectionOutline(
m_displaySettings->chkSelectionOutlineAntialiasing->isChecked());
2981 cfg.setShowSingleChannelAsColor(
m_displaySettings->chkChannelsAsColor->isChecked());
2983
2990
2991 cfg.setCursorMainColor(
m_general->cursorColorButton->color().toQColor());
2992 cfg.setEraserCursorMainColor(
m_general->eraserCursorColorButton->color().toQColor());
2993 cfg.setPixelGridColor(
m_displaySettings->pixelGridColorButton->color().toQColor());
2994 cfg.setPixelGridDrawingThreshold(
m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
2995
2998
2999 cfg.logImportantSettings();
3001 }
3002
3004}
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
void slotButtonClicked(QAbstractButton *button)
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