2741{
2742 connect(this->buttonBox(), SIGNAL(clicked(QAbstractButton*)),
this, SLOT(
slotButtonClicked(QAbstractButton*)));
2743
2744 int retval = exec();
2745 Q_UNUSED(retval);
2746
2748
2751
2754 cfg.setSeparateEraserCursor(
m_general->m_chkSeparateEraserCursor->isChecked());
2762
2765 cfg.setForceAlwaysFullSizedOutline(!
m_general->m_changeBrushOutline->isChecked());
2767 cfg.setForceAlwaysFullSizedEraserOutline(!
m_general->m_changeEraserBrushOutline->isChecked());
2770
2771 KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
2772 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
2773
2774 cfgImage.setMaxBrushSize(
m_general->intMaxBrushSize->value());
2775 cfg.setIgnoreHighFunctionKeys(
m_general->chkIgnoreHighFunctionKeys->isChecked());
2776
2777 cfg.writeEntry<
bool>(
"use_custom_system_font",
m_general->chkUseCustomFont->isChecked());
2778 if (
m_general->chkUseCustomFont->isChecked()) {
2779 cfg.writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
2780 cfg.writeEntry<
int>(
"custom_font_size",
m_general->intFontSize->value());
2781 }
2782 else {
2783 cfg.writeEntry<QString>("custom_system_font", "");
2784 cfg.writeEntry<int>("custom_font_size", -1);
2785 }
2786
2788 cfg.setMDIBackgroundColor(
m_general->m_mdiColor->color().toXML());
2789 cfg.setMDIBackgroundImage(
m_general->m_backgroundimage->text());
2790 cfg.writeEntry<
int>(
"mdi_rubberband",
m_general->m_chkRubberBand->isChecked());
2792 cfg.writeEntry(
"autosavefileshidden",
m_general->chkHideAutosaveFiles->isChecked());
2793
2794 cfg.setBackupFile(
m_general->m_backupFileCheckBox->isChecked());
2795 cfg.writeEntry(
"backupfilelocation",
m_general->cmbBackupFileLocation->currentIndex());
2796 cfg.writeEntry(
"backupfilesuffix",
m_general->txtBackupFileSuffix->text());
2797 cfg.writeEntry(
"numberofbackupfiles",
m_general->intNumBackupFiles->value());
2798
2799
2807
2808 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2809 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
2810 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
2811#ifdef HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY
2812 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
2813#endif
2814 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
2815
2817
2818 cfg.writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
2819 cfg.writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
2820
2827
2829
2832 cfg.writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
2833 cfg.setActivateTransformToolAfterPaste(
m_general->chkEnableTransformToolAfterPaste->isChecked());
2834 cfg.setZoomHorizontal(
m_general->chkZoomHorizontally->isChecked());
2835 cfg.setSelectionActionBar(
m_general->chkEnableSelectionActionBar->isChecked());
2838 cfg.setCumulativeUndoRedo(
m_general->chkCumulativeUndo->isChecked());
2840
2841
2845
2846#ifdef Q_OS_ANDROID
2847 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
2848#else
2849 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
2850#endif
2851 if (fi.isWritable()) {
2853 }
2854
2858
2859
2862 for (int i = 0; i < QApplication::screens().count(); ++i) {
2866 cfg.setMonitorForScreen(i, monitorid);
2867 } else {
2868 cfg.setMonitorProfile(i,
2871 }
2872 }
2873 } else {
2877 }
2879 if (cfg.useDefaultColorSpace())
2880 {
2882 cfg.setWorkingColorSpace(currentWorkingColorSpace.
id());
2885 }
2886
2887 cfg.writeEntry(
"ExrDefaultColorProfile",
m_colorSettings->
m_page->cmbColorProfileForEXR->currentText());
2888
2889 cfgImage.setDefaultProofingConfig(*
m_colorSettings->
m_page->wdgProofingOptions->currentProofingConfig());
2895
2896
2898 cfg.setUseRightMiddleTabletButtonWorkaround(
2900
2901#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
2903
2904# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2905
2906 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
2907 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
2908 nativeWindowsApp->setWinTabEnabled(!cfg.useWin8PointerInput());
2909 }
2910# endif
2911#endif
2912 cfg.writeEntry<
bool>(
"useTimestampsForBrushSpeed",
m_tabletSettings->
m_page->chkUseTimestampsForBrushSpeed->isChecked());
2913
2914#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_PAGE_UP_DOWN
2915 cfg.setUsePageUpDownMouseButtonEmulationWorkaround(
2917#endif
2918
2919#if KRITA_QT_HAS_ANDROID_IGNORE_HISTORIC_TABLET_EVENTS
2920 cfg.setUseIgnoreHistoricTabletEventsWorkaround(
2922#endif
2923
2926
2927 cfg.writeEntry<
int>(
"tiltDirectionOffset", -
m_tabletSettings->
m_page->tiltDirectionOffsetAngle->angle());
2928
2930
2932 cfg.setCanvasState("TRY_OPENGL");
2933
2939 } else {
2941 }
2942
2945 }
2946
2947 cfg.setUseOpenGLTextureBuffer(
m_displaySettings->chkUseTextureBuffer->isChecked());
2949 cfg.setRootSurfaceFormat(&kritarc, indexToFormat(
m_displaySettings->cmbPreferedRootSurfaceFormat->currentIndex()));
2950 cfg.setAssistantsDrawMode(indexToAssistantDrawMode(
m_displaySettings->cmbAssistantsDrawMode->currentIndex()));
2951
2960 cfgImage.setSelectionOverlayMaskColor(c.
toQColor());
2961 cfgImage.setSelectionOutlineOpacity(
m_displaySettings->sldSelectionOutlineOpacity->value());
2963 cfg.setAntialiasSelectionOutline(
m_displaySettings->chkSelectionOutlineAntialiasing->isChecked());
2964 cfg.setShowSingleChannelAsColor(
m_displaySettings->chkChannelsAsColor->isChecked());
2966
2973
2974 cfg.setCursorMainColor(
m_general->cursorColorButton->color().toQColor());
2975 cfg.setEraserCursorMainColor(
m_general->eraserCursorColorButton->color().toQColor());
2976 cfg.setPixelGridColor(
m_displaySettings->pixelGridColorButton->color().toQColor());
2977 cfg.setPixelGridDrawingThreshold(
m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
2978
2981
2982 cfg.logImportantSettings();
2984 }
2985
2987}
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