2698{
2699 connect(this->buttonBox(), SIGNAL(clicked(QAbstractButton*)),
this, SLOT(
slotButtonClicked(QAbstractButton*)));
2700
2701 int retval = exec();
2702 Q_UNUSED(retval);
2703
2705
2708
2711 cfg.setSeparateEraserCursor(
m_general->m_chkSeparateEraserCursor->isChecked());
2719
2722 cfg.setForceAlwaysFullSizedOutline(!
m_general->m_changeBrushOutline->isChecked());
2724 cfg.setForceAlwaysFullSizedEraserOutline(!
m_general->m_changeEraserBrushOutline->isChecked());
2727
2728 KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
2729 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
2730
2731 cfgImage.setMaxBrushSize(
m_general->intMaxBrushSize->value());
2732 cfg.setIgnoreHighFunctionKeys(
m_general->chkIgnoreHighFunctionKeys->isChecked());
2733
2734 cfg.writeEntry<
bool>(
"use_custom_system_font",
m_general->chkUseCustomFont->isChecked());
2735 if (
m_general->chkUseCustomFont->isChecked()) {
2736 cfg.writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
2737 cfg.writeEntry<
int>(
"custom_font_size",
m_general->intFontSize->value());
2738 }
2739 else {
2740 cfg.writeEntry<QString>("custom_system_font", "");
2741 cfg.writeEntry<int>("custom_font_size", -1);
2742 }
2743
2745 cfg.setMDIBackgroundColor(
m_general->m_mdiColor->color().toXML());
2746 cfg.setMDIBackgroundImage(
m_general->m_backgroundimage->text());
2747 cfg.writeEntry<
int>(
"mdi_rubberband",
m_general->m_chkRubberBand->isChecked());
2749 cfg.writeEntry(
"autosavefileshidden",
m_general->chkHideAutosaveFiles->isChecked());
2750
2751 cfg.setBackupFile(
m_general->m_backupFileCheckBox->isChecked());
2752 cfg.writeEntry(
"backupfilelocation",
m_general->cmbBackupFileLocation->currentIndex());
2753 cfg.writeEntry(
"backupfilesuffix",
m_general->txtBackupFileSuffix->text());
2754 cfg.writeEntry(
"numberofbackupfiles",
m_general->intNumBackupFiles->value());
2755
2756
2764
2765 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2766 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
2767 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
2768#ifdef HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY
2769 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
2770#endif
2771 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
2772
2774
2775 cfg.writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
2776 cfg.writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
2777
2784
2786
2789 cfg.writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
2790 cfg.setActivateTransformToolAfterPaste(
m_general->chkEnableTransformToolAfterPaste->isChecked());
2791 cfg.setZoomHorizontal(
m_general->chkZoomHorizontally->isChecked());
2792 cfg.setSelectionActionBar(
m_general->chkEnableSelectionActionBar->isChecked());
2795 cfg.setCumulativeUndoRedo(
m_general->chkCumulativeUndo->isChecked());
2797
2798
2802
2803#ifdef Q_OS_ANDROID
2804 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
2805#else
2806 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
2807#endif
2808 if (fi.isWritable()) {
2810 }
2811
2815
2816
2819 for (int i = 0; i < QApplication::screens().count(); ++i) {
2823 cfg.setMonitorForScreen(i, monitorid);
2824 } else {
2825 cfg.setMonitorProfile(i,
2828 }
2829 }
2830 } else {
2834 }
2836 if (cfg.useDefaultColorSpace())
2837 {
2839 cfg.setWorkingColorSpace(currentWorkingColorSpace.
id());
2842 }
2843
2844 cfg.writeEntry(
"ExrDefaultColorProfile",
m_colorSettings->
m_page->cmbColorProfileForEXR->currentText());
2845
2846 cfgImage.setDefaultProofingConfig(*
m_colorSettings->
m_page->wdgProofingOptions->currentProofingConfig());
2852
2853
2855 cfg.setUseRightMiddleTabletButtonWorkaround(
2857
2858#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
2860
2861# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2862
2863 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
2864 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
2865 nativeWindowsApp->setWinTabEnabled(!cfg.useWin8PointerInput());
2866 }
2867# endif
2868#endif
2869 cfg.writeEntry<
bool>(
"useTimestampsForBrushSpeed",
m_tabletSettings->
m_page->chkUseTimestampsForBrushSpeed->isChecked());
2870
2871#if KRITA_QT_HAS_ANDROID_EMULATE_MOUSE_BUTTONS_FOR_PAGE_UP_DOWN
2872 cfg.setUsePageUpDownMouseButtonEmulationWorkaround(
2874#endif
2875
2876#if KRITA_QT_HAS_ANDROID_IGNORE_HISTORIC_TABLET_EVENTS
2877 cfg.setUseIgnoreHistoricTabletEventsWorkaround(
2879#endif
2880
2883
2884 cfg.writeEntry<
int>(
"tiltDirectionOffset", -
m_tabletSettings->
m_page->tiltDirectionOffsetAngle->angle());
2885
2887
2889 cfg.setCanvasState("TRY_OPENGL");
2890
2896 } else {
2898 }
2899
2900 cfg.setUseOpenGLTextureBuffer(
m_displaySettings->chkUseTextureBuffer->isChecked());
2902 cfg.setRootSurfaceFormat(&kritarc, indexToFormat(
m_displaySettings->cmbPreferedRootSurfaceFormat->currentIndex()));
2903 cfg.setAssistantsDrawMode(indexToAssistantDrawMode(
m_displaySettings->cmbAssistantsDrawMode->currentIndex()));
2904
2913 cfgImage.setSelectionOverlayMaskColor(c.
toQColor());
2914 cfgImage.setSelectionOutlineOpacity(
m_displaySettings->sldSelectionOutlineOpacity->value());
2916 cfg.setAntialiasSelectionOutline(
m_displaySettings->chkSelectionOutlineAntialiasing->isChecked());
2917 cfg.setShowSingleChannelAsColor(
m_displaySettings->chkChannelsAsColor->isChecked());
2919
2926
2927 cfg.setCursorMainColor(
m_general->cursorColorButton->color().toQColor());
2928 cfg.setEraserCursorMainColor(
m_general->eraserCursorColorButton->color().toQColor());
2929 cfg.setPixelGridColor(
m_displaySettings->pixelGridColorButton->color().toQColor());
2930 cfg.setPixelGridDrawingThreshold(
m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
2931
2934
2935 cfg.logImportantSettings();
2937 }
2938
2940}
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 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