Krita Source Code Documentation
Loading...
Searching...
No Matches
KisConfig Class Reference

#include <kis_config.h>

Public Types

enum  AssistantsDrawMode { ASSISTANTS_DRAW_MODE_DIRECT = 0 , ASSISTANTS_DRAW_MODE_PIXMAP_CACHE = 1 , ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE = 2 }
 
enum  BackgroundStyle { RASTER_LAYER = 0 , CANVAS_COLOR = 1 , FILL_LAYER = 2 }
 
enum class  CanvasSurfaceBitDepthMode { DepthAuto = 0 , Depth8Bit , Depth10Bit }
 
enum class  CanvasSurfaceMode {
  Preferred = 0 , Rec709g22 , Rec709g10 , Rec2020pq ,
  Unmanaged
}
 
enum class  ColorSamplerPreviewCirclePosition {
  Center , Top , TopLeft , TopRight ,
  Count
}
 
enum class  ColorSamplerPreviewStyle {
  None , Circle , RectangleLeft , RectangleRight ,
  RectangleAbove , Count
}
 
enum  IconsInMenu { IIM_Default , IIM_Yes , IIM_No }
 
enum  LayerInfoTextStyle { INFOTEXT_NONE = 0 , INFOTEXT_SIMPLE , INFOTEXT_BALANCED , INFOTEXT_DETAILED }
 
enum  OcioColorManagementMode { INTERNAL = 0 , OCIO_CONFIG , OCIO_ENVIRONMENT }
 
enum  RootSurfaceFormat { BT709_G22 = 0 , BT709_G10 , BT2020_PQ }
 
enum  SelectionActionsBarBehavior { FreeFloating = 0 , Fixed }
 
enum  SelectionActionsBarOrientation { Horizontal = 0 , Vertical }
 
enum  SelectionActionsBarPosition {
  Bottom = 0 , BottomLeft , BottomRight , Left ,
  Right , Top , TopLeft , TopRight
}
 
enum  SessionOnStartup { SOS_BlankSession , SOS_PreviousSession , SOS_ShowSessionManager }
 
enum  TouchPainting { TOUCH_PAINTING_AUTO , TOUCH_PAINTING_ENABLED , TOUCH_PAINTING_DISABLED }
 

Public Slots

void logImportantSettings () const
 Log the most interesting settings to the usage log.
 

Public Member Functions

bool activateTransformToolAfterPaste (bool defaultValue=false) const
 
bool adaptivePlaybackRange (bool defaultValue=false) const
 
bool allowLCMSOptimization (bool defaultValue=false) const
 
bool animationDropFrames (bool defaultValue=false) const
 
int animationPlaybackBackend (bool defaultValue=false) const
 
bool antialiasCurves (bool defaultValue=false) const
 
bool antialiasSelectionOutline (bool defaultValue=false) const
 
AssistantsDrawMode assistantsDrawMode (bool defaultValue=false) const
 
int audioOffsetTolerance (bool defaultValue=false) const
 
bool autoPinLayersToTimeline (bool defaultValue=false) const
 
int autoSaveInterval (bool defaultValue=false) const
 
bool autoSmoothBezierCurves (bool defaultValue=false) const
 
bool autoZoomTimelineToPlaybackRange (bool defaultValue=false) const
 
bool backupFile (bool defaultValue=false) const
 
QString brushHudSetting (bool defaultValue=false) const
 
bool calculateAnimationCacheInBackground (bool defaultValue=false) const
 
QColor canvasBorderColor (bool defaultValue=false) const
 
QString canvasState (bool defaultValue=false) const
 
CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode (bool defaultValue=false) const
 
CanvasSurfaceMode canvasSurfaceColorSpaceManagementMode (bool defaultValue=false) const
 
QColor checkersColor1 (bool defaultValue=false) const
 
QColor checkersColor2 (bool defaultValue=false) const
 
qint32 checkSize (bool defaultValue=false) const
 
bool clicklessSpacePan (bool defaultValue=false) const
 
bool colorHistoryPerDocument (bool defaultValue=false) const
 
int colorSamplerPreviewCircleDiameter (bool defaultValue=false) const
 
bool colorSamplerPreviewCircleExtraCirclesEnabled (bool defaultValue=false) const
 
bool colorSamplerPreviewCircleOutlineEnabled (bool defaultValue=false) const
 
ColorSamplerPreviewCirclePosition colorSamplerPreviewCirclePosition (bool defaultValue=false) const
 
qreal colorSamplerPreviewCircleThickness (bool defaultValue=false) const
 
ColorSamplerPreviewStyle colorSamplerPreviewStyle (bool defaultValue=false) const
 
bool colorSamplerZoomPreviewEnabled (bool defaultValue=false) const
 
qreal colorSamplerZoomPreviewScale (bool defaultValue=false) const
 
bool compressKra (bool defaultValue=false) const
 
bool convertLayerColorSpaceInProperties (bool defaultValue=false) const
 
bool convertToImageColorspaceOnImport (bool defaultValue=false) const
 
KisCumulativeUndoData cumulativeUndoData (bool defaultValue=false) const
 
QString currentInputProfile (bool defaultValue=false) const
 
const KoColorSpace * customColorSelectorColorSpace (bool defaultValue=false) const
 
QColor defaultAssistantsColor (bool defaultValue=false) const
 
QColor defaultBackgroundColor (const QLatin1String &dialogType, bool defaultValue=false) const
 
quint8 defaultBackgroundOpacity (const QLatin1String &dialogType, bool defaultValue=false) const
 
BackgroundStyle defaultBackgroundStyle (const QLatin1String &dialogType, bool defaultValue=false) const
 
QString defaultColorDepth (bool defaultValue=false) const
 
QString defaultPalette (bool defaultValue=false) const
 
QString defColorModel (bool defaultValue=false) const
 
void defColorModel (const QString &model) const
 
QString defColorProfile (bool defaultValue=false) const
 
void defColorProfile (const QString &depth) const
 
qint32 defImageHeight (bool defaultValue=false) const
 
void defImageHeight (qint32 height) const
 
qreal defImageResolution (bool defaultValue=false) const
 
void defImageResolution (qreal res) const
 
qint32 defImageWidth (bool defaultValue=false) const
 
void defImageWidth (qint32 width) const
 
bool disableAVXOptimizations (bool defaultValue=false) const
 
void disableOpenGL () const
 
bool disableTouchOnCanvas () const
 
bool disableVectorOptimizations (bool defaultValue=false) const
 
const KoColorProfile * displayProfile (int screen) const
 
CanvasSurfaceBitDepthMode effectiveCanvasSurfaceBitDepthMode (const QSurfaceFormat &format) const
 
bool effectiveShouldUseNativeSurfaceForCanvas (bool osManagedSurfacePresent) const
 
bool enableBrushSpeedLogging (bool defaultValue=false) const
 
bool enableCanvasSurfaceColorSpaceManagement (bool defaultValue=false) const
 
bool enableOpenGLFramerateLogging (bool defaultValue=false) const
 
void enablePixelGrid (bool v) const
 
CursorStyle eraserCursorStyle (bool defaultValue=false) const
 
OutlineStyle eraserOutlineStyle (bool defaultValue=false) const
 
KisPropertiesConfigurationSP exportConfiguration (const QString &filterId, bool defaultValue=false) const
 
QString exportConfigurationXML (const QString &filterId, bool defaultValue=false) const
 
QString exportMimeType (bool defaultValue) const
 
QStringList favoriteCompositeOps (bool defaultValue=false) const
 
int favoritePresets (bool defaultValue=false) const
 
QString ffmpegLocation (bool defaultValue=false) const
 
bool firstRun (bool defaultValue=false) const
 
bool forceAlwaysFullSizedEraserOutline (bool defaultValue=false) const
 
bool forceAlwaysFullSizedOutline (bool defaultValue=false) const
 
bool forceOpenGLFenceWorkaround (bool defaultValue=false) const
 
bool forcePaletteColors (bool defaultValue=false) const
 
bool forceShowAutosaveMessages (bool defaultValue=true) const
 
bool forceShowSaveMessages (bool defaultValue=true) const
 
bool fullscreenMode (bool defaultValue=false) const
 
QColor getCursorMainColor (bool defaultValue=false) const
 
QPoint getDefaultGridSpacing (bool defaultValue=false) const
 
QColor getEraserCursorMainColor (bool defaultValue=false) const
 
QColor getGridIsoVerticalColor (bool defaultValue=false) const
 
quint32 getGridIsoVerticalStyle (bool defaultValue=false) const
 
QColor getGridMainColor (bool defaultValue=false) const
 
quint32 getGridMainStyle (bool defaultValue=false) const
 
QColor getGridSubdivisionColor (bool defaultValue=false) const
 
quint32 getGridSubdivisionStyle (bool defaultValue=false) const
 
QString getMDIBackgroundColor (bool defaultValue=false) const
 
QString getMDIBackgroundImage (bool defaultValue=false) const
 
QColor getPixelGridColor (bool defaultValue=false) const
 
qreal getPixelGridDrawingThreshold (bool defaultValue=false) const
 
const QString getScreenStringIdentfier (int screenNo) const
 
QColor guidesColor (bool defaultValue=false) const
 
quint32 guidesLineStyle (bool defaultValue=false) const
 
bool hideDevFundBanner (bool defaultValue=false) const
 
bool hideDockersFullscreen (bool defaultValue=false) const
 
bool hideMenuFullscreen (bool defaultValue=false) const
 
bool hidePopups (bool defaultValue=false) const
 
bool hideScrollbars (bool defaultValue=false) const
 
bool hideScrollbarsFullscreen (bool defaultValue=false) const
 
bool hideStatusbarFullscreen (bool defaultValue=false) const
 
bool hideTitlebarFullscreen (bool defaultValue=false) const
 
bool hideToolbarFullscreen (bool defaultValue=false) const
 
int horizontalSplitLines (bool defaultValue=false) const
 
IconsInMenu iconsInMenu (bool defaultValue=false) const
 
bool ignoreHighFunctionKeys (bool defaultValue=false) const
 
QString importConfiguration (const QString &filterId, bool defaultValue=false) const
 
QString importProfile (bool defaultValue=false) const
 
bool kineticScrollingEnabled (bool defaultValue=false) const
 
int kineticScrollingGesture (bool defaultValue=false) const
 
bool kineticScrollingHiddenScrollbars (bool defaultValue=false) const
 
int kineticScrollingSensitivity (bool defaultValue=false) const
 
 KisConfig (bool readOnly)
 KisConfig create a kisconfig object.
 
OutlineStyle lastUsedOutlineStyle (bool defaultValue=false) const
 
int layerInfoTextOpacity (bool defaultValue=false) const
 
LayerInfoTextStyle layerInfoTextStyle (bool defaultValue=false) const
 
int layerThumbnailGenerationTimeout (bool defaultValue=false) const
 
int layerThumbnailSize (bool defaultValue=false) const
 
int layerTreeIndentation (bool defaultValue=false) const
 
bool levelOfDetailEnabled (bool defaultValue=false) const
 
qreal lineSmoothingDelayDistance (bool defaultValue=false) const
 
bool lineSmoothingDistanceKeepAspectRatio (bool defaultValue=false) const
 
qreal lineSmoothingDistanceMax (bool defaultValue=false) const
 
qreal lineSmoothingDistanceMin (bool defaultValue=false) const
 
bool lineSmoothingFinishStabilizedCurve (bool defaultValue=false) const
 
bool lineSmoothingScalableDistance (bool defaultValue=false) const
 
bool lineSmoothingSmoothPressure (bool defaultValue=false) const
 
bool lineSmoothingStabilizeSensors (bool defaultValue=false) const
 
qreal lineSmoothingTailAggressiveness (bool defaultValue=false) const
 
int lineSmoothingType (bool defaultValue=false) const
 
bool lineSmoothingUseDelayDistance (bool defaultValue=false) const
 
void loadSnapConfig (KisSnapConfig *config, bool defaultValue=false) const
 
bool longPressEnabled (bool defaultValue=false) const
 
QString monitorProfile (int screen) const
 get the profile the user has selected for the given screen
 
qint32 monitorRenderIntent (bool defaultValue=false) const
 
CursorStyle newCursorStyle (bool defaultValue=false) const
 
OutlineStyle newOutlineStyle (bool defaultValue=false) const
 
bool newsCheckEnabled () const
 
bool newsFirstStartup () const
 
int numDefaultLayers (const QLatin1String &dialogType, bool defaultValue=false) const
 
int numMipmapLevels (bool defaultValue=false) const
 
OcioColorManagementMode ocioColorManagementMode (bool defaultValue=false) const
 
KisOcioConfiguration ocioConfiguration (bool defaultValue=false) const
 
bool ocioLockColorVisualRepresentation (bool defaultValue=false) const
 
int ocioLutEdgeSize (bool defaultValue=false) const
 
int openGLFilteringMode (bool defaultValue=false) const
 
int openGLTextureSize (bool defaultValue=false) const
 
qreal outlineSizeMinimum (bool defaultValue=false) const
 
bool paintopPopupDetached (bool defaultValue=false) const
 
qint32 pasteBehaviour (bool defaultValue=false) const
 
qint32 pasteFormat (bool defaultValue) const
 
bool pixelGridEnabled (bool defaultValue=false) const
 
int preferredVectorImportResolutionPPI (bool defaultValue=false) const
 
bool preferXcbEglProvider (bool defaultValue=false) const
 
int presetChooserViewMode (bool defaultValue=false) const
 
int presetIconSize (bool defaultValue=false) const
 
bool presetStripVisible (bool defaultValue=false) const
 
QString pressureTabletCurve (bool defaultValue=false) const
 
QString printerColorSpace (bool defaultValue=false) const
 
QString printerProfile (bool defaultValue=false) const
 
template<class T >
T readEntry (const QString &name, const T &defaultValue=T())
 
KoColor readKoColor (const QString &name, const KoColor &color=KoColor()) const
 
QList< KoColor > readKoColors (const QString &name) const
 
template<class T >
QList< T > readList (const QString &name, const QList< T > &defaultValue=QList< T >())
 
bool renamePastedLayers (bool defaultValue=false) const
 
RootSurfaceFormat rootSurfaceFormat (bool defaultValue=false) const
 
bool rulersTrackMouse (bool defaultValue=false) const
 
bool saveSessionOnQuit (bool defaultValue) const
 
void saveSnapConfig (const KisSnapConfig &config)
 
bool scratchpadVisible (bool defaultValue=false) const
 
bool scrollbarZoomEnabled (bool defaultValue=false) const
 
bool scrollCheckers (bool defaultValue=false) const
 
int scrubbingAudioUpdatesDelay (bool defaultValue=false) const
 
int scrubbingUpdatesDelay (bool defaultValue=false) const
 
bool selectionActionBar (bool defaultValue=false) const
 
SelectionActionsBarBehavior selectionActionBarBehavior (bool defaultValue=false) const
 
SelectionActionsBarOrientation selectionActionBarOrientation (bool defaultValue=false) const
 
SelectionActionsBarPosition selectionActionBarPosition (bool defaultValue=false) const
 
qreal selectionViewSizeMinimum (bool defaultValue=false) const
 
bool separateEraserCursor (bool defaultValue=false) const
 
SessionOnStartup sessionOnStartup (bool defaultValue=false) const
 
void setActivateTransformToolAfterPaste (bool value)
 
void setAdaptivePlaybackRange (bool value)
 
void setAllowLCMSOptimization (bool allowLCMSOptimization)
 
void setAnimationDropFrames (bool value)
 
void setAnimationPlaybackBackend (int value)
 
void setAntialiasCurves (bool v) const
 
void setAntialiasSelectionOutline (bool v) const
 
void setAssistantsDrawMode (AssistantsDrawMode value)
 
void setAudioOffsetTolerance (int value)
 
void setAutoPinLayersToTimeline (bool value)
 
void setAutoSaveInterval (int seconds) const
 
void setAutoSmoothBezierCurves (bool value)
 
void setAutoZoomTimelineToPlaybackRange (bool value)
 
void setBackupFile (bool backupFile) const
 
void setBrushHudSetting (const QString &value) const
 
void setCalculateAnimationCacheInBackground (bool value)
 
void setCanvasBorderColor (const QColor &color) const
 
void setCanvasState (const QString &state) const
 
void setCanvasSurfaceBitDepthMode (CanvasSurfaceBitDepthMode value)
 
void setCanvasSurfaceColorSpaceManagementMode (CanvasSurfaceMode value)
 
void setCheckersColor1 (const QColor &v) const
 
void setCheckersColor2 (const QColor &v) const
 
void setCheckSize (qint32 checkSize) const
 
void setClicklessSpacePan (const bool toggle) const
 
void setColorSamplerPreviewCircleDiameter (int style)
 
void setColorSamplerPreviewCircleExtraCirclesEnabled (bool enabled)
 
void setColorSamplerPreviewCircleOutlineEnabled (bool enabled)
 
void setColorSamplerPreviewCirclePosition (ColorSamplerPreviewCirclePosition position)
 
void setColorSamplerPreviewCircleThickness (qreal thickness)
 
void setColorSamplerPreviewStyle (ColorSamplerPreviewStyle style)
 
void setColorSamplerZoomPreviewEnabled (bool enabled)
 
void setColorSamplerZoomPreviewScale (qreal scale)
 
void setCompressKra (bool compress)
 
void setConvertLayerColorSpaceInProperties (bool value)
 
void setConvertToImageColorspaceOnImport (bool value)
 
void setCumulativeUndoData (KisCumulativeUndoData value)
 
void setCumulativeUndoRedo (bool value)
 
void setCurrentInputProfile (const QString &name)
 
void setCursorMainColor (const QColor &v) const
 
void setCustomColorSelectorColorSpace (const KoColorSpace *cs)
 
void setDefaultAssistantsColor (const QColor &color) const
 
void setDefaultBackgroundColor (const QLatin1String &dialogType, const QColor &value)
 
void setDefaultBackgroundOpacity (const QLatin1String &dialogType, quint8 value)
 
void setDefaultBackgroundStyle (const QLatin1String &dialogType, BackgroundStyle value)
 
void setDefaultColorDepth (const QString &depth) const
 
void setDefaultGridSpacing (QPoint gridSpacing)
 
void setDefaultPalette (const QString &name) const
 
void setDisableAVXOptimizations (bool value)
 
void setDisableVectorOptimizations (bool value)
 
void setEnableBrushSpeedLogging (bool value) const
 
void setEnableCanvasSurfaceColorSpaceManagement (bool value)
 
void setEnableOpenGLFramerateLogging (bool value) const
 
void setEraserCursorMainColor (const QColor &v) const
 
void setEraserCursorStyle (CursorStyle style)
 
void setEraserOutlineStyle (OutlineStyle style)
 
void setExportConfiguration (const QString &filterId, KisPropertiesConfigurationSP properties) const
 
void setExportMimeType (const QString &defaultExportMimeType)
 
void setFavoriteCompositeOps (const QStringList &compositeOps) const
 
void setFavoritePresets (const int value)
 
void setFFMpegLocation (const QString &value)
 
void setFirstRun (const bool firstRun) const
 
void setForceAlwaysFullSizedEraserOutline (bool value) const
 
void setForceAlwaysFullSizedOutline (bool value) const
 
void setForcePaletteColors (bool forcePaletteColors)
 
void setForceShowAutosaveMessages (bool ShowAutosaveMessages) const
 
void setForceShowSaveMessages (bool value) const
 
void setFullscreenMode (const bool value) const
 
void setGridIsoVerticalColor (const QColor &v) const
 
void setGridIsoVerticalStyle (quint32 v) const
 
void setGridMainColor (const QColor &v) const
 
void setGridMainStyle (quint32 v) const
 
void setGridSubdivisionColor (const QColor &v) const
 
void setGridSubdivisionStyle (quint32 v) const
 
void setGuidesColor (const QColor &v) const
 
void setGuidesLineStyle (quint32 v) const
 
void setHideDevFundBanner (bool value=true)
 
void setHideDockersFullscreen (const bool value) const
 
void setHideMenuFullscreen (const bool value) const
 
void setHidePopups (bool hidePopups)
 
void setHideScrollbars (bool value) const
 
void setHideScrollbarsFullscreen (const bool value) const
 
void setHideStatusbarFullscreen (const bool value) const
 
void setHideTitlebarFullscreen (const bool value) const
 
void setHideToolbarFullscreen (const bool value) const
 
void setHorizontalSplitLines (const int numberLines) const
 
void setIconsInMenu (IconsInMenu value)
 
void setIgnoreHighFunctionKeys (bool value)
 
void setImportConfiguration (const QString &filterId, KisPropertiesConfigurationSP properties) const
 
void setImportProfile (const QString &importProfile) const
 
void setKineticScrollingEnabled (bool enabled)
 
void setKineticScrollingGesture (int kineticScroll)
 
void setKineticScrollingHideScrollbars (bool scrollbar)
 
void setKineticScrollingSensitivity (int sensitivity)
 
void setLastUsedOutlineStyle (OutlineStyle style)
 
void setLayerInfoTextOpacity (int value)
 
void setLayerInfoTextStyle (LayerInfoTextStyle value)
 
void setLayerThumbnailGenerationTimeout (int value)
 
void setLayerThumbnailSize (int size)
 
void setLayerTreeIndentation (int percentage)
 
void setLevelOfDetailEnabled (bool value)
 
void setLineSmoothingDelayDistance (qreal value)
 
void setLineSmoothingDistanceKeepAspectRatio (bool value)
 
void setLineSmoothingDistanceMax (qreal value)
 
void setLineSmoothingDistanceMin (qreal value)
 
void setLineSmoothingFinishStabilizedCurve (bool value)
 
void setLineSmoothingScalableDistance (bool value)
 
void setLineSmoothingSmoothPressure (bool value)
 
void setLineSmoothingStabilizeSensors (bool value)
 
void setLineSmoothingTailAggressiveness (qreal value)
 
void setLineSmoothingType (int value)
 
void setLineSmoothingUseDelayDistance (bool value)
 
void setLongPressEnabled (bool value)
 
void setMDIBackgroundColor (const QString &v) const
 
void setMDIBackgroundImage (const QString &fileName) const
 
void setMonitorProfile (int screen, const QString &monitorProfile) const
 
void setNewCursorStyle (CursorStyle style)
 
void setNewOutlineStyle (OutlineStyle style)
 
void setNewsCheckEnabled (bool value)
 
void setNewsFirstStartup (bool value)
 
void setNumDefaultLayers (const QLatin1String &dialogType, int num)
 
void setOcioColorManagementMode (OcioColorManagementMode mode) const
 
void setOcioConfiguration (const KisOcioConfiguration &cfg)
 
void setOcioLockColorVisualRepresentation (bool value)
 
void setOcioLutEdgeSize (int value)
 
void setOpenGLFilteringMode (int filteringMode)
 
void setOutlineSizeMinimum (qreal outlineSizeMinimum) const
 
void setPaintopPopupDetached (bool detached) const
 
void setPasteBehaviour (qint32 behaviour) const
 
void setPasteFormat (qint32 format)
 
void setPixelGridColor (const QColor &v) const
 
void setPixelGridDrawingThreshold (qreal v) const
 
void setPreferredVectorImportResolutionPPI (int value) const
 
void setPreferXcbEglProvider (bool value)
 
void setPresetChooserViewMode (const int mode) const
 
void setPresetIconSize (const int value) const
 
void setPresetStripVisible (bool visible)
 
void setPressureTabletCurve (const QString &curveString) const
 
void setPrinterColorSpace (const QString &printerColorSpace) const
 
void setPrinterProfile (const QString &printerProfile) const
 
void setRenamePastedLayers (bool value)
 
void setRenderIntent (qint32 monitorRenderIntent) const
 
void setRootSurfaceFormat (RootSurfaceFormat value)
 
void setRulersTrackMouse (bool value) const
 
void setSaveSessionOnQuit (bool value)
 
void setScratchpadVisible (bool visible)
 
void setScrollbarZoomEnabled (bool enabled) const
 
void setScrollingCheckers (bool scrollCheckers) const
 
void setScrubbingAudioUpdatesDelay (int value)
 
void setScrubbingUpdatesDelay (int value)
 
void setSelectionActionBar (bool value)
 
void setSelectionActionBarBehavior (SelectionActionsBarBehavior value)
 
void setSelectionActionBarOrientation (SelectionActionsBarOrientation value)
 
void setSelectionActionBarPosition (SelectionActionsBarPosition value)
 
void setSelectionViewSizeMinimum (qreal outlineSizeMinimum) const
 
void setSeparateEraserCursor (bool value) const
 
void setSessionOnStartup (SessionOnStartup value)
 
void setShowBrushHud (bool value)
 
void setShowCanvasMessages (bool show)
 
void setShowDockers (const bool value) const
 
void setShowDockerTitleBars (const bool value) const
 
void setShowEraserOutlineWhilePainting (bool showEraserOutlineWhilePainting) const
 
void setShowFilterGallery (bool showFilterGallery) const
 
void setShowFilterGalleryLayerMaskDialog (bool showFilterGallery) const
 
void setShowGlobalSelection (bool showGlobalSelection) const
 
void setShowOutlineWhilePainting (bool showOutlineWhilePainting) const
 
void setShowPaletteBottomBar (bool value)
 
void setShowRootLayer (bool showRootLayer) const
 
void setShowRulers (bool rulers) const
 
void setShowSingleChannelAsColor (bool asColor)
 
void setShowStatusBar (const bool value) const
 
void setSliderLabels (bool enabled)
 
void setSplashScreenImage (const QString &value)
 
void setStabilizerDelayedPaint (bool value)
 
void setStabilizerSampleSize (int value)
 
void setSwitchSelectionCtrlAlt (bool value)
 
void setTabletEventsDelay (int value)
 
void setTestingAcceptCompressedTabletEvents (bool value)
 
void setTestingCompressBrushEvents (bool value)
 
void setTimelineZoom (qreal value)
 
void setToolbarSlider (int sliderNumber, const QString &slider)
 
void setToolOptionsInDocker (bool inDocker)
 
void setToolOptionsPopupDetached (bool detached) const
 
void setTouchPainting (TouchPainting value) const
 
void setTrackTabletEventLatency (bool value)
 
void setTrimFramesImport (bool trim)
 
void setTrimKra (bool trim)
 
void setUndoEnabled (bool undo) const
 
void setUndoStackLimit (int limit) const
 
void setUseBlackPointCompensation (bool useBlackPointCompensation) const
 
void setUseDefaultColorSpace (bool value) const
 
void setUseDirtyPresets (bool value)
 
void setUseEraserBrushOpacity (bool value)
 
void setUseEraserBrushSize (bool value)
 
void setUseInlineLayerInfoText (bool value)
 
void setUseLayerSelectionCheckbox (bool value)
 
void setUseOcio (bool useOCIO) const
 
void setUseOpenGLTextureBuffer (bool useBuffer)
 
void setUseProjections (bool useProj) const
 
void setUseRightMiddleTabletButtonWorkaround (bool value)
 
void setUseWin8PointerInput (bool value)
 
void setUseZip64 (bool value)
 
void setVastScrolling (const qreal factor) const
 
void setVerticalSplitLines (const int numberLines) const
 
void setWidgetStyle (QString name)
 
void setWorkingColorSpace (const QString &workingColorSpace) const
 
void setZoomHorizontal (bool value)
 
void setZoomMarginSize (int zoomMarginSize)
 
void setZoomSteps (int steps)
 
bool shouldEatDriverShortcuts (bool defaultValue=false) const
 
bool showBrushHud (bool defaultValue=false) const
 
bool showCanvasMessages (bool defaultValue=false) const
 
bool showDockers (bool defaultValue=false) const
 
bool showDockerTitleBars (bool defaultValue=false) const
 
bool showEraserOutlineWhilePainting (bool defaultValue=false) const
 
bool showFilterGallery (bool defaultValue=false) const
 
bool showFilterGalleryLayerMaskDialog (bool defaultValue=false) const
 
bool showGlobalSelection (bool defaultValue=false) const
 
bool showOutlineWhilePainting (bool defaultValue=false) const
 
bool showPaletteBottomBar (bool defaultValue=false) const
 
bool showRootLayer (bool defaultValue=false) const
 
bool showRulers (bool defaultValue=false) const
 
bool showSingleChannelAsColor (bool defaultValue=false) const
 
bool showStatusBar (bool defaultValue=false) const
 
bool sliderLabels (bool defaultValue=false) const
 
QString splashScreenImage (bool defaultValue=false) const
 
bool stabilizerDelayedPaint (bool defaultValue=false) const
 
int stabilizerSampleSize (bool defaultValue=false) const
 
bool switchSelectionCtrlAlt (bool defaultValue=false) const
 
int tabletEventsDelay (bool defaultValue=false) const
 
bool testingAcceptCompressedTabletEvents (bool defaultValue=false) const
 
bool testingCompressBrushEvents (bool defaultValue=false) const
 
int textureOverlapBorder () const
 
qreal timelineZoom (bool defaultValue=false) const
 
QString toolbarSlider (int sliderNumber, bool defaultValue=false) const
 
bool toolOptionsInDocker (bool defaultValue=false) const
 
bool toolOptionsPopupDetached (bool defaultValue=false) const
 
TouchPainting touchPainting (bool defaultValue=false) const
 
bool trackTabletEventLatency (bool defaultValue=false) const
 
bool trimFramesImport (bool defaultValue=false) const
 
bool trimKra (bool defaultValue=false) const
 
bool undoEnabled (bool defaultValue=false) const
 
int undoStackLimit (bool defaultValue=false) const
 
bool useBlackPointCompensation (bool defaultValue=false) const
 
bool useCumulativeUndoRedo (bool defaultValue=false) const
 
bool useDefaultColorSpace (bool defaultvalue=false) const
 
bool useDirtyPresets (bool defaultValue=false) const
 
bool useEraserBrushOpacity (bool defaultValue=false) const
 
bool useEraserBrushSize (bool defaultValue=false) const
 
bool useInlineLayerInfoText (bool defaultValue=false) const
 
bool useLayerSelectionCheckbox (bool defaultValue=false) const
 
bool useOcio (bool defaultValue=false) const
 
bool useOpenGL (bool defaultValue=false) const
 
bool useOpenGLTextureBuffer (bool defaultValue=false) const
 
bool useProjections (bool defaultValue=false) const
 
bool useRightMiddleTabletButtonWorkaround (bool defaultValue=false) const
 
bool useWin8PointerInput (bool defaultValue=false) const
 
bool useZip64 (bool defaultValue=false) const
 
qreal vastScrolling (bool defaultValue=false) const
 
int verticalSplitLines (bool defaultValue=false) const
 
QString widgetStyle (bool defaultValue=false)
 
int workaroundX11SmoothPressureSteps (bool defaultValue=false) const
 
QString workingColorSpace (bool defaultValue=false) const
 
template<class T >
void writeEntry (const QString &name, const T &value)
 
void writeKoColor (const QString &name, const KoColor &color) const
 
void writeKoColors (const QString &name, const QList< KoColor > &colors) const
 
template<class T >
void writeList (const QString &name, const QList< T > &value)
 
bool zoomHorizontal (bool defaultValue=false) const
 
int zoomMarginSize (bool defaultValue=false) const
 
int zoomSteps (bool defaultValue=false) const
 
 ~KisConfig ()
 

Static Public Member Functions

static CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode (QSettings *settings, bool defaultValue=false)
 
static bool preferXcbEglProvider (const QSettings *settings, bool defaultValue=false)
 
static RootSurfaceFormat rootSurfaceFormat (QSettings *displayrc, bool defaultValue=false)
 
static void setCanvasSurfaceBitDepthMode (QSettings *settings, CanvasSurfaceBitDepthMode value)
 
static void setRootSurfaceFormat (QSettings *displayrc, RootSurfaceFormat value)
 
static void setUseWin8PointerInputNoApp (QSettings *settings, bool value)
 
static bool useWin8PointerInputNoApp (QSettings *settings, bool defaultValue=false)
 

Private Member Functions

 KisConfig (const KisConfig &)
 
KisConfig & operator= (const KisConfig &) const
 

Private Attributes

KConfigGroup m_cfg
 
bool m_readOnly
 

Detailed Description

Definition at line 30 of file kis_config.h.

Member Enumeration Documentation

◆ AssistantsDrawMode

Enumerator
ASSISTANTS_DRAW_MODE_DIRECT 
ASSISTANTS_DRAW_MODE_PIXMAP_CACHE 
ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE 

Definition at line 877 of file kis_config.h.

877 {
878 ASSISTANTS_DRAW_MODE_DIRECT = 0, // no caching, draw directly on canvas
881 };
@ ASSISTANTS_DRAW_MODE_PIXMAP_CACHE
Definition kis_config.h:879
@ ASSISTANTS_DRAW_MODE_DIRECT
Definition kis_config.h:878
@ ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE
Definition kis_config.h:880

◆ BackgroundStyle

Enumerator
RASTER_LAYER 
CANVAS_COLOR 
FILL_LAYER 

Definition at line 609 of file kis_config.h.

609 {
610 RASTER_LAYER = 0,
611 CANVAS_COLOR = 1,
612 FILL_LAYER = 2
613 };

◆ CanvasSurfaceBitDepthMode

Enumerator
DepthAuto 
Depth8Bit 
Depth10Bit 

Definition at line 214 of file kis_config.h.

◆ CanvasSurfaceMode

enum class KisConfig::CanvasSurfaceMode
strong
Enumerator
Preferred 
Rec709g22 
Rec709g10 
Rec2020pq 
Unmanaged 

Definition at line 198 of file kis_config.h.

◆ ColorSamplerPreviewCirclePosition

Enumerator
Center 
Top 
TopLeft 
TopRight 
Count 

Definition at line 168 of file kis_config.h.

◆ ColorSamplerPreviewStyle

Enumerator
None 
Circle 
RectangleLeft 
RectangleRight 
RectangleAbove 
Count 

Definition at line 138 of file kis_config.h.

◆ IconsInMenu

Enumerator
IIM_Default 
IIM_Yes 
IIM_No 

Definition at line 399 of file kis_config.h.

399 {
401 IIM_Yes,
402 IIM_No
403 };

◆ LayerInfoTextStyle

Enumerator
INFOTEXT_NONE 
INFOTEXT_SIMPLE 
INFOTEXT_BALANCED 
INFOTEXT_DETAILED 

Definition at line 859 of file kis_config.h.

859 {
860 INFOTEXT_NONE = 0,
864 };
@ INFOTEXT_SIMPLE
Definition kis_config.h:861
@ INFOTEXT_BALANCED
Definition kis_config.h:862
@ INFOTEXT_DETAILED
Definition kis_config.h:863

◆ OcioColorManagementMode

Enumerator
INTERNAL 
OCIO_CONFIG 
OCIO_ENVIRONMENT 

Definition at line 553 of file kis_config.h.

553 {
554 INTERNAL = 0,
557 };
@ OCIO_ENVIRONMENT
Definition kis_config.h:556

◆ RootSurfaceFormat

Enumerator
BT709_G22 
BT709_G10 
BT2020_PQ 

Definition at line 839 of file kis_config.h.

839 {
840 BT709_G22 = 0,
841 BT709_G10,
843 };

◆ SelectionActionsBarBehavior

Enumerator
FreeFloating 
Fixed 

Definition at line 808 of file kis_config.h.

808 {
809 FreeFloating = 0,
810 Fixed
811 };
qint32 Fixed
Definition psd.h:31

◆ SelectionActionsBarOrientation

Enumerator
Horizontal 
Vertical 

Definition at line 824 of file kis_config.h.

824 {
825 Horizontal = 0,
827 };

◆ SelectionActionsBarPosition

Enumerator
Bottom 
BottomLeft 
BottomRight 
Left 
Right 
Top 
TopLeft 
TopRight 

Definition at line 813 of file kis_config.h.

813 {
814 Bottom = 0,
817 Left,
818 Right,
819 Top,
820 TopLeft,
822 };

◆ SessionOnStartup

Enumerator
SOS_BlankSession 
SOS_PreviousSession 
SOS_ShowSessionManager 

Definition at line 391 of file kis_config.h.

391 {
395 };
@ SOS_PreviousSession
Definition kis_config.h:393
@ SOS_ShowSessionManager
Definition kis_config.h:394
@ SOS_BlankSession
Definition kis_config.h:392

◆ TouchPainting

Enumerator
TOUCH_PAINTING_AUTO 
TOUCH_PAINTING_ENABLED 
TOUCH_PAINTING_DISABLED 

Definition at line 47 of file kis_config.h.

Constructor & Destructor Documentation

◆ KisConfig() [1/2]

KisConfig::KisConfig ( bool readOnly)

KisConfig create a kisconfig object.

Parameters
readOnlyif true, there will be no call to sync when the object is deleted. Any KisConfig object created in a thread must be read-only.

Definition at line 55 of file kis_config.cc.

56 : m_cfg( KSharedConfig::openConfig()->group(""))
57 , m_readOnly(readOnly)
58{
59 if (!readOnly) {
60 KIS_SAFE_ASSERT_RECOVER_RETURN(qApp && qApp->thread() == QThread::currentThread());
61 }
62}
KConfigGroup m_cfg
Definition kis_config.h:928
bool m_readOnly
Definition kis_config.h:929
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128

References KIS_SAFE_ASSERT_RECOVER_RETURN.

◆ ~KisConfig()

KisConfig::~KisConfig ( )

Definition at line 64 of file kis_config.cc.

65{
66 if (m_readOnly) return;
67
68 if (qApp && qApp->thread() != QThread::currentThread()) {
69 dbgKrita.noquote() << "WARNING: KisConfig: requested config synchronization from nonGUI thread! Called from:" << kisBacktrace();
70 return;
71 }
72
73 m_cfg.sync();
74}
QString kisBacktrace()
Definition kis_debug.cpp:51
#define dbgKrita
Definition kis_debug.h:49

References dbgKrita, kisBacktrace(), m_cfg, and m_readOnly.

◆ KisConfig() [2/2]

KisConfig::KisConfig ( const KisConfig & )
private

Member Function Documentation

◆ activateTransformToolAfterPaste()

bool KisConfig::activateTransformToolAfterPaste ( bool defaultValue = false) const

Definition at line 2844 of file kis_config.cc.

2845{
2846 return defaultValue ? false : m_cfg.readEntry("activateTransformToolAfterPaste", false);
2847}

References m_cfg.

◆ adaptivePlaybackRange()

bool KisConfig::adaptivePlaybackRange ( bool defaultValue = false) const

Definition at line 2659 of file kis_config.cc.

2660{
2661 return (defaultValue ? true : m_cfg.readEntry("adaptivePlaybackRange", true));
2662}
T readEntry(const QString &name, const T &defaultValue=T())
Definition kis_config.h:914

References m_cfg.

◆ allowLCMSOptimization()

bool KisConfig::allowLCMSOptimization ( bool defaultValue = false) const

Definition at line 963 of file kis_config.cc.

964{
965 return (defaultValue ? true : m_cfg.readEntry("allowLCMSOptimization", true));
966}

References m_cfg.

◆ animationDropFrames()

bool KisConfig::animationDropFrames ( bool defaultValue = false) const

Definition at line 2697 of file kis_config.cc.

2698{
2699 return (defaultValue ? true : m_cfg.readEntry("animationDropFrames", true));
2700}

References m_cfg.

◆ animationPlaybackBackend()

int KisConfig::animationPlaybackBackend ( bool defaultValue = false) const

Definition at line 2634 of file kis_config.cc.

2635{
2636 return (defaultValue ? 1 : m_cfg.readEntry("animationPlaybackBackend", 1));
2637}

References m_cfg.

◆ antialiasCurves()

bool KisConfig::antialiasCurves ( bool defaultValue = false) const

Definition at line 1386 of file kis_config.cc.

1387{
1388 return (defaultValue ? true : m_cfg.readEntry("antialiascurves", true));
1389}

References m_cfg.

◆ antialiasSelectionOutline()

bool KisConfig::antialiasSelectionOutline ( bool defaultValue = false) const

Definition at line 1396 of file kis_config.cc.

1397{
1398 return (defaultValue ? false : m_cfg.readEntry("AntialiasSelectionOutline", false));
1399}

References m_cfg.

◆ assistantsDrawMode()

KisConfig::AssistantsDrawMode KisConfig::assistantsDrawMode ( bool defaultValue = false) const

Definition at line 3013 of file kis_config.cc.

3014{
3015 if (defaultValue) {
3017 }
3018
3019 return static_cast<AssistantsDrawMode>(
3020 m_cfg.readEntry("assistantsDrawMode", static_cast<int>(ASSISTANTS_DRAW_MODE_DIRECT)));
3021}

References ASSISTANTS_DRAW_MODE_DIRECT, and m_cfg.

◆ audioOffsetTolerance()

int KisConfig::audioOffsetTolerance ( bool defaultValue = false) const

Definition at line 2722 of file kis_config.cc.

2723{
2724 return (defaultValue ? -1 : m_cfg.readEntry("audioOffsetTolerance", -1));
2725}

References m_cfg.

◆ autoPinLayersToTimeline()

bool KisConfig::autoPinLayersToTimeline ( bool defaultValue = false) const

Definition at line 2649 of file kis_config.cc.

2650{
2651 return (defaultValue ? true : m_cfg.readEntry("autoPinLayers", true));
2652}

References m_cfg.

◆ autoSaveInterval()

int KisConfig::autoSaveInterval ( bool defaultValue = false) const

Definition at line 1529 of file kis_config.cc.

1530{
1531 int def = 7 * 60;
1532 return (defaultValue ? def : m_cfg.readEntry("AutoSaveInterval", def));
1533}

References m_cfg.

◆ autoSmoothBezierCurves()

bool KisConfig::autoSmoothBezierCurves ( bool defaultValue = false) const

Definition at line 2834 of file kis_config.cc.

2835{
2836 return defaultValue ? false : m_cfg.readEntry("autoSmoothBezierCurves", false);
2837}

References m_cfg.

◆ autoZoomTimelineToPlaybackRange()

bool KisConfig::autoZoomTimelineToPlaybackRange ( bool defaultValue = false) const

Definition at line 2669 of file kis_config.cc.

2670{
2671 return (defaultValue ? true : m_cfg.readEntry("autoZoomTimelineToPlaybackRange", true));
2672}

References m_cfg.

◆ backupFile()

bool KisConfig::backupFile ( bool defaultValue = false) const

Definition at line 1540 of file kis_config.cc.

1541{
1542 return (defaultValue ? true : m_cfg.readEntry("CreateBackupFile", true));
1543}

References m_cfg.

◆ brushHudSetting()

QString KisConfig::brushHudSetting ( bool defaultValue = false) const

Definition at line 2802 of file kis_config.cc.

2803{
2804 QString defaultDoc = "<!DOCTYPE hud_properties>\n<hud_properties>\n <version value=\"1\" type=\"value\"/>\n <paintbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"angle\" type=\"value\"/>\n </properties_list>\n </paintbrush>\n <colorsmudge>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"smudge_mode\" type=\"value\"/>\n <item_3 value=\"smudge_length\" type=\"value\"/>\n <item_4 value=\"smudge_color_rate\" type=\"value\"/>\n </properties_list>\n </colorsmudge>\n <sketchbrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"size\" type=\"value\"/>\n </properties_list>\n </sketchbrush>\n <hairybrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n </properties_list>\n </hairybrush>\n <experimentbrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"shape_windingfill\" type=\"value\"/>\n </properties_list>\n </experimentbrush>\n <spraybrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"spray_particlecount\" type=\"value\"/>\n <item_3 value=\"spray_density\" type=\"value\"/>\n </properties_list>\n </spraybrush>\n <hatchingbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"hatching_angle\" type=\"value\"/>\n <item_3 value=\"hatching_thickness\" type=\"value\"/>\n <item_4 value=\"hatching_separation\" type=\"value\"/>\n </properties_list>\n </hatchingbrush>\n <gridbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"grid_divisionlevel\" type=\"value\"/>\n </properties_list>\n </gridbrush>\n <curvebrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"curve_historysize\" type=\"value\"/>\n <item_2 value=\"curve_linewidth\" type=\"value\"/>\n <item_3 value=\"curve_lineopacity\" type=\"value\"/>\n <item_4 value=\"curve_connectionline\" type=\"value\"/>\n </properties_list>\n </curvebrush>\n <dynabrush>\n <properties_list type=\"array\">\n <item_0 value=\"dyna_diameter\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"dyna_mass\" type=\"value\"/>\n <item_3 value=\"dyna_drag\" type=\"value\"/>\n </properties_list>\n </dynabrush>\n <particlebrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"particle_particles\" type=\"value\"/>\n <item_2 value=\"particle_opecityweight\" type=\"value\"/>\n <item_3 value=\"particle_iterations\" type=\"value\"/>\n </properties_list>\n </particlebrush>\n <duplicate>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"clone_healing\" type=\"value\"/>\n <item_3 value=\"clone_movesource\" type=\"value\"/>\n </properties_list>\n </duplicate>\n <deformbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"deform_amount\" type=\"value\"/>\n <item_3 value=\"deform_mode\" type=\"value\"/>\n </properties_list>\n </deformbrush>\n <tangentnormal>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n </properties_list>\n </tangentnormal>\n <filter>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n </properties_list>\n </filter>\n <roundmarker>\n <properties_list type=\"array\">\n <item_0 vlue=\"opacity\" type=\"value\"/>\n <item_1 value=\"size\" type=\"value\"/>\n </properties_list>\n </roundmarker>\n</hud_properties>\n";
2805 return defaultValue ? defaultDoc : m_cfg.readEntry("brushHudSettings", defaultDoc);
2806}

References m_cfg.

◆ calculateAnimationCacheInBackground()

bool KisConfig::calculateAnimationCacheInBackground ( bool defaultValue = false) const

Definition at line 2813 of file kis_config.cc.

2814{
2815 return defaultValue ? true : m_cfg.readEntry("calculateAnimationCacheInBackground", true);
2816}

References m_cfg.

◆ canvasBorderColor()

QColor KisConfig::canvasBorderColor ( bool defaultValue = false) const

Definition at line 1334 of file kis_config.cc.

1335{
1336 QColor color(QColor(128,128,128));
1337 return (defaultValue ? color : m_cfg.readEntry("canvasBorderColor", color));
1338}

References m_cfg.

◆ canvasState()

QString KisConfig::canvasState ( bool defaultValue = false) const

Definition at line 1570 of file kis_config.cc.

1571{
1572 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1573 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1574 return (defaultValue ? "OPENGL_NOT_TRIED" : kritarc.value("canvasState", "OPENGL_NOT_TRIED").toString());
1575}
float value(const T *src, size_t ch)
QString toString(const QString &value)

◆ canvasSurfaceBitDepthMode() [1/2]

KisConfig::CanvasSurfaceBitDepthMode KisConfig::canvasSurfaceBitDepthMode ( bool defaultValue = false) const

Definition at line 799 of file kis_config.cc.

800{
801 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
802 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
803 return canvasSurfaceBitDepthMode(&kritarc, defaultValue);
804}
static CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(QSettings *settings, bool defaultValue=false)

References canvasSurfaceBitDepthMode().

◆ canvasSurfaceBitDepthMode() [2/2]

KisConfig::CanvasSurfaceBitDepthMode KisConfig::canvasSurfaceBitDepthMode ( QSettings * settings,
bool defaultValue = false )
static

Definition at line 765 of file kis_config.cc.

766{
767 QString modeStr = defaultValue ? "auto" : settings->value("canvasSurfaceBitDepthMode", "auto").toString();
768
769 if (modeStr == "auto") {
771 } else if (modeStr == "8bit") {
773 } else if (modeStr == "10bit") {
775 }
776
778}

References Depth10Bit, Depth8Bit, and DepthAuto.

◆ canvasSurfaceColorSpaceManagementMode()

KisConfig::CanvasSurfaceMode KisConfig::canvasSurfaceColorSpaceManagementMode ( bool defaultValue = false) const

The user-selected mode for the canvas color management mode. The value is meaningful when the operating system supports managed surfaces mode and if the canvas has native surface under it.

Definition at line 722 of file kis_config.cc.

722 {
723 QString modeStr = defaultValue ? "preferred" : m_cfg.readEntry("canvasSurfaceColorSpaceManagementMode", "preferred");
724
725 if (modeStr == "preferred") {
727 } else if (modeStr == "rec709g22") {
729 } else if (modeStr == "rec709g10") {
731 } else if (modeStr == "rec2020pq") {
733 } else if (modeStr == "unmanaged") {
735 } else {
737 }
738}

References m_cfg, Preferred, Rec2020pq, Rec709g10, Rec709g22, and Unmanaged.

◆ checkersColor1()

QColor KisConfig::checkersColor1 ( bool defaultValue = false) const

Definition at line 1365 of file kis_config.cc.

1366{
1367 QColor col(220, 220, 220);
1368 return (defaultValue ? col : m_cfg.readEntry("checkerscolor", col));
1369}

References m_cfg.

◆ checkersColor2()

QColor KisConfig::checkersColor2 ( bool defaultValue = false) const

Definition at line 1376 of file kis_config.cc.

1377{
1378 return (defaultValue ? QColor(Qt::white) : m_cfg.readEntry("checkerscolor2", QColor(Qt::white)));
1379}

References m_cfg.

◆ checkSize()

qint32 KisConfig::checkSize ( bool defaultValue = false) const

Definition at line 1309 of file kis_config.cc.

1310{
1311 qint32 size = (defaultValue ? 32 : m_cfg.readEntry("checksize", 32));
1312 if (size == 0) size = 32;
1313 return size;
1314}
int size(const Forest< T > &forest)
Definition KisForest.h:1232

References m_cfg.

◆ clicklessSpacePan()

bool KisConfig::clicklessSpacePan ( bool defaultValue = false) const

Definition at line 1868 of file kis_config.cc.

1869{
1870 return (defaultValue ? true : m_cfg.readEntry("clicklessSpacePan", true));
1871}

References m_cfg.

◆ colorHistoryPerDocument()

bool KisConfig::colorHistoryPerDocument ( bool defaultValue = false) const

Definition at line 983 of file kis_config.cc.

984{
985 KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
986 return (defaultValue ? false : cfg.readEntry("lastUsedColorsPerDocument", false));
987}

◆ colorSamplerPreviewCircleDiameter()

int KisConfig::colorSamplerPreviewCircleDiameter ( bool defaultValue = false) const

Definition at line 543 of file kis_config.cc.

544{
545 int def = 180;
546 if (!defaultValue) {
547 return m_cfg.readEntry("colorSamplerPreviewCircleDiameter", def);
548 }
549 return def;
550}

References m_cfg.

◆ colorSamplerPreviewCircleExtraCirclesEnabled()

bool KisConfig::colorSamplerPreviewCircleExtraCirclesEnabled ( bool defaultValue = false) const

Definition at line 585 of file kis_config.cc.

586{
587 bool def = true;
588 if (!defaultValue) {
589 return m_cfg.readEntry("colorSamplerPreviewCircleExtraCirclesEnabled", def);
590 }
591 return def;
592}

References m_cfg.

◆ colorSamplerPreviewCircleOutlineEnabled()

bool KisConfig::colorSamplerPreviewCircleOutlineEnabled ( bool defaultValue = false) const

Definition at line 571 of file kis_config.cc.

572{
573 bool def = true;
574 if (!defaultValue) {
575 return m_cfg.readEntry("colorSamplerPreviewCircleOutlineEnabled", def);
576 }
577 return def;
578}

References m_cfg.

◆ colorSamplerPreviewCirclePosition()

KisConfig::ColorSamplerPreviewCirclePosition KisConfig::colorSamplerPreviewCirclePosition ( bool defaultValue = false) const

Definition at line 622 of file kis_config.cc.

622 {
623 if (!defaultValue) {
624 int pos = m_cfg.readEntry("colorSamplerPreviewCirclePosition", int(ColorSamplerPreviewCirclePosition::Center));
625 if (pos >= 0 && pos < int(ColorSamplerPreviewCirclePosition::Count)) {
627 }
628 }
630}
ColorSamplerPreviewCirclePosition
Definition kis_config.h:168

References Center, Count, and m_cfg.

◆ colorSamplerPreviewCircleThickness()

qreal KisConfig::colorSamplerPreviewCircleThickness ( bool defaultValue = false) const

Definition at line 557 of file kis_config.cc.

558{
559 qreal def = 12; // percentage
560 if (!defaultValue) {
561 return m_cfg.readEntry("colorSamplerPreviewCircleThickness", def);
562 }
563 return def;
564}

References m_cfg.

◆ colorSamplerPreviewStyle()

KisConfig::ColorSamplerPreviewStyle KisConfig::colorSamplerPreviewStyle ( bool defaultValue = false) const

Definition at line 526 of file kis_config.cc.

527{
528 if (!defaultValue) {
529 int style = m_cfg.readEntry("colorSamplerPreviewStyle", int(ColorSamplerPreviewStyle::Circle));
530 if (style >= 0 && style < int(ColorSamplerPreviewStyle::Count)) {
531 return ColorSamplerPreviewStyle(style);
532 }
533 }
535}
ColorSamplerPreviewStyle
Definition kis_config.h:138

References Circle, Count, and m_cfg.

◆ colorSamplerZoomPreviewEnabled()

bool KisConfig::colorSamplerZoomPreviewEnabled ( bool defaultValue = false) const

Definition at line 599 of file kis_config.cc.

599 {
600 bool def = false;
601 if (!defaultValue) {
602 return m_cfg.readEntry("colorSamplerZoomPreviewEnabled", def);
603 }
604 return def;
605}

References m_cfg.

◆ colorSamplerZoomPreviewScale()

qreal KisConfig::colorSamplerZoomPreviewScale ( bool defaultValue = false) const

Definition at line 610 of file kis_config.cc.

610 {
611 qreal def = 10;
612 if (!defaultValue) {
613 return m_cfg.readEntry("colorSamplerZoomPreviewScale", def);
614 }
615 return def;
616}

References m_cfg.

◆ compressKra()

bool KisConfig::compressKra ( bool defaultValue = false) const

Definition at line 2441 of file kis_config.cc.

2442{
2443 return (defaultValue ? false : m_cfg.readEntry("compressLayersInKra", false));
2444}

References m_cfg.

◆ convertLayerColorSpaceInProperties()

bool KisConfig::convertLayerColorSpaceInProperties ( bool defaultValue = false) const

Definition at line 2953 of file kis_config.cc.

2954{
2955 return defaultValue ? true : m_cfg.readEntry("convertLayerColorSpaceInProperties", true);
2956}

References m_cfg.

◆ convertToImageColorspaceOnImport()

bool KisConfig::convertToImageColorspaceOnImport ( bool defaultValue = false) const

Definition at line 2742 of file kis_config.cc.

2743{
2744 return defaultValue ? false : m_cfg.readEntry("ConvertToImageColorSpaceOnImport", false);
2745}

References m_cfg.

◆ cumulativeUndoData()

KisCumulativeUndoData KisConfig::cumulativeUndoData ( bool defaultValue = false) const

Definition at line 212 of file kis_config.cc.

213{
214 if (defaultValue) {
216 }
217
219 data.read(&m_cfg);
220 return data;
221}
static const KisCumulativeUndoData defaultValue
bool read(const KConfigGroup *config)

References KisCumulativeUndoData::defaultValue, m_cfg, and KisCumulativeUndoData::read().

◆ currentInputProfile()

QString KisConfig::currentInputProfile ( bool defaultValue = false) const

Definition at line 2171 of file kis_config.cc.

2172{
2173 return (defaultValue ? QString() : m_cfg.readEntry("currentInputProfile", QString()));
2174}

References m_cfg.

◆ customColorSelectorColorSpace()

const KoColorSpace * KisConfig::customColorSelectorColorSpace ( bool defaultValue = false) const

Definition at line 2556 of file kis_config.cc.

2557{
2558 const KoColorSpace *cs = 0;
2559
2560 KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
2561 if (defaultValue || cfg.readEntry("useCustomColorSpace", true)) {
2563 QString modelID = cfg.readEntry("customColorSpaceModel", "RGBA");
2564 QString depthID = cfg.readEntry("customColorSpaceDepthID", "U8");
2565 QString profile = cfg.readEntry("customColorSpaceProfile", "sRGB built-in - (lcms internal)");
2566 if (profile == "default") {
2567 // qDebug() << "Falling back to default color profile.";
2568 profile = "sRGB built-in - (lcms internal)";
2569 }
2570 cs = csr->colorSpace(modelID, depthID, profile);
2571 }
2572
2573 return cs;
2574}
const KoColorSpace * colorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile)
static KoColorSpaceRegistry * instance()

References KoColorSpaceRegistry::colorSpace(), and KoColorSpaceRegistry::instance().

◆ defaultAssistantsColor()

QColor KisConfig::defaultAssistantsColor ( bool defaultValue = false) const

Definition at line 2823 of file kis_config.cc.

2824{
2825 static const QColor defaultColor = QColor(176, 176, 176, 255);
2826 return defaultValue ? defaultColor : m_cfg.readEntry("defaultAssistantsColor", defaultColor);
2827}

References m_cfg.

◆ defaultBackgroundColor()

QColor KisConfig::defaultBackgroundColor ( const QLatin1String & dialogType,
bool defaultValue = false ) const

Definition at line 2241 of file kis_config.cc.

2242{
2243 return (defaultValue ? QColor(Qt::white) : m_cfg.readEntry(dialogType + "BackgroundColorForNewImage", QColor(Qt::white)));
2244}

References m_cfg.

◆ defaultBackgroundOpacity()

quint8 KisConfig::defaultBackgroundOpacity ( const QLatin1String & dialogType,
bool defaultValue = false ) const

Definition at line 2231 of file kis_config.cc.

2232{
2233 return (defaultValue ? (int)OPACITY_OPAQUE_U8 : m_cfg.readEntry(dialogType + "BackgroundOpacityForNewImage", (int)OPACITY_OPAQUE_U8));
2234}
const quint8 OPACITY_OPAQUE_U8

References m_cfg, and OPACITY_OPAQUE_U8.

◆ defaultBackgroundStyle()

KisConfig::BackgroundStyle KisConfig::defaultBackgroundStyle ( const QLatin1String & dialogType,
bool defaultValue = false ) const

Definition at line 2251 of file kis_config.cc.

2252{
2253 return (KisConfig::BackgroundStyle)(defaultValue ? RASTER_LAYER : m_cfg.readEntry(dialogType + "BackgroundStyleForNewImage", (int)RASTER_LAYER));
2254}

References m_cfg, and RASTER_LAYER.

◆ defaultColorDepth()

QString KisConfig::defaultColorDepth ( bool defaultValue = false) const
Returns
the id of the default color depth used for creating new images.

Definition at line 254 of file kis_config.cc.

255{
256 return (defaultValue ? KoColorSpaceRegistry::instance()->rgb8()->colorDepthId().id()
257 : m_cfg.readEntry("colorDepthDef", KoColorSpaceRegistry::instance()->rgb8()->colorDepthId().id()));
258}
PythonPluginManager * instance

References KoColorSpaceRegistry::instance(), and m_cfg.

◆ defaultPalette()

QString KisConfig::defaultPalette ( bool defaultValue = false) const

Definition at line 2114 of file kis_config.cc.

2115{
2116 return (defaultValue ? QString() : m_cfg.readEntry("defaultPalette", "Default"));
2117}

References m_cfg.

◆ defColorModel() [1/2]

QString KisConfig::defColorModel ( bool defaultValue = false) const
Returns
the id of the default color model used for creating new images.

Definition at line 243 of file kis_config.cc.

244{
245 return (defaultValue ? KoColorSpaceRegistry::instance()->rgb8()->colorModelId().id()
246 : m_cfg.readEntry("colorModelDef", KoColorSpaceRegistry::instance()->rgb8()->colorModelId().id()));
247}

References KoColorSpaceRegistry::instance(), and m_cfg.

◆ defColorModel() [2/2]

void KisConfig::defColorModel ( const QString & model) const

set the id of the default color model used for creating new images.

Definition at line 249 of file kis_config.cc.

250{
251 m_cfg.writeEntry("colorModelDef", model);
252}

References m_cfg.

◆ defColorProfile() [1/2]

QString KisConfig::defColorProfile ( bool defaultValue = false) const
Returns
the id of the default color profile used for creating new images.

Definition at line 265 of file kis_config.cc.

266{
267 return (defaultValue ? KoColorSpaceRegistry::instance()->rgb8()->profile()->name() :
268 m_cfg.readEntry("colorProfileDef",
269 KoColorSpaceRegistry::instance()->rgb8()->profile()->name()));
270}
const char * name(StandardAction id)

References KoColorSpaceRegistry::instance(), and m_cfg.

◆ defColorProfile() [2/2]

void KisConfig::defColorProfile ( const QString & depth) const

set the id of the default color profile used for creating new images.

Definition at line 272 of file kis_config.cc.

273{
274 m_cfg.writeEntry("colorProfileDef", profile);
275}

References m_cfg.

◆ defImageHeight() [1/2]

qint32 KisConfig::defImageHeight ( bool defaultValue = false) const

Definition at line 233 of file kis_config.cc.

234{
235 return (defaultValue ? 3508 : m_cfg.readEntry("imageHeightDef", 3508));
236}

References m_cfg.

◆ defImageHeight() [2/2]

void KisConfig::defImageHeight ( qint32 height) const

Definition at line 282 of file kis_config.cc.

283{
284 m_cfg.writeEntry("imageHeightDef", height);
285}

References m_cfg.

◆ defImageResolution() [1/2]

qreal KisConfig::defImageResolution ( bool defaultValue = false) const

Definition at line 238 of file kis_config.cc.

239{
240 return (defaultValue ? 300.0 : m_cfg.readEntry("imageResolutionDef", 300.0)) / 72.0;
241}

References m_cfg.

◆ defImageResolution() [2/2]

void KisConfig::defImageResolution ( qreal res) const

Definition at line 287 of file kis_config.cc.

288{
289 m_cfg.writeEntry("imageResolutionDef", res*72.0);
290}

References m_cfg.

◆ defImageWidth() [1/2]

qint32 KisConfig::defImageWidth ( bool defaultValue = false) const

Definition at line 228 of file kis_config.cc.

229{
230 return (defaultValue ? 2480 : m_cfg.readEntry("imageWidthDef", 2480));
231}

References m_cfg.

◆ defImageWidth() [2/2]

void KisConfig::defImageWidth ( qint32 width) const

Definition at line 277 of file kis_config.cc.

278{
279 m_cfg.writeEntry("imageWidthDef", width);
280}

References m_cfg.

◆ disableAVXOptimizations()

bool KisConfig::disableAVXOptimizations ( bool defaultValue = false) const

Definition at line 2624 of file kis_config.cc.

2625{
2626 return (defaultValue ? false : m_cfg.readEntry("disableAVXOptimizations", false));
2627}

References m_cfg.

◆ disableOpenGL()

void KisConfig::disableOpenGL ( ) const

Definition at line 1076 of file kis_config.cc.

1077{
1078 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1079 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1080
1081 kritarc.setValue("OpenGLRenderer", "none");
1082}

◆ disableTouchOnCanvas()

bool KisConfig::disableTouchOnCanvas ( ) const

Definition at line 157 of file kis_config.cc.

158{
159 switch (touchPainting()) {
161 return false;
163 return true;
164 default:
165 // Automatic detection: enable or disable touch input based on whether
166 // we've received a tablet input during this session and therefore know
167 // that the user has a pen available.
169 }
170}
TouchPainting touchPainting(bool defaultValue=false) const
static bool tabletInputReceived()

References KoPointerEvent::tabletInputReceived(), TOUCH_PAINTING_DISABLED, TOUCH_PAINTING_ENABLED, and touchPainting().

◆ disableVectorOptimizations()

bool KisConfig::disableVectorOptimizations ( bool defaultValue = false) const

Definition at line 2613 of file kis_config.cc.

2614{
2615 // use the old key name for compatibility
2616 return (defaultValue ? false : m_cfg.readEntry("amdDisableVectorWorkaround", false));
2617}

References m_cfg.

◆ displayProfile()

const KoColorProfile * KisConfig::displayProfile ( int screen) const

Get the actual profile to be used for the given screen, which is either the screen profile set by the color management system or the custom monitor profile set by the user, depending on the configuration

Definition at line 864 of file kis_config.cc.

865{
866 if (screen < 0) return 0;
867
868 const KoColorProfile *profile = 0;
869
870 {
871 //dbgKrita << "\tGoing to get the monitor profile";
872 QString monitorProfileName = monitorProfile(screen);
873 //dbgKrita << "\t\tmonitorProfileName:" << monitorProfileName;
874 if (!monitorProfileName.isEmpty()) {
875 profile = KoColorSpaceRegistry::instance()->profileByName(monitorProfileName);
876 }
877 if (profile) {
878 //dbgKrita << "\t\tsuitable for display" << profile->isSuitableForDisplay();
879 }
880 else {
881 //dbgKrita << "\t\tstill no profile";
882 }
883 }
884 // if we still don't have a profile, or the profile isn't suitable for display,
885 // we need to get a last-resort profile. the built-in sRGB is a good choice then.
886 if (!profile || !profile->isSuitableForDisplay()) {
887 //dbgKrita << "\tnothing worked, going to get sRGB built-in";
888 profile = KoColorSpaceRegistry::instance()->profileByName("sRGB Built-in");
889 }
890
891 if (profile) {
892 //dbgKrita << "\tKisConfig::displayProfile for screen" << screen << "is" << profile->name();
893 }
894 else {
895 //dbgKrita << "\tCouldn't get a display profile at all";
896 }
897
898 return profile;
899}
QString monitorProfile(int screen) const
get the profile the user has selected for the given screen
virtual bool isSuitableForDisplay() const =0
const KoColorProfile * profileByName(const QString &name) const

References KoColorSpaceRegistry::instance(), KoColorProfile::isSuitableForDisplay(), monitorProfile(), and KoColorSpaceRegistry::profileByName().

◆ effectiveCanvasSurfaceBitDepthMode()

KisConfig::CanvasSurfaceBitDepthMode KisConfig::effectiveCanvasSurfaceBitDepthMode ( const QSurfaceFormat & format) const

Definition at line 813 of file kis_config.cc.

814{
815 auto mode = canvasSurfaceBitDepthMode();
816
818 if (format.redBufferSize() == 10 &&
819 format.greenBufferSize() == 10 &&
820 format.blueBufferSize() == 10) {
821
823 } else {
825 }
826 }
827
828 return mode;
829}

References canvasSurfaceBitDepthMode(), Depth10Bit, Depth8Bit, and DepthAuto.

◆ effectiveShouldUseNativeSurfaceForCanvas()

bool KisConfig::effectiveShouldUseNativeSurfaceForCanvas ( bool osManagedSurfacePresent) const
Returns
if a native surface should be used for the canvas

The function encodes the logic of checking user config and environment variable for calculating the option for the native canvas surface

Definition at line 712 of file kis_config.cc.

713{
714 bool useNativeSurfaceForCanvas = osManagedSurfacePresent && this->enableCanvasSurfaceColorSpaceManagement();
715 if (qEnvironmentVariableIsSet("KRITA_USE_NATIVE_CANVAS_SURFACE")) {
716 useNativeSurfaceForCanvas = qEnvironmentVariableIntValue("KRITA_USE_NATIVE_CANVAS_SURFACE");
717 qDebug() << "FPS-DEBUG: Krita canvas mode is overridden:" << (useNativeSurfaceForCanvas ? "native surface" : "legacy mode") << useNativeSurfaceForCanvas << qEnvironmentVariableIsSet("KRITA_USE_NATIVE_CANVAS_SURFACE");
718 }
719 return useNativeSurfaceForCanvas;
720}
bool enableCanvasSurfaceColorSpaceManagement(bool defaultValue=false) const

References enableCanvasSurfaceColorSpaceManagement().

◆ enableBrushSpeedLogging()

bool KisConfig::enableBrushSpeedLogging ( bool defaultValue = false) const

Definition at line 2597 of file kis_config.cc.

2598{
2599 return (defaultValue ? false : m_cfg.readEntry("enableBrushSpeedLogging", false));
2600}

References m_cfg.

◆ enableCanvasSurfaceColorSpaceManagement()

bool KisConfig::enableCanvasSurfaceColorSpaceManagement ( bool defaultValue = false) const

Controls if the canvas should have a separate color managed surface. Even though the surface can be created on any platform the proper color management support for it may be not present (currently supported on Wayland only). To check if the current platform supports surface management mode, test if KisMainWindow::managedSurfaceProfile() is not null.

Definition at line 702 of file kis_config.cc.

703{
704 return (defaultValue ? true : m_cfg.readEntry("enableCanvasSurfaceColorSpaceManagement",true));
705}

References m_cfg.

◆ enableOpenGLFramerateLogging()

bool KisConfig::enableOpenGLFramerateLogging ( bool defaultValue = false) const

Definition at line 2587 of file kis_config.cc.

2588{
2589 return (defaultValue ? false : m_cfg.readEntry("enableOpenGLFramerateLogging", false));
2590}

References m_cfg.

◆ enablePixelGrid()

void KisConfig::enablePixelGrid ( bool v) const

Definition at line 1250 of file kis_config.cc.

1251{
1252 m_cfg.writeEntry("pixelGridEnabled", v);
1253}
qreal v

References m_cfg, and v.

◆ eraserCursorStyle()

CursorStyle KisConfig::eraserCursorStyle ( bool defaultValue = false) const

Definition at line 472 of file kis_config.cc.

473{
474 if (defaultValue) {
475 return CURSOR_STYLE_ERASER;
476 }
477
478 int style = m_cfg.readEntry("eraserCursorStyle", int(-1));
479
480 // compatibility with future versions
481 if (style < 0 || style >= N_CURSOR_STYLE_SIZE) {
482 style = CURSOR_STYLE_ERASER;
483 }
484
485 return (CursorStyle) style;
486}
CursorStyle
Definition kis_global.h:62
@ N_CURSOR_STYLE_SIZE
Definition kis_global.h:74
@ CURSOR_STYLE_ERASER
Definition kis_global.h:72

References CURSOR_STYLE_ERASER, m_cfg, and N_CURSOR_STYLE_SIZE.

◆ eraserOutlineStyle()

OutlineStyle KisConfig::eraserOutlineStyle ( bool defaultValue = false) const

Definition at line 505 of file kis_config.cc.

506{
507 if (defaultValue) {
508 return OUTLINE_FULL;
509 }
510
511 int style = m_cfg.readEntry("eraserOutlineStyle", int(-1));
512
513 // compatibility with future versions
514 if (style < 0 || style >= N_OUTLINE_STYLE_SIZE) {
515 style = OUTLINE_FULL;
516 }
517
518 return (OutlineStyle) style;
519}
OutlineStyle
Definition kis_global.h:53
@ N_OUTLINE_STYLE_SIZE
Definition kis_global.h:59
@ OUTLINE_FULL
Definition kis_global.h:56

References m_cfg, N_OUTLINE_STYLE_SIZE, and OUTLINE_FULL.

◆ exportConfiguration()

KisPropertiesConfigurationSP KisConfig::exportConfiguration ( const QString & filterId,
bool defaultValue = false ) const

Definition at line 1996 of file kis_config.cc.

1997{
1999 const QString xmlData = exportConfigurationXML(filterId, defaultValue);
2000 cfg->fromXML(xmlData);
2001 return cfg;
2002}
QString exportConfigurationXML(const QString &filterId, bool defaultValue=false) const

References exportConfigurationXML().

◆ exportConfigurationXML()

QString KisConfig::exportConfigurationXML ( const QString & filterId,
bool defaultValue = false ) const

Definition at line 1991 of file kis_config.cc.

1992{
1993 return (defaultValue ? QString() : m_cfg.readEntry("ExportConfiguration-" + filterId, QString()));
1994}

References m_cfg.

◆ exportMimeType()

QString KisConfig::exportMimeType ( bool defaultValue) const

Definition at line 2470 of file kis_config.cc.

2471{
2472 return (defaultValue ? 0 : m_cfg.readEntry("defaultExportMimeType", QString()));
2473}

References m_cfg.

◆ favoriteCompositeOps()

QStringList KisConfig::favoriteCompositeOps ( bool defaultValue = false) const

Definition at line 1979 of file kis_config.cc.

1980{
1981 return (defaultValue ? QStringList() :
1982 m_cfg.readEntry("favoriteCompositeOps",
1983 QString("normal,erase,multiply,burn,darken,add,dodge,screen,overlay,soft_light_svg,luminize,lighten,saturation,color,divide").split(',')));
1984}
QList< QString > QStringList
QList< KoSubpath * > split(const KoPathShape &path)

References m_cfg.

◆ favoritePresets()

int KisConfig::favoritePresets ( bool defaultValue = false) const

Definition at line 2036 of file kis_config.cc.

2037{
2038 return (defaultValue ? 10: m_cfg.readEntry("numFavoritePresets", 10));
2039}

References m_cfg.

◆ ffmpegLocation()

QString KisConfig::ffmpegLocation ( bool defaultValue = false) const

Definition at line 2679 of file kis_config.cc.

2679 {
2680 return (defaultValue ? "" : m_cfg.readEntry("ffmpegLocation", ""));
2681}

References m_cfg.

◆ firstRun()

bool KisConfig::firstRun ( bool defaultValue = false) const

Definition at line 1825 of file kis_config.cc.

1826{
1827 return (defaultValue ? true : m_cfg.readEntry("firstRun", true));
1828}

References m_cfg.

◆ forceAlwaysFullSizedEraserOutline()

bool KisConfig::forceAlwaysFullSizedEraserOutline ( bool defaultValue = false) const

Definition at line 1460 of file kis_config.cc.

1461{
1462 return (defaultValue ? false : m_cfg.readEntry("forceAlwaysFullSizedEraserOutline", false));
1463}

References m_cfg.

◆ forceAlwaysFullSizedOutline()

bool KisConfig::forceAlwaysFullSizedOutline ( bool defaultValue = false) const

Definition at line 1438 of file kis_config.cc.

1439{
1440 return (defaultValue ? false : m_cfg.readEntry("forceAlwaysFullSizedOutline", false));
1441}

References m_cfg.

◆ forceOpenGLFenceWorkaround()

bool KisConfig::forceOpenGLFenceWorkaround ( bool defaultValue = false) const

Definition at line 1138 of file kis_config.cc.

1139{
1140 return (defaultValue ? false : m_cfg.readEntry("forceOpenGLFenceWorkaround", false));
1141}

References m_cfg.

◆ forcePaletteColors()

bool KisConfig::forcePaletteColors ( bool defaultValue = false) const

Definition at line 973 of file kis_config.cc.

974{
975 return (defaultValue ? false : m_cfg.readEntry("colorsettings/forcepalettecolors", false));
976}

References m_cfg.

◆ forceShowAutosaveMessages()

bool KisConfig::forceShowAutosaveMessages ( bool defaultValue = true) const

Definition at line 1009 of file kis_config.cc.

1010{
1011 return (defaultValue ? false : m_cfg.readEntry("forceShowAutosaveMessages", false));
1012}

References m_cfg.

◆ forceShowSaveMessages()

bool KisConfig::forceShowSaveMessages ( bool defaultValue = true) const

Definition at line 999 of file kis_config.cc.

1000{
1001 return (defaultValue ? false : m_cfg.readEntry("forceShowSaveMessages", false));
1002}

References m_cfg.

◆ fullscreenMode()

bool KisConfig::fullscreenMode ( bool defaultValue = false) const

Definition at line 1969 of file kis_config.cc.

1970{
1971 return (defaultValue ? true : m_cfg.readEntry("fullscreenMode", false));
1972}

References m_cfg.

◆ getCursorMainColor()

QColor KisConfig::getCursorMainColor ( bool defaultValue = false) const

Definition at line 383 of file kis_config.cc.

384{
385 QColor col;
386 col.setRgbF(1.0, 0.0, 1.0);
387 return (defaultValue ? col : m_cfg.readEntry("cursorMaincColor", col));
388}

References m_cfg.

◆ getDefaultGridSpacing()

QPoint KisConfig::getDefaultGridSpacing ( bool defaultValue = false) const

Definition at line 668 of file kis_config.cc.

669{
670 return (defaultValue ? QPoint(16, 16) : m_cfg.readEntry("defaultGridSpacing", QPoint(16, 16)));
671}

References m_cfg.

◆ getEraserCursorMainColor()

QColor KisConfig::getEraserCursorMainColor ( bool defaultValue = false) const

Definition at line 493 of file kis_config.cc.

494{
495 QColor col;
496 col.setRgbF(0.501961, 1.0, 0.501961);
497 return (defaultValue ? col : m_cfg.readEntry("eraserCursorMaincColor", col));
498}

References m_cfg.

◆ getGridIsoVerticalColor()

QColor KisConfig::getGridIsoVerticalColor ( bool defaultValue = false) const

Definition at line 1211 of file kis_config.cc.

1212{
1213 QColor col(150, 150, 150);
1214 return (defaultValue ? col : m_cfg.readEntry("gridisoverticalcolor", col));
1215}

References m_cfg.

◆ getGridIsoVerticalStyle()

quint32 KisConfig::getGridIsoVerticalStyle ( bool defaultValue = false) const

Definition at line 1177 of file kis_config.cc.

1178{
1179 int v = m_cfg.readEntry("gridisoverticalstyle", 0);
1180 v = qBound(0, v, 3);
1181 return (defaultValue ? 0 : v);
1182}

References m_cfg, and v.

◆ getGridMainColor()

QColor KisConfig::getGridMainColor ( bool defaultValue = false) const

Definition at line 1189 of file kis_config.cc.

1190{
1191 QColor col(99, 99, 99);
1192 return (defaultValue ? col : m_cfg.readEntry("gridmaincolor", col));
1193}

References m_cfg.

◆ getGridMainStyle()

quint32 KisConfig::getGridMainStyle ( bool defaultValue = false) const

Definition at line 1153 of file kis_config.cc.

1154{
1155 int v = m_cfg.readEntry("gridmainstyle", 0);
1156 v = qBound(0, v, 2);
1157 return (defaultValue ? 0 : v);
1158}

References m_cfg, and v.

◆ getGridSubdivisionColor()

QColor KisConfig::getGridSubdivisionColor ( bool defaultValue = false) const

Definition at line 1200 of file kis_config.cc.

1201{
1202 QColor col(150, 150, 150);
1203 return (defaultValue ? col : m_cfg.readEntry("gridsubdivisioncolor", col));
1204}

References m_cfg.

◆ getGridSubdivisionStyle()

quint32 KisConfig::getGridSubdivisionStyle ( bool defaultValue = false) const

Definition at line 1165 of file kis_config.cc.

1166{
1167 quint32 v = m_cfg.readEntry("gridsubdivisionstyle", 1);
1168 if (v > 2) v = 2;
1169 return (defaultValue ? 1 : v);
1170}

References m_cfg, and v.

◆ getMDIBackgroundColor()

QString KisConfig::getMDIBackgroundColor ( bool defaultValue = false) const

Definition at line 678 of file kis_config.cc.

679{
680 QColor col(77, 77, 77);
682 kol.fromQColor(col);
683 QString xml = kol.toXML();
684 return (defaultValue ? xml : m_cfg.readEntry("mdiBackgroundColorXML", xml));
685}

References KoColor::fromQColor(), KoColorSpaceRegistry::instance(), m_cfg, and KoColor::toXML().

◆ getMDIBackgroundImage()

QString KisConfig::getMDIBackgroundImage ( bool defaultValue = false) const

Definition at line 692 of file kis_config.cc.

693{
694 return (defaultValue ? "" : m_cfg.readEntry("mdiBackgroundImage", ""));
695}

References m_cfg.

◆ getPixelGridColor()

QColor KisConfig::getPixelGridColor ( bool defaultValue = false) const

Definition at line 1222 of file kis_config.cc.

1223{
1224 QColor col(255, 255, 255);
1225 return (defaultValue ? col : m_cfg.readEntry("pixelGridColor", col));
1226}

References m_cfg.

◆ getPixelGridDrawingThreshold()

qreal KisConfig::getPixelGridDrawingThreshold ( bool defaultValue = false) const

Definition at line 1233 of file kis_config.cc.

1234{
1235 qreal border = 24.0f;
1236 return (defaultValue ? border : m_cfg.readEntry("pixelGridDrawingThreshold", border));
1237}

References m_cfg.

◆ getScreenStringIdentfier()

const QString KisConfig::getScreenStringIdentfier ( int screenNo) const

Definition at line 901 of file kis_config.cc.

901 {
902 if (screenNo < 0 || screenNo >= QGuiApplication::screens().length()) {
903 return QString();
904 }
905 QScreen* screen = QGuiApplication::screens()[screenNo];
906
907 QString manufacturer = screen->manufacturer();
908 QString model = screen->model();
909 QString serialNumber = screen->serialNumber();
910
911 if (manufacturer == "" && model == "" && serialNumber == "") {
912 return QString(); // it would be scary to base the profile just on resolution
913 }
914
915 QString identifier = QStringList({manufacturer, model, serialNumber}).join("_");
916 return identifier;
917}
qreal length(const QPointF &vec)
Definition Ellipse.cc:82

References length().

◆ guidesColor()

QColor KisConfig::guidesColor ( bool defaultValue = false) const

Definition at line 1267 of file kis_config.cc.

1268{
1269 QColor col(99, 99, 99);
1270 return (defaultValue ? col : m_cfg.readEntry("guidesColor", col));
1271}

References m_cfg.

◆ guidesLineStyle()

quint32 KisConfig::guidesLineStyle ( bool defaultValue = false) const

Definition at line 1255 of file kis_config.cc.

1256{
1257 int v = m_cfg.readEntry("guidesLineStyle", 0);
1258 v = qBound(0, v, 2);
1259 return (defaultValue ? 0 : v);
1260}

References m_cfg, and v.

◆ hideDevFundBanner()

bool KisConfig::hideDevFundBanner ( bool defaultValue = false) const

Definition at line 1499 of file kis_config.cc.

1500{
1501 return defaultValue ? false : m_cfg.readEntry("hideDevFundBanner", false);
1502}

References m_cfg.

◆ hideDockersFullscreen()

bool KisConfig::hideDockersFullscreen ( bool defaultValue = false) const

Definition at line 1879 of file kis_config.cc.

1880{
1881 return (defaultValue ? true : m_cfg.readEntry("hideDockersFullScreen", true));
1882}

References m_cfg.

◆ hideMenuFullscreen()

bool KisConfig::hideMenuFullscreen ( bool defaultValue = false) const

Definition at line 1919 of file kis_config.cc.

1920{
1921 return (defaultValue ? true: m_cfg.readEntry("hideMenuFullScreen", true));
1922}

References m_cfg.

◆ hidePopups()

bool KisConfig::hidePopups ( bool defaultValue = false) const

Definition at line 2211 of file kis_config.cc.

2212{
2213 return (defaultValue ? false : m_cfg.readEntry("hidePopups", false));
2214}

References m_cfg.

◆ hideScrollbars()

bool KisConfig::hideScrollbars ( bool defaultValue = false) const

Definition at line 1345 of file kis_config.cc.

1346{
1347 return (defaultValue ? false : m_cfg.readEntry("hideScrollbars", false));
1348}

References m_cfg.

◆ hideScrollbarsFullscreen()

bool KisConfig::hideScrollbarsFullscreen ( bool defaultValue = false) const

Definition at line 1929 of file kis_config.cc.

1930{
1931 return (defaultValue ? true : m_cfg.readEntry("hideScrollbarsFullScreen", true));
1932}

References m_cfg.

◆ hideStatusbarFullscreen()

bool KisConfig::hideStatusbarFullscreen ( bool defaultValue = false) const

Definition at line 1939 of file kis_config.cc.

1940{
1941 return (defaultValue ? true: m_cfg.readEntry("hideStatusbarFullScreen", true));
1942}

References m_cfg.

◆ hideTitlebarFullscreen()

bool KisConfig::hideTitlebarFullscreen ( bool defaultValue = false) const

Definition at line 1949 of file kis_config.cc.

1950{
1951 return (defaultValue ? true : m_cfg.readEntry("hideTitleBarFullscreen", true));
1952}

References m_cfg.

◆ hideToolbarFullscreen()

bool KisConfig::hideToolbarFullscreen ( bool defaultValue = false) const

Definition at line 1959 of file kis_config.cc.

1960{
1961 return (defaultValue ? true : m_cfg.readEntry("hideToolbarFullscreen", true));
1962}

References m_cfg.

◆ horizontalSplitLines()

int KisConfig::horizontalSplitLines ( bool defaultValue = false) const

Definition at line 1849 of file kis_config.cc.

1850{
1851 return (defaultValue ? 1 : m_cfg.readEntry("horizontalSplitLines", 1));
1852}

References m_cfg.

◆ iconsInMenu()

KisConfig::IconsInMenu KisConfig::iconsInMenu ( bool defaultValue = false) const

Definition at line 1480 of file kis_config.cc.

1481{
1482 int value = defaultValue ? IIM_Default : m_cfg.readEntry("iconsInMenu", (int)IIM_Default);
1484}

References IIM_Default, m_cfg, and value().

◆ ignoreHighFunctionKeys()

bool KisConfig::ignoreHighFunctionKeys ( bool defaultValue = false) const

Definition at line 2391 of file kis_config.cc.

2392{
2393 return (defaultValue ? true : m_cfg.readEntry("ignoreHighFunctionKeys", true));
2394}

References m_cfg.

◆ importConfiguration()

QString KisConfig::importConfiguration ( const QString & filterId,
bool defaultValue = false ) const

Definition at line 2010 of file kis_config.cc.

2011{
2012 return (defaultValue ? QString() : m_cfg.readEntry("ImportConfiguration-" + filterId, QString()));
2013}

References m_cfg.

◆ importProfile()

QString KisConfig::importProfile ( bool defaultValue = false) const

◆ kineticScrollingEnabled()

bool KisConfig::kineticScrollingEnabled ( bool defaultValue = false) const

Definition at line 2490 of file kis_config.cc.

2491{
2492 return (defaultValue ? true : m_cfg.readEntry("KineticScrollingEnabled", true));
2493}

References m_cfg.

◆ kineticScrollingGesture()

int KisConfig::kineticScrollingGesture ( bool defaultValue = false) const

Definition at line 2500 of file kis_config.cc.

2501{
2502#ifdef Q_OS_ANDROID
2503 int defaultGesture = 1; // LeftMouseButtonGesture
2504#else
2505 int defaultGesture = 2; // MiddleMouseButtonGesture
2506#endif
2507
2508 return (defaultValue ? defaultGesture : m_cfg.readEntry("KineticScrollingGesture", defaultGesture));
2509}

References m_cfg.

◆ kineticScrollingHiddenScrollbars()

bool KisConfig::kineticScrollingHiddenScrollbars ( bool defaultValue = false) const

Definition at line 2526 of file kis_config.cc.

2527{
2528 return (defaultValue ? false : m_cfg.readEntry("KineticScrollingHideScrollbar", false));
2529}

References m_cfg.

◆ kineticScrollingSensitivity()

int KisConfig::kineticScrollingSensitivity ( bool defaultValue = false) const

Definition at line 2516 of file kis_config.cc.

2517{
2518 return (defaultValue ? 75 : m_cfg.readEntry("KineticScrollingSensitivity", 75));
2519}

References m_cfg.

◆ lastUsedOutlineStyle()

OutlineStyle KisConfig::lastUsedOutlineStyle ( bool defaultValue = false) const

Definition at line 444 of file kis_config.cc.

445{
446 if (defaultValue) {
447 return OUTLINE_NONE;
448 }
449
450 int style = m_cfg.readEntry("lastUsedOutlineStyle", int(-1));
451
452 return (OutlineStyle) style;
453}
@ OUTLINE_NONE
Definition kis_global.h:54

References m_cfg, and OUTLINE_NONE.

◆ layerInfoTextOpacity()

int KisConfig::layerInfoTextOpacity ( bool defaultValue = false) const

Definition at line 2983 of file kis_config.cc.

2984{
2985 return defaultValue ? 55 : m_cfg.readEntry("layerInfoTextOpacity", 55);
2986}

References m_cfg.

◆ layerInfoTextStyle()

KisConfig::LayerInfoTextStyle KisConfig::layerInfoTextStyle ( bool defaultValue = false) const

Definition at line 2973 of file kis_config.cc.

2974{
2975 return (KisConfig::LayerInfoTextStyle)(defaultValue ? INFOTEXT_NONE : m_cfg.readEntry("layerInfoTextStyle", (int)INFOTEXT_NONE));
2976}

References INFOTEXT_NONE, and m_cfg.

◆ layerThumbnailGenerationTimeout()

int KisConfig::layerThumbnailGenerationTimeout ( bool defaultValue = false) const

The timeout for the layer thumbnail generation after which the thumbnail algorithm will be switched to an imprecise one.

Measured in milliseconds.

Definition at line 3048 of file kis_config.cc.

3049{
3050 return defaultValue ? 40 : m_cfg.readEntry("layerThumbnailGenerationTimeout", 40);
3051}

References m_cfg.

◆ layerThumbnailSize()

int KisConfig::layerThumbnailSize ( bool defaultValue = false) const

Definition at line 2141 of file kis_config.cc.

2142{
2143 return (defaultValue ? 20 : m_cfg.readEntry("layerThumbnailSize", 20));
2144}

References m_cfg.

◆ layerTreeIndentation()

int KisConfig::layerTreeIndentation ( bool defaultValue = false) const

Definition at line 2151 of file kis_config.cc.

2152{
2153 return (defaultValue ? 50 : m_cfg.readEntry("layerTreeIndentation", 50));
2154}

References m_cfg.

◆ levelOfDetailEnabled()

bool KisConfig::levelOfDetailEnabled ( bool defaultValue = false) const

Definition at line 2046 of file kis_config.cc.

2047{
2048 return (defaultValue ? false : m_cfg.readEntry("levelOfDetailEnabled", false));
2049}

References m_cfg.

◆ lineSmoothingDelayDistance()

qreal KisConfig::lineSmoothingDelayDistance ( bool defaultValue = false) const

Definition at line 2331 of file kis_config.cc.

2332{
2333 return (defaultValue ? 50.0 : m_cfg.readEntry("LineSmoothingDelayDistance", 50.0));
2334}

References m_cfg.

◆ lineSmoothingDistanceKeepAspectRatio()

bool KisConfig::lineSmoothingDistanceKeepAspectRatio ( bool defaultValue = false) const

Definition at line 2291 of file kis_config.cc.

2292{
2293 return (defaultValue ? true : m_cfg.readEntry("LineSmoothingDistanceKeepAspectRatio", true));
2294}

References m_cfg.

◆ lineSmoothingDistanceMax()

qreal KisConfig::lineSmoothingDistanceMax ( bool defaultValue = false) const

Definition at line 2281 of file kis_config.cc.

2282{
2283 return (defaultValue ? 50.0 : m_cfg.readEntry("LineSmoothingDistanceMax", 50.0));
2284}

References m_cfg.

◆ lineSmoothingDistanceMin()

qreal KisConfig::lineSmoothingDistanceMin ( bool defaultValue = false) const

Definition at line 2271 of file kis_config.cc.

2272{
2273 return (defaultValue ? 50.0 : m_cfg.readEntry("LineSmoothingDistanceMin", 50.0));
2274}

References m_cfg.

◆ lineSmoothingFinishStabilizedCurve()

bool KisConfig::lineSmoothingFinishStabilizedCurve ( bool defaultValue = false) const

Definition at line 2351 of file kis_config.cc.

2352{
2353 return (defaultValue ? true : m_cfg.readEntry("LineSmoothingFinishStabilizedCurve", true));
2354}

References m_cfg.

◆ lineSmoothingScalableDistance()

bool KisConfig::lineSmoothingScalableDistance ( bool defaultValue = false) const

Definition at line 2321 of file kis_config.cc.

2322{
2323 return (defaultValue ? true : m_cfg.readEntry("LineSmoothingScalableDistance", true));
2324}

References m_cfg.

◆ lineSmoothingSmoothPressure()

bool KisConfig::lineSmoothingSmoothPressure ( bool defaultValue = false) const

Definition at line 2311 of file kis_config.cc.

2312{
2313 return (defaultValue ? false : m_cfg.readEntry("LineSmoothingSmoothPressure", false));
2314}

References m_cfg.

◆ lineSmoothingStabilizeSensors()

bool KisConfig::lineSmoothingStabilizeSensors ( bool defaultValue = false) const

Definition at line 2361 of file kis_config.cc.

2362{
2363 return (defaultValue ? true : m_cfg.readEntry("LineSmoothingStabilizeSensors", true));
2364}

References m_cfg.

◆ lineSmoothingTailAggressiveness()

qreal KisConfig::lineSmoothingTailAggressiveness ( bool defaultValue = false) const

Definition at line 2301 of file kis_config.cc.

2302{
2303 return (defaultValue ? 0.15 : m_cfg.readEntry("LineSmoothingTailAggressiveness", 0.15));
2304}

References m_cfg.

◆ lineSmoothingType()

int KisConfig::lineSmoothingType ( bool defaultValue = false) const

Definition at line 2261 of file kis_config.cc.

2262{
2263 return (defaultValue ? 1 : m_cfg.readEntry("LineSmoothingType", 1));
2264}

References m_cfg.

◆ lineSmoothingUseDelayDistance()

bool KisConfig::lineSmoothingUseDelayDistance ( bool defaultValue = false) const

Definition at line 2341 of file kis_config.cc.

2342{
2343 return (defaultValue ? true : m_cfg.readEntry("LineSmoothingUseDelayDistance", true));
2344}

References m_cfg.

◆ loadSnapConfig()

void KisConfig::loadSnapConfig ( KisSnapConfig * config,
bool defaultValue = false ) const

Definition at line 1278 of file kis_config.cc.

1279{
1280 KisSnapConfig defaultConfig(false);
1281
1282 if (defaultValue) {
1283 *config = defaultConfig;
1284 return;
1285 }
1286
1287 config->setOrthogonal(m_cfg.readEntry("globalSnapOrthogonal", defaultConfig.orthogonal()));
1288 config->setNode(m_cfg.readEntry("globalSnapNode", defaultConfig.node()));
1289 config->setExtension(m_cfg.readEntry("globalSnapExtension", defaultConfig.extension()));
1290 config->setIntersection(m_cfg.readEntry("globalSnapIntersection", defaultConfig.intersection()));
1291 config->setBoundingBox(m_cfg.readEntry("globalSnapBoundingBox", defaultConfig.boundingBox()));
1292 config->setImageBounds(m_cfg.readEntry("globalSnapImageBounds", defaultConfig.imageBounds()));
1293 config->setImageCenter(m_cfg.readEntry("globalSnapImageCenter", defaultConfig.imageCenter()));
1294 config->setToPixel(m_cfg.readEntry("globalSnapToPixel", defaultConfig.toPixel()));
1295}
void setImageCenter(bool value)
void setIntersection(bool value)
void setOrthogonal(bool value)
void setExtension(bool value)
void setToPixel(bool value)
void setBoundingBox(bool value)
void setImageBounds(bool value)
void setNode(bool value)

References KisSnapConfig::boundingBox(), KisSnapConfig::extension(), KisSnapConfig::imageBounds(), KisSnapConfig::imageCenter(), KisSnapConfig::intersection(), m_cfg, KisSnapConfig::node(), KisSnapConfig::orthogonal(), KisSnapConfig::setBoundingBox(), KisSnapConfig::setExtension(), KisSnapConfig::setImageBounds(), KisSnapConfig::setImageCenter(), KisSnapConfig::setIntersection(), KisSnapConfig::setNode(), KisSnapConfig::setOrthogonal(), KisSnapConfig::setToPixel(), and KisSnapConfig::toPixel().

◆ logImportantSettings

void KisConfig::logImportantSettings ( ) const
slot

Log the most interesting settings to the usage log.

Definition at line 76 of file kis_config.cc.

77{
78 KisUsageLogger::writeSysInfo("Current Settings\n");
79 KisUsageLogger::writeSysInfo(QString(" Current Swap Location: %1").arg(KisImageConfig(true).swapDir()));
80 KisUsageLogger::writeSysInfo(QString(" Current Swap Location writable: %1").arg(QFileInfo(KisImageConfig(true).swapDir()).isWritable() ? "true" : "false"));
81 KisUsageLogger::writeSysInfo(QString(" Undo Enabled: %1").arg(undoEnabled()? "true" : "false"));
82 KisUsageLogger::writeSysInfo(QString(" Undo Stack Limit: %1").arg(undoStackLimit()));
83 KisUsageLogger::writeSysInfo(QString(" Use OpenGL: %1").arg(useOpenGL() ? "true" : "false"));
84 KisUsageLogger::writeSysInfo(QString(" Use OpenGL Texture Buffer: %1").arg(useOpenGLTextureBuffer() ? "true" : "false"));
85 KisUsageLogger::writeSysInfo(QString(" Disable Vector Optimizations: %1").arg(disableVectorOptimizations() ? "true" : "false"));
86 KisUsageLogger::writeSysInfo(QString(" Disable AVX Optimizations: %1").arg(disableAVXOptimizations() ? "true" : "false"));
87 KisUsageLogger::writeSysInfo(QString(" Canvas State: %1").arg(canvasState()));
88 KisUsageLogger::writeSysInfo(QString(" Autosave Interval: %1").arg(autoSaveInterval()));
89 KisUsageLogger::writeSysInfo(QString(" Use Backup Files: %1").arg(backupFile() ? "true" : "false"));
90 KisUsageLogger::writeSysInfo(QString(" Number of Backups Kept: %1").arg(m_cfg.readEntry("numberofbackupfiles", 1)));
91 KisUsageLogger::writeSysInfo(QString(" Backup File Suffix: %1").arg(m_cfg.readEntry("backupfilesuffix", "~")));
92
93 QString backupDir;
94 switch(m_cfg.readEntry("backupfilelocation", 0)) {
95 case 1:
96 backupDir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
97 break;
98 case 2:
99 backupDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
100 break;
101 default:
102 // Do nothing: the empty string is user file location
103 backupDir = "Same Folder as the File";
104 }
105 KisUsageLogger::writeSysInfo(QString(" Backup Location: %1").arg(backupDir));
106 KisUsageLogger::writeSysInfo(QString(" Backup Location writable: %1").arg(QFileInfo(backupDir).isWritable() ? "true" : "false"));
107 KisUsageLogger::writeSysInfo(QString(" Resource Location: %1").arg(m_cfg.readEntry(KisResourceLocator::resourceLocationKey)));
108
109 KisUsageLogger::writeSysInfo(QString(" Use Win8 Pointer Input: %1").arg(useWin8PointerInput() ? "true" : "false"));
110 KisUsageLogger::writeSysInfo(QString(" Use RightMiddleTabletButton Workaround: %1").arg(useRightMiddleTabletButtonWorkaround() ? "true" : "false"));
111 KisUsageLogger::writeSysInfo(QString(" Levels of Detail Enabled: %1").arg(levelOfDetailEnabled() ? "true" : "false"));
112 KisUsageLogger::writeSysInfo(QString(" Use Zip64: %1").arg(useZip64() ? "true" : "false"));
113
115
116 // Tablet API information
117#if defined Q_OS_WIN && QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
118{
119 auto tabletAPIName = [] (bool useWinTab) {
120 return useWinTab ? "WinTab" : "WinInk";
121 };
122
123 QString actualTabletProtocol = "<unknown>";
124
125 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
126 if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
127 actualTabletProtocol = tabletAPIName(nativeWindowsApp->isWinTabEnabled());
128 } else {
129 KisUsageLogger::log("WARNING: Failed to fetch WinTab protocol status: QWindowsApplication is not available");
130 }
131
132 KisUsageLogger::writeSysInfo("Tablet API Information\n");
133 KisUsageLogger::writeSysInfo(QString(" User-selected tablet API: %1").arg(tabletAPIName(!useWin8PointerInput())));
134 KisUsageLogger::writeSysInfo(QString(" Actually used tablet API: %1").arg(actualTabletProtocol));
136}
137#endif
138
139}
bool backupFile(bool defaultValue=false) const
bool disableVectorOptimizations(bool defaultValue=false) const
bool levelOfDetailEnabled(bool defaultValue=false) const
bool useZip64(bool defaultValue=false) const
bool useWin8PointerInput(bool defaultValue=false) const
bool useOpenGLTextureBuffer(bool defaultValue=false) const
bool useRightMiddleTabletButtonWorkaround(bool defaultValue=false) const
int autoSaveInterval(bool defaultValue=false) const
QString canvasState(bool defaultValue=false) const
bool useOpenGL(bool defaultValue=false) const
int undoStackLimit(bool defaultValue=false) const
bool disableAVXOptimizations(bool defaultValue=false) const
bool undoEnabled(bool defaultValue=false) const
static const QString resourceLocationKey
static void log(const QString &message)
Logs with date/time.
static void writeSysInfo(const QString &message)
Writes to the system information file and Krita log.

References autoSaveInterval(), backupFile(), canvasState(), disableAVXOptimizations(), disableVectorOptimizations(), levelOfDetailEnabled(), KisUsageLogger::log(), m_cfg, KisResourceLocator::resourceLocationKey, undoEnabled(), undoStackLimit(), useOpenGL(), useOpenGLTextureBuffer(), useRightMiddleTabletButtonWorkaround(), useWin8PointerInput(), useZip64(), and KisUsageLogger::writeSysInfo().

◆ longPressEnabled()

bool KisConfig::longPressEnabled ( bool defaultValue = false) const

Definition at line 3028 of file kis_config.cc.

3029{
3030#ifdef Q_OS_ANDROID
3031 bool defaultEnabled = true;
3032#else
3033 bool defaultEnabled = false;
3034#endif
3035 if (defaultValue) {
3036 return defaultEnabled;
3037 } else {
3038 return m_cfg.readEntry("longPressEnabled", defaultEnabled);
3039 }
3040}

References m_cfg.

◆ monitorProfile()

QString KisConfig::monitorProfile ( int screen) const

get the profile the user has selected for the given screen

Screen identifier may be empty (e.g. on macOS), so the identifier key will be plain 'monitorProfile', which is the key for the first display's profile, so we shouldn't fall into this trap...

Definition at line 832 of file kis_config.cc.

833{
834 // Note: keep this in sync with the default profile for the RGB colorspaces!
835 const QString defaultProfile = "sRGB-elle-V2-srgbtrc.icc";
836
837 QString profile;
838 const QString screenIdentifier = getScreenStringIdentfier(screen);
839 const QString screenIdentifierKey = "monitorProfile" + screenIdentifier;
840
846 if (!screenIdentifier.isEmpty() && m_cfg.hasKey(screenIdentifierKey)) {
847 profile = m_cfg.readEntry(screenIdentifierKey, defaultProfile);
848 } else {
849 profile = m_cfg.readEntry("monitorProfile" + QString(screen == 0 ? "": QString("_%1").arg(screen)), defaultProfile);
850 }
851
852 //dbgKrita << "KisConfig::monitorProfile()" << profile;
853 return profile;
854}
const QString getScreenStringIdentfier(int screenNo) const

References getScreenStringIdentfier(), and m_cfg.

◆ monitorRenderIntent()

qint32 KisConfig::monitorRenderIntent ( bool defaultValue = false) const

Definition at line 1049 of file kis_config.cc.

1050{
1051 qint32 intent = m_cfg.readEntry("renderIntent", INTENT_RELATIVE_COLORIMETRIC);
1052 if (intent > 3) intent = 3;
1053 if (intent < 0) intent = 0;
1054 return (defaultValue ? INTENT_RELATIVE_COLORIMETRIC : intent);
1055}
#define INTENT_RELATIVE_COLORIMETRIC
Definition kis_global.h:104

References INTENT_RELATIVE_COLORIMETRIC, and m_cfg.

◆ newCursorStyle()

CursorStyle KisConfig::newCursorStyle ( bool defaultValue = false) const

Definition at line 323 of file kis_config.cc.

324{
325 if (defaultValue) {
327 }
328
329
330 int style = m_cfg.readEntry("newCursorStyle", int(-1));
331
332 if (style < 0) {
333 // old style format
334 style = m_cfg.readEntry("cursorStyleDef", int(OLD_CURSOR_STYLE_OUTLINE));
335
336 switch (style) {
338 style = CURSOR_STYLE_TOOLICON;
339 break;
343 break;
345 style = CURSOR_STYLE_POINTER;
346 break;
350 break;
354 break;
358 break;
362 break;
363 default:
364 style = -1;
365 }
366 }
367
369
370 // compatibility with future versions
371 if (style < 0 || style >= N_CURSOR_STYLE_SIZE) {
373 }
374
375 return (CursorStyle) style;
376}
void cleanOldCursorStyleKeys(KConfigGroup &cfg)
@ OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_RIGHTHANDED
Definition kis_global.h:93
@ OLD_CURSOR_STYLE_OUTLINE
Definition kis_global.h:82
@ OLD_CURSOR_STYLE_OUTLINE_CENTER_CROSS
Definition kis_global.h:88
@ OLD_CURSOR_STYLE_CROSSHAIR
Definition kis_global.h:79
@ OLD_CURSOR_STYLE_NO_CURSOR
Definition kis_global.h:84
@ OLD_CURSOR_STYLE_TOOLICON
Definition kis_global.h:78
@ OLD_CURSOR_STYLE_TRIANGLE_LEFTHANDED
Definition kis_global.h:91
@ OLD_CURSOR_STYLE_POINTER
Definition kis_global.h:80
@ OLD_CURSOR_STYLE_OUTLINE_CENTER_DOT
Definition kis_global.h:87
@ OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_LEFTHANDED
Definition kis_global.h:94
@ OLD_CURSOR_STYLE_TRIANGLE_RIGHTHANDED
Definition kis_global.h:90
@ OLD_CURSOR_STYLE_SMALL_ROUND
Definition kis_global.h:85
@ CURSOR_STYLE_POINTER
Definition kis_global.h:65
@ CURSOR_STYLE_SMALL_ROUND
Definition kis_global.h:66
@ CURSOR_STYLE_CROSSHAIR
Definition kis_global.h:67
@ CURSOR_STYLE_TOOLICON
Definition kis_global.h:64
@ CURSOR_STYLE_TRIANGLE_RIGHTHANDED
Definition kis_global.h:68
@ CURSOR_STYLE_TRIANGLE_LEFTHANDED
Definition kis_global.h:69
@ CURSOR_STYLE_NO_CURSOR
Definition kis_global.h:63

References cleanOldCursorStyleKeys(), CURSOR_STYLE_CROSSHAIR, CURSOR_STYLE_NO_CURSOR, CURSOR_STYLE_POINTER, CURSOR_STYLE_SMALL_ROUND, CURSOR_STYLE_TOOLICON, CURSOR_STYLE_TRIANGLE_LEFTHANDED, CURSOR_STYLE_TRIANGLE_RIGHTHANDED, m_cfg, N_CURSOR_STYLE_SIZE, OLD_CURSOR_STYLE_CROSSHAIR, OLD_CURSOR_STYLE_NO_CURSOR, OLD_CURSOR_STYLE_OUTLINE, OLD_CURSOR_STYLE_OUTLINE_CENTER_CROSS, OLD_CURSOR_STYLE_OUTLINE_CENTER_DOT, OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_LEFTHANDED, OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_RIGHTHANDED, OLD_CURSOR_STYLE_POINTER, OLD_CURSOR_STYLE_SMALL_ROUND, OLD_CURSOR_STYLE_TOOLICON, OLD_CURSOR_STYLE_TRIANGLE_LEFTHANDED, and OLD_CURSOR_STYLE_TRIANGLE_RIGHTHANDED.

◆ newOutlineStyle()

OutlineStyle KisConfig::newOutlineStyle ( bool defaultValue = false) const

Definition at line 395 of file kis_config.cc.

396{
397 if (defaultValue) {
398 return OUTLINE_FULL;
399 }
400
401 int style = m_cfg.readEntry("newOutlineStyle", int(-1));
402
403 if (style < 0) {
404 // old style format
405 style = m_cfg.readEntry("cursorStyleDef", int(OLD_CURSOR_STYLE_OUTLINE));
406
407 switch (style) {
415 style = OUTLINE_NONE;
416 break;
422 style = OUTLINE_FULL;
423 break;
424 default:
425 style = -1;
426 }
427 }
428
430
431 // compatibility with future versions
432 if (style < 0 || style >= N_OUTLINE_STYLE_SIZE) {
433 style = OUTLINE_FULL;
434 }
435
436 return (OutlineStyle) style;
437}

References cleanOldCursorStyleKeys(), m_cfg, N_OUTLINE_STYLE_SIZE, OLD_CURSOR_STYLE_CROSSHAIR, OLD_CURSOR_STYLE_NO_CURSOR, OLD_CURSOR_STYLE_OUTLINE, OLD_CURSOR_STYLE_OUTLINE_CENTER_CROSS, OLD_CURSOR_STYLE_OUTLINE_CENTER_DOT, OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_LEFTHANDED, OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_RIGHTHANDED, OLD_CURSOR_STYLE_POINTER, OLD_CURSOR_STYLE_SMALL_ROUND, OLD_CURSOR_STYLE_TOOLICON, OLD_CURSOR_STYLE_TRIANGLE_LEFTHANDED, OLD_CURSOR_STYLE_TRIANGLE_RIGHTHANDED, OUTLINE_FULL, and OUTLINE_NONE.

◆ newsCheckEnabled()

bool KisConfig::newsCheckEnabled ( ) const

Definition at line 3058 of file kis_config.cc.

3059{
3060 return m_cfg.readEntry(QStringLiteral("newsCheckEnabled"), true);
3061}

References m_cfg.

◆ newsFirstStartup()

bool KisConfig::newsFirstStartup ( ) const

Definition at line 3068 of file kis_config.cc.

3069{
3070 return m_cfg.readEntry(QStringLiteral("newsFirstStartup"), true);
3071}

References m_cfg.

◆ numDefaultLayers()

int KisConfig::numDefaultLayers ( const QLatin1String & dialogType,
bool defaultValue = false ) const

Definition at line 2221 of file kis_config.cc.

2222{
2223 return (defaultValue ? 2 : m_cfg.readEntry(dialogType + "NumberOfLayersForNewImage", 2));
2224}

References m_cfg.

◆ numMipmapLevels()

int KisConfig::numMipmapLevels ( bool defaultValue = false) const

Definition at line 1143 of file kis_config.cc.

1144{
1145 return (defaultValue ? 4 : m_cfg.readEntry("numMipmapLevels", 4));
1146}

References m_cfg.

◆ ocioColorManagementMode()

KisConfig::OcioColorManagementMode KisConfig::ocioColorManagementMode ( bool defaultValue = false) const

Definition at line 2081 of file kis_config.cc.

2082{
2083 // FIXME: this option duplicates ocioConfiguration(), please deprecate it
2084 return (OcioColorManagementMode)(defaultValue ? INTERNAL
2085 : m_cfg.readEntry("Krita/Ocio/OcioColorManagementMode", (int) INTERNAL));
2086}
OcioColorManagementMode
Definition kis_config.h:553

References INTERNAL, and m_cfg.

◆ ocioConfiguration()

KisOcioConfiguration KisConfig::ocioConfiguration ( bool defaultValue = false) const

Definition at line 2056 of file kis_config.cc.

2057{
2059
2060 if (!defaultValue) {
2061 cfg.mode = (KisOcioConfiguration::Mode)m_cfg.readEntry("Krita/Ocio/OcioColorManagementMode", 0);
2062 cfg.configurationPath = m_cfg.readEntry("Krita/Ocio/OcioConfigPath", QString());
2063 cfg.lutPath = m_cfg.readEntry("Krita/Ocio/OcioLutPath", QString());
2064 cfg.inputColorSpace = m_cfg.readEntry("Krita/Ocio/InputColorSpace", QString());
2065 cfg.displayDevice = m_cfg.readEntry("Krita/Ocio/DisplayDevice", QString());
2066 }
2067
2068 return cfg;
2069}

References KisOcioConfiguration::configurationPath, KisOcioConfiguration::displayDevice, KisOcioConfiguration::inputColorSpace, KisOcioConfiguration::lutPath, m_cfg, and KisOcioConfiguration::mode.

◆ ocioLockColorVisualRepresentation()

bool KisConfig::ocioLockColorVisualRepresentation ( bool defaultValue = false) const

Definition at line 2104 of file kis_config.cc.

2105{
2106 return (defaultValue ? false : m_cfg.readEntry("Krita/Ocio/OcioLockColorVisualRepresentation", false));
2107}

References m_cfg.

◆ ocioLutEdgeSize()

int KisConfig::ocioLutEdgeSize ( bool defaultValue = false) const

Definition at line 2094 of file kis_config.cc.

2095{
2096 return (defaultValue ? 64 : m_cfg.readEntry("Krita/Ocio/LutEdgeSize", 64));
2097}

References m_cfg.

◆ openGLFilteringMode()

int KisConfig::openGLFilteringMode ( bool defaultValue = false) const

Definition at line 1084 of file kis_config.cc.

1085{
1086 return (defaultValue ? 3 : m_cfg.readEntry("OpenGLFilterMode", 3));
1087}

References m_cfg.

◆ openGLTextureSize()

int KisConfig::openGLTextureSize ( bool defaultValue = false) const

Definition at line 1133 of file kis_config.cc.

1134{
1135 return (defaultValue ? 256 : m_cfg.readEntry("textureSize", 256));
1136}

References m_cfg.

◆ operator=()

KisConfig & KisConfig::operator= ( const KisConfig & ) const
private

◆ outlineSizeMinimum()

qreal KisConfig::outlineSizeMinimum ( bool defaultValue = false) const

Definition at line 1509 of file kis_config.cc.

1510{
1511 return (defaultValue ? 1.0 : m_cfg.readEntry("OutlineSizeMinimum", 1.0));
1512}

References m_cfg.

◆ paintopPopupDetached()

bool KisConfig::paintopPopupDetached ( bool defaultValue = false) const

Definition at line 1601 of file kis_config.cc.

1602{
1603 return (defaultValue ? true : m_cfg.readEntry("PaintopPopupDetached", true));
1604}

References m_cfg.

◆ pasteBehaviour()

qint32 KisConfig::pasteBehaviour ( bool defaultValue = false) const

Definition at line 1029 of file kis_config.cc.

1030{
1031 return (defaultValue ? 2 : m_cfg.readEntry("pasteBehaviour", 2));
1032}

References m_cfg.

◆ pasteFormat()

qint32 KisConfig::pasteFormat ( bool defaultValue) const

Definition at line 1039 of file kis_config.cc.

1040{
1041 return defaultValue ? 0 : m_cfg.readEntry("pasteFormat", 0);
1042}

References m_cfg.

◆ pixelGridEnabled()

bool KisConfig::pixelGridEnabled ( bool defaultValue = false) const

Definition at line 1244 of file kis_config.cc.

1245{
1246 bool enabled = true;
1247 return (defaultValue ? enabled : m_cfg.readEntry("pixelGridEnabled", enabled));
1248}

References m_cfg.

◆ preferredVectorImportResolutionPPI()

int KisConfig::preferredVectorImportResolutionPPI ( bool defaultValue = false) const

Definition at line 292 of file kis_config.cc.

293{
294 return defaultValue ? 100.0 : m_cfg.readEntry("preferredVectorImportResolution", 100.0);
295}

References m_cfg.

◆ preferXcbEglProvider() [1/2]

bool KisConfig::preferXcbEglProvider ( bool defaultValue = false) const

Definition at line 1119 of file kis_config.cc.

1120{
1121 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1122 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1123 return preferXcbEglProvider(&kritarc, defaultValue);
1124}
static bool preferXcbEglProvider(const QSettings *settings, bool defaultValue=false)

References preferXcbEglProvider().

◆ preferXcbEglProvider() [2/2]

bool KisConfig::preferXcbEglProvider ( const QSettings * settings,
bool defaultValue = false )
static

Definition at line 1114 of file kis_config.cc.

1115{
1116 return (defaultValue ? false : settings->value("preferXcbEglProvider", false).toBool());
1117}

◆ presetChooserViewMode()

int KisConfig::presetChooserViewMode ( bool defaultValue = false) const

Definition at line 1804 of file kis_config.cc.

1805{
1806 // For like 10 people that used a nightly after brush preview was merged, but before the detail option was removed.
1807 return std::min(2, (defaultValue ? 1 : m_cfg.readEntry("presetChooserViewMode", 1)));
1808}

References m_cfg.

◆ presetIconSize()

int KisConfig::presetIconSize ( bool defaultValue = false) const

Definition at line 1815 of file kis_config.cc.

1816{
1817 return (defaultValue ? 60 : m_cfg.readEntry("presetIconSize", 60));
1818}

References m_cfg.

◆ presetStripVisible()

bool KisConfig::presetStripVisible ( bool defaultValue = false) const

Definition at line 2181 of file kis_config.cc.

2182{
2183 return (defaultValue ? true : m_cfg.readEntry("presetStripVisible", true));
2184}

References m_cfg.

◆ pressureTabletCurve()

QString KisConfig::pressureTabletCurve ( bool defaultValue = false) const

Definition at line 1611 of file kis_config.cc.

1612{
1613 QString fallback = DEFAULT_CURVE_STRING;
1614#ifdef Q_OS_ANDROID
1615 // Xiaomi styluses need superhuman strength to reach full input pressure.
1616 // We use a much steeper default pressure curve for them by default that
1617 // effectively caps out at 70% pressure to make it at least bearable. A
1618 // note for a possible future: Apple styluses have an even greater range,
1619 // so if we somehow end up on iPads, we'll probably need to make those cap
1620 // out at 50% pressure at most something like: "0,0;0.5,1.0;"
1622 fallback = QStringLiteral("0,0;0.7,1;");
1623 }
1624#endif
1625 return (defaultValue ? fallback : m_cfg.readEntry("tabletPressureCurve", fallback));
1626}
const QString DEFAULT_CURVE_STRING

References DEFAULT_CURVE_STRING, KisAndroidUtils::looksLikeXiaomiDevice(), and m_cfg.

◆ printerColorSpace()

QString KisConfig::printerColorSpace ( bool defaultValue = false) const

Definition at line 929 of file kis_config.cc.

930{
931 //TODO currently only rgb8 is supported
932 //return (defaultValue ? "RGBA" : m_cfg.readEntry("printerColorSpace", "RGBA"));
933 return QString("RGBA");
934}

◆ printerProfile()

QString KisConfig::printerProfile ( bool defaultValue = false) const

Definition at line 942 of file kis_config.cc.

943{
944 return (defaultValue ? "" : m_cfg.readEntry("printerProfile", ""));
945}

References m_cfg.

◆ readEntry()

template<class T >
T KisConfig::readEntry ( const QString & name,
const T & defaultValue = T() )
inline

Definition at line 914 of file kis_config.h.

914 {
915 return m_cfg.readEntry(name, defaultValue);
916 }

◆ readKoColor()

KoColor KisConfig::readKoColor ( const QString & name,
const KoColor & color = KoColor() ) const

Definition at line 3091 of file kis_config.cc.

3092{
3093 QDomDocument doc;
3094
3095 KoColor color = _color;
3096
3097 if (!m_cfg.readEntry(name).isNull()) {
3098 doc.setContent(m_cfg.readEntry(name));
3099 QDomElement e = doc.documentElement().firstChild().toElement();
3101 }
3102 else {
3103 QString blackColor = "<!DOCTYPE Color>\n<Color>\n <RGB r=\"0\" space=\"sRGB-elle-V2-srgbtrc.icc\" b=\"0\" g=\"0\"/>\n</Color>\n";
3104 doc.setContent(blackColor);
3105 QDomElement e = doc.documentElement().firstChild().toElement();
3107 }
3108 return color;
3109}
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
static KoColor fromXML(const QDomElement &elt, const QString &channelDepthId)
Definition KoColor.cpp:350
QString id() const
Definition KoID.cpp:63

References KoColor::fromXML(), KoID::id(), Integer16BitsColorDepthID, and m_cfg.

◆ readKoColors()

QList< KoColor > KisConfig::readKoColors ( const QString & name) const

Definition at line 3124 of file kis_config.cc.

3125{
3126 QList<KoColor> colors;
3127 QString colorListXML = m_cfg.readEntry(name);
3128
3129 if (!colorListXML.isNull()) {
3130 QDomDocument doc;
3131 doc.setContent(colorListXML);
3132 QDomElement colorsElement = doc.firstChildElement();
3133 if (!colorsElement.isNull()) {
3134 QDomNodeList colorNodes = colorsElement.childNodes();
3135 colors.reserve(colorNodes.size());
3136
3137 for (int k = 0; k < colorNodes.size(); k++) {
3138 QDomElement colorElement = colorNodes.at(k).toElement();
3139 KoColor color = KoColor::fromXML(colorElement, Integer16BitsColorDepthID.id());
3140 colors.push_back(color);
3141 }
3142 }
3143 }
3144
3145 return colors;
3146}

References KoColor::fromXML(), KoID::id(), Integer16BitsColorDepthID, and m_cfg.

◆ readList()

template<class T >
QList< T > KisConfig::readList ( const QString & name,
const QList< T > & defaultValue = QList<T>() )
inline

Definition at line 919 of file kis_config.h.

919 {
920 return m_cfg.readEntry(name, defaultValue);
921 }

◆ renamePastedLayers()

bool KisConfig::renamePastedLayers ( bool defaultValue = false) const

Definition at line 2963 of file kis_config.cc.

2964{
2965 return defaultValue ? true : m_cfg.readEntry("renamePastedLayers", true);
2966}

References m_cfg.

◆ rootSurfaceFormat() [1/2]

KisConfig::RootSurfaceFormat KisConfig::rootSurfaceFormat ( bool defaultValue = false) const

Definition at line 2904 of file kis_config.cc.

2905{
2906 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2907 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
2908
2909 return rootSurfaceFormat(&kritarc, defaultValue);
2910}
RootSurfaceFormat rootSurfaceFormat(bool defaultValue=false) const

References rootSurfaceFormat().

◆ rootSurfaceFormat() [2/2]

KisConfig::RootSurfaceFormat KisConfig::rootSurfaceFormat ( QSettings * displayrc,
bool defaultValue = false )
static

Definition at line 2920 of file kis_config.cc.

2921{
2922 QString textValue = "bt709-g22";
2923
2924 if (!defaultValue) {
2925 textValue = displayrc->value("rootSurfaceFormat", textValue).toString();
2926 }
2927
2928 return textValue == "bt709-g10" ? BT709_G10 :
2929 textValue == "bt2020-pq" ? BT2020_PQ :
2930 BT709_G22;
2931}

References BT2020_PQ, BT709_G10, and BT709_G22.

◆ rulersTrackMouse()

bool KisConfig::rulersTrackMouse ( bool defaultValue = false) const

Definition at line 1019 of file kis_config.cc.

1020{
1021 return (defaultValue ? true : m_cfg.readEntry("rulersTrackMouse", true));
1022}

References m_cfg.

◆ saveSessionOnQuit()

bool KisConfig::saveSessionOnQuit ( bool defaultValue) const

Definition at line 1490 of file kis_config.cc.

1491{
1492 return defaultValue ? false : m_cfg.readEntry("saveSessionOnQuit", false);
1493}

References m_cfg.

◆ saveSnapConfig()

void KisConfig::saveSnapConfig ( const KisSnapConfig & config)

Definition at line 1297 of file kis_config.cc.

1298{
1299 m_cfg.writeEntry("globalSnapOrthogonal", config.orthogonal());
1300 m_cfg.writeEntry("globalSnapNode", config.node());
1301 m_cfg.writeEntry("globalSnapExtension", config.extension());
1302 m_cfg.writeEntry("globalSnapIntersection", config.intersection());
1303 m_cfg.writeEntry("globalSnapBoundingBox", config.boundingBox());
1304 m_cfg.writeEntry("globalSnapImageBounds", config.imageBounds());
1305 m_cfg.writeEntry("globalSnapImageCenter", config.imageCenter());
1306 m_cfg.writeEntry("globalSnapToPixel", config.toPixel());
1307}
bool orthogonal() const
bool node() const
bool toPixel() const
bool imageBounds() const
bool boundingBox() const
bool intersection() const
bool extension() const
bool imageCenter() const

References KisSnapConfig::boundingBox(), KisSnapConfig::extension(), KisSnapConfig::imageBounds(), KisSnapConfig::imageCenter(), KisSnapConfig::intersection(), m_cfg, KisSnapConfig::node(), KisSnapConfig::orthogonal(), and KisSnapConfig::toPixel().

◆ scratchpadVisible()

bool KisConfig::scratchpadVisible ( bool defaultValue = false) const

Definition at line 2191 of file kis_config.cc.

2192{
2193 return (defaultValue ? true : m_cfg.readEntry("scratchpadVisible", true));
2194}

References m_cfg.

◆ scrollbarZoomEnabled()

bool KisConfig::scrollbarZoomEnabled ( bool defaultValue = false) const

Definition at line 1355 of file kis_config.cc.

1356{
1357 return (defaultValue ? true : m_cfg.readEntry("scrollbarZoomEnabled", true));
1358}

References m_cfg.

◆ scrollCheckers()

bool KisConfig::scrollCheckers ( bool defaultValue = false) const

Definition at line 1324 of file kis_config.cc.

1325{
1326 return (defaultValue ? false : m_cfg.readEntry("scrollingcheckers", false));
1327}

References m_cfg.

◆ scrubbingAudioUpdatesDelay()

int KisConfig::scrubbingAudioUpdatesDelay ( bool defaultValue = false) const

Definition at line 2712 of file kis_config.cc.

2713{
2714 return (defaultValue ? -1 : m_cfg.readEntry("scrubbingAudioUpdatesDelay", -1));
2715}

References m_cfg.

◆ scrubbingUpdatesDelay()

int KisConfig::scrubbingUpdatesDelay ( bool defaultValue = false) const

Definition at line 2702 of file kis_config.cc.

2703{
2704 return (defaultValue ? 30 : m_cfg.readEntry("scrubbingUpdatesDelay", 30));
2705}

References m_cfg.

◆ selectionActionBar()

bool KisConfig::selectionActionBar ( bool defaultValue = false) const

Definition at line 2864 of file kis_config.cc.

2865{
2866 return defaultValue ? true : m_cfg.readEntry("selectionActionBar", true);
2867}

References m_cfg.

◆ selectionActionBarBehavior()

KisConfig::SelectionActionsBarBehavior KisConfig::selectionActionBarBehavior ( bool defaultValue = false) const

Definition at line 2874 of file kis_config.cc.

2875{
2877}
SelectionActionsBarBehavior
Definition kis_config.h:808

References FreeFloating, and m_cfg.

◆ selectionActionBarOrientation()

KisConfig::SelectionActionsBarOrientation KisConfig::selectionActionBarOrientation ( bool defaultValue = false) const

Definition at line 2894 of file kis_config.cc.

2895{
2897}
SelectionActionsBarOrientation
Definition kis_config.h:824

References Horizontal, and m_cfg.

◆ selectionActionBarPosition()

KisConfig::SelectionActionsBarPosition KisConfig::selectionActionBarPosition ( bool defaultValue = false) const

Definition at line 2884 of file kis_config.cc.

2885{
2887}
SelectionActionsBarPosition
Definition kis_config.h:813

References Bottom, and m_cfg.

◆ selectionViewSizeMinimum()

qreal KisConfig::selectionViewSizeMinimum ( bool defaultValue = false) const

Definition at line 1519 of file kis_config.cc.

1520{
1521 return (defaultValue ? 5.0 : m_cfg.readEntry("SelectionViewSizeMinimum", 5.0));
1522}

References m_cfg.

◆ separateEraserCursor()

bool KisConfig::separateEraserCursor ( bool defaultValue = false) const

Definition at line 462 of file kis_config.cc.

463{
464 return (defaultValue ? false : m_cfg.readEntry("separateEraserCursor", false));
465}

References m_cfg.

◆ sessionOnStartup()

KisConfig::SessionOnStartup KisConfig::sessionOnStartup ( bool defaultValue = false) const

Definition at line 1470 of file kis_config.cc.

1471{
1472 int value = defaultValue ? SOS_BlankSession : m_cfg.readEntry("sessionOnStartup", (int)SOS_BlankSession);
1474}

References m_cfg, SOS_BlankSession, and value().

◆ setActivateTransformToolAfterPaste()

void KisConfig::setActivateTransformToolAfterPaste ( bool value)

Definition at line 2849 of file kis_config.cc.

2850{
2851 m_cfg.writeEntry("activateTransformToolAfterPaste", value);
2852}

References m_cfg, and value().

◆ setAdaptivePlaybackRange()

void KisConfig::setAdaptivePlaybackRange ( bool value)

Definition at line 2664 of file kis_config.cc.

2665{
2666 m_cfg.writeEntry("adaptivePlaybackRange", value);
2667}

References m_cfg, and value().

◆ setAllowLCMSOptimization()

void KisConfig::setAllowLCMSOptimization ( bool allowLCMSOptimization)

Definition at line 968 of file kis_config.cc.

969{
970 m_cfg.writeEntry("allowLCMSOptimization", allowLCMSOptimization);
971}
bool allowLCMSOptimization(bool defaultValue=false) const

References allowLCMSOptimization(), and m_cfg.

◆ setAnimationDropFrames()

void KisConfig::setAnimationDropFrames ( bool value)

Definition at line 2639 of file kis_config.cc.

2640{
2641 bool oldValue = animationDropFrames();
2642
2643 if (value == oldValue) return;
2644
2645 m_cfg.writeEntry("animationDropFrames", value);
2647}
static KisConfigNotifier * instance()
bool animationDropFrames(bool defaultValue=false) const

References animationDropFrames(), KisConfigNotifier::instance(), m_cfg, KisConfigNotifier::notifyDropFramesModeChanged(), and value().

◆ setAnimationPlaybackBackend()

void KisConfig::setAnimationPlaybackBackend ( int value)

Definition at line 2629 of file kis_config.cc.

2630{
2631 m_cfg.writeEntry("animationPlaybackBackend", value);
2632}

References m_cfg, and value().

◆ setAntialiasCurves()

void KisConfig::setAntialiasCurves ( bool v) const

Definition at line 1391 of file kis_config.cc.

1392{
1393 m_cfg.writeEntry("antialiascurves", v);
1394}

References m_cfg, and v.

◆ setAntialiasSelectionOutline()

void KisConfig::setAntialiasSelectionOutline ( bool v) const

Definition at line 1401 of file kis_config.cc.

1402{
1403 m_cfg.writeEntry("AntialiasSelectionOutline", v);
1404}

References m_cfg, and v.

◆ setAssistantsDrawMode()

void KisConfig::setAssistantsDrawMode ( AssistantsDrawMode value)

Definition at line 3023 of file kis_config.cc.

3024{
3025 m_cfg.writeEntry("assistantsDrawMode", static_cast<int>(value));
3026}

References m_cfg, and value().

◆ setAudioOffsetTolerance()

void KisConfig::setAudioOffsetTolerance ( int value)

Definition at line 2727 of file kis_config.cc.

2728{
2729 m_cfg.writeEntry("audioOffsetTolerance", value);
2730}

References m_cfg, and value().

◆ setAutoPinLayersToTimeline()

void KisConfig::setAutoPinLayersToTimeline ( bool value)

Definition at line 2654 of file kis_config.cc.

2655{
2656 m_cfg.writeEntry("autoPinLayers", value);
2657}

References m_cfg, and value().

◆ setAutoSaveInterval()

void KisConfig::setAutoSaveInterval ( int seconds) const

Definition at line 1535 of file kis_config.cc.

1536{
1537 return m_cfg.writeEntry("AutoSaveInterval", seconds);
1538}

References m_cfg.

◆ setAutoSmoothBezierCurves()

void KisConfig::setAutoSmoothBezierCurves ( bool value)

Definition at line 2839 of file kis_config.cc.

2840{
2841 m_cfg.writeEntry("autoSmoothBezierCurves", value);
2842}

References m_cfg, and value().

◆ setAutoZoomTimelineToPlaybackRange()

void KisConfig::setAutoZoomTimelineToPlaybackRange ( bool value)

Definition at line 2674 of file kis_config.cc.

2675{
2676 m_cfg.writeEntry("autoZoomTimelineToPlaybackRange", value);
2677}

References m_cfg, and value().

◆ setBackupFile()

void KisConfig::setBackupFile ( bool backupFile) const

Definition at line 1545 of file kis_config.cc.

1546{
1547 m_cfg.writeEntry("CreateBackupFile", backupFile);
1548}

References backupFile(), and m_cfg.

◆ setBrushHudSetting()

void KisConfig::setBrushHudSetting ( const QString & value) const

Definition at line 2808 of file kis_config.cc.

2809{
2810 m_cfg.writeEntry("brushHudSettings", value);
2811}

References m_cfg, and value().

◆ setCalculateAnimationCacheInBackground()

void KisConfig::setCalculateAnimationCacheInBackground ( bool value)

Definition at line 2818 of file kis_config.cc.

2819{
2820 m_cfg.writeEntry("calculateAnimationCacheInBackground", value);
2821}

References m_cfg, and value().

◆ setCanvasBorderColor()

void KisConfig::setCanvasBorderColor ( const QColor & color) const

Definition at line 1340 of file kis_config.cc.

1341{
1342 m_cfg.writeEntry("canvasBorderColor", color);
1343}

References m_cfg.

◆ setCanvasState()

void KisConfig::setCanvasState ( const QString & state) const

Definition at line 1577 of file kis_config.cc.

1578{
1579 static QStringList acceptableStates;
1580 if (acceptableStates.isEmpty()) {
1581 acceptableStates << "OPENGL_SUCCESS" << "TRY_OPENGL" << "OPENGL_NOT_TRIED" << "OPENGL_FAILED";
1582 }
1583 if (acceptableStates.contains(state)) {
1584 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1585 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1586 kritarc.setValue("canvasState", state);
1587 }
1588}

◆ setCanvasSurfaceBitDepthMode() [1/2]

void KisConfig::setCanvasSurfaceBitDepthMode ( CanvasSurfaceBitDepthMode value)

Definition at line 806 of file kis_config.cc.

807{
808 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
809 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
811}
static void setCanvasSurfaceBitDepthMode(QSettings *settings, CanvasSurfaceBitDepthMode value)

References setCanvasSurfaceBitDepthMode(), and value().

◆ setCanvasSurfaceBitDepthMode() [2/2]

void KisConfig::setCanvasSurfaceBitDepthMode ( QSettings * settings,
CanvasSurfaceBitDepthMode value )
static

Definition at line 780 of file kis_config.cc.

781{
782 QString modeStr;
783
784 switch (value) {
786 modeStr = "auto";
787 break;
789 modeStr = "8bit";
790 break;
792 modeStr = "10bit";
793 break;
794 }
795
796 settings->setValue("canvasSurfaceBitDepthMode", modeStr);
797}

References Depth10Bit, Depth8Bit, DepthAuto, and value().

◆ setCanvasSurfaceColorSpaceManagementMode()

void KisConfig::setCanvasSurfaceColorSpaceManagementMode ( KisConfig::CanvasSurfaceMode value)

Definition at line 740 of file kis_config.cc.

740 {
741 QString modeStr;
742
743 switch (value) {
745 modeStr = "preferred";
746 break;
748 modeStr = "rec709g22";
749 break;
751 modeStr = "rec709g10";
752 break;
754 modeStr = "rec2020pq";
755 break;
757 modeStr = "unmanaged";
758 break;
759 }
760
761 m_cfg.writeEntry("canvasSurfaceColorSpaceManagementMode", modeStr);
762}

References m_cfg, Preferred, Rec2020pq, Rec709g10, Rec709g22, Unmanaged, and value().

◆ setCheckersColor1()

void KisConfig::setCheckersColor1 ( const QColor & v) const

Definition at line 1371 of file kis_config.cc.

1372{
1373 m_cfg.writeEntry("checkerscolor", v);
1374}

References m_cfg, and v.

◆ setCheckersColor2()

void KisConfig::setCheckersColor2 ( const QColor & v) const

Definition at line 1381 of file kis_config.cc.

1382{
1383 m_cfg.writeEntry("checkerscolor2", v);
1384}

References m_cfg, and v.

◆ setCheckSize()

void KisConfig::setCheckSize ( qint32 checkSize) const

Definition at line 1316 of file kis_config.cc.

1317{
1318 if (checksize == 0) {
1319 checksize = 32;
1320 }
1321 m_cfg.writeEntry("checksize", checksize);
1322}

References m_cfg.

◆ setClicklessSpacePan()

void KisConfig::setClicklessSpacePan ( const bool toggle) const

Definition at line 1873 of file kis_config.cc.

1874{
1875 m_cfg.writeEntry("clicklessSpacePan", toggle);
1876}

References m_cfg.

◆ setColorSamplerPreviewCircleDiameter()

void KisConfig::setColorSamplerPreviewCircleDiameter ( int style)

Definition at line 552 of file kis_config.cc.

553{
554 m_cfg.writeEntry("colorSamplerPreviewCircleDiameter", diameter);
555}

References m_cfg.

◆ setColorSamplerPreviewCircleExtraCirclesEnabled()

void KisConfig::setColorSamplerPreviewCircleExtraCirclesEnabled ( bool enabled)

Definition at line 594 of file kis_config.cc.

595{
596 m_cfg.writeEntry("colorSamplerPreviewCircleExtraCirclesEnabled", enabled);
597}

References m_cfg.

◆ setColorSamplerPreviewCircleOutlineEnabled()

void KisConfig::setColorSamplerPreviewCircleOutlineEnabled ( bool enabled)

Definition at line 580 of file kis_config.cc.

581{
582 m_cfg.writeEntry("colorSamplerPreviewCircleOutlineEnabled", enabled);
583}

References m_cfg.

◆ setColorSamplerPreviewCirclePosition()

void KisConfig::setColorSamplerPreviewCirclePosition ( KisConfig::ColorSamplerPreviewCirclePosition position)

Definition at line 632 of file kis_config.cc.

632 {
633 m_cfg.writeEntry("colorSamplerPreviewCirclePosition", int(position));
634}

References m_cfg.

◆ setColorSamplerPreviewCircleThickness()

void KisConfig::setColorSamplerPreviewCircleThickness ( qreal thickness)

Definition at line 566 of file kis_config.cc.

567{
568 m_cfg.writeEntry("colorSamplerPreviewCircleThickness", thickness);
569}

References m_cfg.

◆ setColorSamplerPreviewStyle()

void KisConfig::setColorSamplerPreviewStyle ( ColorSamplerPreviewStyle style)

Definition at line 537 of file kis_config.cc.

538{
539 m_cfg.writeEntry("colorSamplerPreviewStyle", int(style));
541}
void notifyColorSamplerPreviewStyleChanged()

References KisConfigNotifier::instance(), m_cfg, and KisConfigNotifier::notifyColorSamplerPreviewStyleChanged().

◆ setColorSamplerZoomPreviewEnabled()

void KisConfig::setColorSamplerZoomPreviewEnabled ( bool enabled)

Definition at line 606 of file kis_config.cc.

606 {
607 m_cfg.writeEntry("colorSamplerZoomPreviewEnabled", enabled);
608}

References m_cfg.

◆ setColorSamplerZoomPreviewScale()

void KisConfig::setColorSamplerZoomPreviewScale ( qreal scale)

Definition at line 618 of file kis_config.cc.

618 {
619 m_cfg.writeEntry("colorSamplerZoomPreviewScale", scale);
620}

References m_cfg.

◆ setCompressKra()

void KisConfig::setCompressKra ( bool compress)

Definition at line 2446 of file kis_config.cc.

2447{
2448 m_cfg.writeEntry("compressLayersInKra", compress);
2449}

References m_cfg.

◆ setConvertLayerColorSpaceInProperties()

void KisConfig::setConvertLayerColorSpaceInProperties ( bool value)

Definition at line 2958 of file kis_config.cc.

2959{
2960 m_cfg.writeEntry("convertLayerColorSpaceInProperties", value);
2961}

References m_cfg, and value().

◆ setConvertToImageColorspaceOnImport()

void KisConfig::setConvertToImageColorspaceOnImport ( bool value)

Definition at line 2747 of file kis_config.cc.

2748{
2749 m_cfg.writeEntry("ConvertToImageColorSpaceOnImport", value);
2750}

References m_cfg, and value().

◆ setCumulativeUndoData()

void KisConfig::setCumulativeUndoData ( KisCumulativeUndoData value)

Definition at line 223 of file kis_config.cc.

224{
225 value.write(&m_cfg);
226}

References m_cfg, value(), and KisCumulativeUndoData::write().

◆ setCumulativeUndoRedo()

void KisConfig::setCumulativeUndoRedo ( bool value)

Definition at line 207 of file kis_config.cc.

208{
209 m_cfg.writeEntry("useCumulativeUndoRedo", value);
210}

References m_cfg, and value().

◆ setCurrentInputProfile()

void KisConfig::setCurrentInputProfile ( const QString & name)

Definition at line 2176 of file kis_config.cc.

2177{
2178 m_cfg.writeEntry("currentInputProfile", name);
2179}

References m_cfg.

◆ setCursorMainColor()

void KisConfig::setCursorMainColor ( const QColor & v) const

Definition at line 390 of file kis_config.cc.

391{
392 m_cfg.writeEntry("cursorMaincColor", v);
393}

References m_cfg, and v.

◆ setCustomColorSelectorColorSpace()

void KisConfig::setCustomColorSelectorColorSpace ( const KoColorSpace * cs)

Definition at line 2576 of file kis_config.cc.

2577{
2578 KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
2579 cfg.writeEntry("useCustomColorSpace", bool(cs));
2580 if(cs) {
2581 cfg.writeEntry("customColorSpaceModel", cs->colorModelId().id());
2582 cfg.writeEntry("customColorSpaceDepthID", cs->colorDepthId().id());
2583 cfg.writeEntry("customColorSpaceProfile", cs->profile()->name());
2584 }
2585}
virtual KoID colorModelId() const =0
virtual KoID colorDepthId() const =0
virtual const KoColorProfile * profile() const =0

References KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), KoID::id(), KoColorProfile::name, and KoColorSpace::profile().

◆ setDefaultAssistantsColor()

void KisConfig::setDefaultAssistantsColor ( const QColor & color) const

Definition at line 2829 of file kis_config.cc.

2830{
2831 m_cfg.writeEntry("defaultAssistantsColor", color);
2832}

References m_cfg.

◆ setDefaultBackgroundColor()

void KisConfig::setDefaultBackgroundColor ( const QLatin1String & dialogType,
const QColor & value )

Definition at line 2246 of file kis_config.cc.

2247{
2248 m_cfg.writeEntry(dialogType + "BackgroundColorForNewImage", value);
2249}

References m_cfg, and value().

◆ setDefaultBackgroundOpacity()

void KisConfig::setDefaultBackgroundOpacity ( const QLatin1String & dialogType,
quint8 value )

Definition at line 2236 of file kis_config.cc.

2237{
2238 m_cfg.writeEntry(dialogType + "BackgroundOpacityForNewImage", (int)value);
2239}

References m_cfg, and value().

◆ setDefaultBackgroundStyle()

void KisConfig::setDefaultBackgroundStyle ( const QLatin1String & dialogType,
KisConfig::BackgroundStyle value )

Definition at line 2256 of file kis_config.cc.

2257{
2258 m_cfg.writeEntry(dialogType + "BackgroundStyleForNewImage", (int)value);
2259}

References m_cfg, and value().

◆ setDefaultColorDepth()

void KisConfig::setDefaultColorDepth ( const QString & depth) const

set the id of the default color depth used for creating new images.

Definition at line 260 of file kis_config.cc.

261{
262 m_cfg.writeEntry("colorDepthDef", depth);
263}

References m_cfg.

◆ setDefaultGridSpacing()

void KisConfig::setDefaultGridSpacing ( QPoint gridSpacing)

Definition at line 673 of file kis_config.cc.

674{
675 m_cfg.writeEntry("defaultGridSpacing", gridSpacing);
676}

References m_cfg.

◆ setDefaultPalette()

void KisConfig::setDefaultPalette ( const QString & name) const

Definition at line 2119 of file kis_config.cc.

2120{
2121 m_cfg.writeEntry("defaultPalette", name);
2122}

References m_cfg.

◆ setDisableAVXOptimizations()

void KisConfig::setDisableAVXOptimizations ( bool value)

Definition at line 2619 of file kis_config.cc.

2620{
2621 m_cfg.writeEntry("disableAVXOptimizations", value);
2622}

References m_cfg, and value().

◆ setDisableVectorOptimizations()

void KisConfig::setDisableVectorOptimizations ( bool value)

Definition at line 2607 of file kis_config.cc.

2608{
2609 // use the old key name for compatibility
2610 m_cfg.writeEntry("amdDisableVectorWorkaround", value);
2611}

References m_cfg, and value().

◆ setEnableBrushSpeedLogging()

void KisConfig::setEnableBrushSpeedLogging ( bool value) const

Definition at line 2602 of file kis_config.cc.

2603{
2604 m_cfg.writeEntry("enableBrushSpeedLogging", value);
2605}

References m_cfg, and value().

◆ setEnableCanvasSurfaceColorSpaceManagement()

void KisConfig::setEnableCanvasSurfaceColorSpaceManagement ( bool value)

Definition at line 707 of file kis_config.cc.

708{
709 m_cfg.writeEntry("enableCanvasSurfaceColorSpaceManagement", value);
710}

References m_cfg, and value().

◆ setEnableOpenGLFramerateLogging()

void KisConfig::setEnableOpenGLFramerateLogging ( bool value) const

Definition at line 2592 of file kis_config.cc.

2593{
2594 m_cfg.writeEntry("enableOpenGLFramerateLogging", value);
2595}

References m_cfg, and value().

◆ setEraserCursorMainColor()

void KisConfig::setEraserCursorMainColor ( const QColor & v) const

Definition at line 500 of file kis_config.cc.

501{
502 m_cfg.writeEntry("eraserCursorMaincColor", v);
503}

References m_cfg, and v.

◆ setEraserCursorStyle()

void KisConfig::setEraserCursorStyle ( CursorStyle style)

Definition at line 488 of file kis_config.cc.

489{
490 m_cfg.writeEntry("eraserCursorStyle", (int)style);
491}

References m_cfg.

◆ setEraserOutlineStyle()

void KisConfig::setEraserOutlineStyle ( OutlineStyle style)

Definition at line 521 of file kis_config.cc.

522{
523 m_cfg.writeEntry("eraserOutlineStyle", (int)style);
524}

References m_cfg.

◆ setExportConfiguration()

void KisConfig::setExportConfiguration ( const QString & filterId,
KisPropertiesConfigurationSP properties ) const

Definition at line 2004 of file kis_config.cc.

2005{
2006 QString exportConfig = properties->toXML();
2007 m_cfg.writeEntry("ExportConfiguration-" + filterId, exportConfig);
2008}

References m_cfg.

◆ setExportMimeType()

void KisConfig::setExportMimeType ( const QString & defaultExportMimeType)

Definition at line 2475 of file kis_config.cc.

2476{
2477 m_cfg.writeEntry("defaultExportMimeType", defaultExportMimeType);
2478}

References m_cfg.

◆ setFavoriteCompositeOps()

void KisConfig::setFavoriteCompositeOps ( const QStringList & compositeOps) const

Definition at line 1986 of file kis_config.cc.

1987{
1988 m_cfg.writeEntry("favoriteCompositeOps", compositeOps);
1989}

References m_cfg.

◆ setFavoritePresets()

void KisConfig::setFavoritePresets ( const int value)

Definition at line 2041 of file kis_config.cc.

2042{
2043 m_cfg.writeEntry("numFavoritePresets", value);
2044}

References m_cfg, and value().

◆ setFFMpegLocation()

void KisConfig::setFFMpegLocation ( const QString & value)

Definition at line 2683 of file kis_config.cc.

2683 {
2684 m_cfg.writeEntry("ffmpegLocation", value);
2685}

References m_cfg, and value().

◆ setFirstRun()

void KisConfig::setFirstRun ( const bool firstRun) const

Definition at line 1830 of file kis_config.cc.

1831{
1832 m_cfg.writeEntry("firstRun", first);
1833}

References m_cfg.

◆ setForceAlwaysFullSizedEraserOutline()

void KisConfig::setForceAlwaysFullSizedEraserOutline ( bool value) const

Definition at line 1465 of file kis_config.cc.

1466{
1467 m_cfg.writeEntry("forceAlwaysFullSizedEraserOutline", value);
1468}

References m_cfg, and value().

◆ setForceAlwaysFullSizedOutline()

void KisConfig::setForceAlwaysFullSizedOutline ( bool value) const

Definition at line 1443 of file kis_config.cc.

1444{
1445 m_cfg.writeEntry("forceAlwaysFullSizedOutline", value);
1446}

References m_cfg, and value().

◆ setForcePaletteColors()

void KisConfig::setForcePaletteColors ( bool forcePaletteColors)

Definition at line 978 of file kis_config.cc.

979{
980 m_cfg.writeEntry("colorsettings/forcepalettecolors", forcePaletteColors);
981}
bool forcePaletteColors(bool defaultValue=false) const

References forcePaletteColors(), and m_cfg.

◆ setForceShowAutosaveMessages()

void KisConfig::setForceShowAutosaveMessages ( bool ShowAutosaveMessages) const

Definition at line 1014 of file kis_config.cc.

1015{
1016 m_cfg.writeEntry("forceShowAutosaveMessages", value);
1017}

References m_cfg, and value().

◆ setForceShowSaveMessages()

void KisConfig::setForceShowSaveMessages ( bool value) const

Definition at line 1004 of file kis_config.cc.

1005{
1006 m_cfg.writeEntry("forceShowSaveMessages", value);
1007}

References m_cfg, and value().

◆ setFullscreenMode()

void KisConfig::setFullscreenMode ( const bool value) const

Definition at line 1974 of file kis_config.cc.

1975{
1976 m_cfg.writeEntry("fullscreenMode", value);
1977}

References m_cfg, and value().

◆ setGridIsoVerticalColor()

void KisConfig::setGridIsoVerticalColor ( const QColor & v) const

Definition at line 1217 of file kis_config.cc.

1218{
1219 m_cfg.writeEntry("gridisoverticalcolor", v);
1220}

References m_cfg, and v.

◆ setGridIsoVerticalStyle()

void KisConfig::setGridIsoVerticalStyle ( quint32 v) const

Definition at line 1184 of file kis_config.cc.

1185{
1186 m_cfg.writeEntry("gridisoverticalstyle", v);
1187}

References m_cfg, and v.

◆ setGridMainColor()

void KisConfig::setGridMainColor ( const QColor & v) const

Definition at line 1195 of file kis_config.cc.

1196{
1197 m_cfg.writeEntry("gridmaincolor", v);
1198}

References m_cfg, and v.

◆ setGridMainStyle()

void KisConfig::setGridMainStyle ( quint32 v) const

Definition at line 1160 of file kis_config.cc.

1161{
1162 m_cfg.writeEntry("gridmainstyle", v);
1163}

References m_cfg, and v.

◆ setGridSubdivisionColor()

void KisConfig::setGridSubdivisionColor ( const QColor & v) const

Definition at line 1206 of file kis_config.cc.

1207{
1208 m_cfg.writeEntry("gridsubdivisioncolor", v);
1209}

References m_cfg, and v.

◆ setGridSubdivisionStyle()

void KisConfig::setGridSubdivisionStyle ( quint32 v) const

Definition at line 1172 of file kis_config.cc.

1173{
1174 m_cfg.writeEntry("gridsubdivisionstyle", v);
1175}

References m_cfg, and v.

◆ setGuidesColor()

void KisConfig::setGuidesColor ( const QColor & v) const

Definition at line 1273 of file kis_config.cc.

1274{
1275 m_cfg.writeEntry("guidesColor", v);
1276}

References m_cfg, and v.

◆ setGuidesLineStyle()

void KisConfig::setGuidesLineStyle ( quint32 v) const

Definition at line 1262 of file kis_config.cc.

1263{
1264 m_cfg.writeEntry("guidesLineStyle", v);
1265}

References m_cfg, and v.

◆ setHideDevFundBanner()

void KisConfig::setHideDevFundBanner ( bool value = true)

Definition at line 1504 of file kis_config.cc.

1505{
1506 m_cfg.writeEntry("hideDevFundBanner", value);
1507}

References m_cfg, and value().

◆ setHideDockersFullscreen()

void KisConfig::setHideDockersFullscreen ( const bool value) const

Definition at line 1884 of file kis_config.cc.

1885{
1886 m_cfg.writeEntry("hideDockersFullScreen", value);
1887}

References m_cfg, and value().

◆ setHideMenuFullscreen()

void KisConfig::setHideMenuFullscreen ( const bool value) const

Definition at line 1924 of file kis_config.cc.

1925{
1926 m_cfg.writeEntry("hideMenuFullScreen", value);
1927}

References m_cfg, and value().

◆ setHidePopups()

void KisConfig::setHidePopups ( bool hidePopups)

Definition at line 2216 of file kis_config.cc.

2217{
2218 m_cfg.writeEntry("hidePopups", hidePopups);
2219}
bool hidePopups(bool defaultValue=false) const

References hidePopups(), and m_cfg.

◆ setHideScrollbars()

void KisConfig::setHideScrollbars ( bool value) const

Definition at line 1350 of file kis_config.cc.

1351{
1352 m_cfg.writeEntry("hideScrollbars", value);
1353}

References m_cfg, and value().

◆ setHideScrollbarsFullscreen()

void KisConfig::setHideScrollbarsFullscreen ( const bool value) const

Definition at line 1934 of file kis_config.cc.

1935{
1936 m_cfg.writeEntry("hideScrollbarsFullScreen", value);
1937}

References m_cfg, and value().

◆ setHideStatusbarFullscreen()

void KisConfig::setHideStatusbarFullscreen ( const bool value) const

Definition at line 1944 of file kis_config.cc.

1945{
1946 m_cfg.writeEntry("hideStatusbarFullScreen", value);
1947}

References m_cfg, and value().

◆ setHideTitlebarFullscreen()

void KisConfig::setHideTitlebarFullscreen ( const bool value) const

Definition at line 1954 of file kis_config.cc.

1955{
1956 m_cfg.writeEntry("hideTitleBarFullscreen", value);
1957}

References m_cfg, and value().

◆ setHideToolbarFullscreen()

void KisConfig::setHideToolbarFullscreen ( const bool value) const

Definition at line 1964 of file kis_config.cc.

1965{
1966 m_cfg.writeEntry("hideToolbarFullscreen", value);
1967}

References m_cfg, and value().

◆ setHorizontalSplitLines()

void KisConfig::setHorizontalSplitLines ( const int numberLines) const

Definition at line 1853 of file kis_config.cc.

1854{
1855 m_cfg.writeEntry("horizontalSplitLines", numberLines);
1856}

References m_cfg.

◆ setIconsInMenu()

void KisConfig::setIconsInMenu ( IconsInMenu value)

Definition at line 1485 of file kis_config.cc.

1486{
1487 m_cfg.writeEntry("iconsInMenu", (int)value);
1488}

References m_cfg, and value().

◆ setIgnoreHighFunctionKeys()

void KisConfig::setIgnoreHighFunctionKeys ( bool value)

Definition at line 2396 of file kis_config.cc.

2397{
2398 m_cfg.writeEntry("ignoreHighFunctionKeys", value);
2399}

References m_cfg, and value().

◆ setImportConfiguration()

void KisConfig::setImportConfiguration ( const QString & filterId,
KisPropertiesConfigurationSP properties ) const

Definition at line 2015 of file kis_config.cc.

2016{
2017 QString importConfig = properties->toXML();
2018 m_cfg.writeEntry("ImportConfiguration-" + filterId, importConfig);
2019}

References m_cfg.

◆ setImportProfile()

void KisConfig::setImportProfile ( const QString & importProfile) const

◆ setKineticScrollingEnabled()

void KisConfig::setKineticScrollingEnabled ( bool enabled)

Definition at line 2495 of file kis_config.cc.

2496{
2497 m_cfg.writeEntry("KineticScrollingEnabled", value);
2498}

References m_cfg, and value().

◆ setKineticScrollingGesture()

void KisConfig::setKineticScrollingGesture ( int kineticScroll)

Definition at line 2511 of file kis_config.cc.

2512{
2513 m_cfg.writeEntry("KineticScrollingGesture", gesture);
2514}

References m_cfg.

◆ setKineticScrollingHideScrollbars()

void KisConfig::setKineticScrollingHideScrollbars ( bool scrollbar)

Definition at line 2531 of file kis_config.cc.

2532{
2533 m_cfg.writeEntry("KineticScrollingHideScrollbar", scrollbar);
2534}

References m_cfg.

◆ setKineticScrollingSensitivity()

void KisConfig::setKineticScrollingSensitivity ( int sensitivity)

Definition at line 2521 of file kis_config.cc.

2522{
2523 m_cfg.writeEntry("KineticScrollingSensitivity", sensitivity);
2524}

References m_cfg.

◆ setLastUsedOutlineStyle()

void KisConfig::setLastUsedOutlineStyle ( OutlineStyle style)

Definition at line 455 of file kis_config.cc.

456{
457 m_cfg.writeEntry("lastUsedOutlineStyle", (int)style);
458}

References m_cfg.

◆ setLayerInfoTextOpacity()

void KisConfig::setLayerInfoTextOpacity ( int value)

Definition at line 2988 of file kis_config.cc.

2989{
2990 m_cfg.writeEntry("layerInfoTextOpacity", value);
2991}

References m_cfg, and value().

◆ setLayerInfoTextStyle()

void KisConfig::setLayerInfoTextStyle ( KisConfig::LayerInfoTextStyle value)

Definition at line 2978 of file kis_config.cc.

2979{
2980 m_cfg.writeEntry("layerInfoTextStyle", (int)value);
2981}

References m_cfg, and value().

◆ setLayerThumbnailGenerationTimeout()

void KisConfig::setLayerThumbnailGenerationTimeout ( int value)

Definition at line 3053 of file kis_config.cc.

3054{
3055 m_cfg.writeEntry("layerThumbnailGenerationTimeout", value);
3056}

References m_cfg, and value().

◆ setLayerThumbnailSize()

void KisConfig::setLayerThumbnailSize ( int size)

Definition at line 2146 of file kis_config.cc.

2147{
2148 m_cfg.writeEntry("layerThumbnailSize", size);
2149}

References m_cfg.

◆ setLayerTreeIndentation()

void KisConfig::setLayerTreeIndentation ( int percentage)

Definition at line 2156 of file kis_config.cc.

2157{
2158 m_cfg.writeEntry("layerTreeIndentation", percentage);
2159}

References m_cfg.

◆ setLevelOfDetailEnabled()

void KisConfig::setLevelOfDetailEnabled ( bool value)

Definition at line 2051 of file kis_config.cc.

2052{
2053 m_cfg.writeEntry("levelOfDetailEnabled", value);
2054}

References m_cfg, and value().

◆ setLineSmoothingDelayDistance()

void KisConfig::setLineSmoothingDelayDistance ( qreal value)

Definition at line 2336 of file kis_config.cc.

2337{
2338 m_cfg.writeEntry("LineSmoothingDelayDistance", value);
2339}

References m_cfg, and value().

◆ setLineSmoothingDistanceKeepAspectRatio()

void KisConfig::setLineSmoothingDistanceKeepAspectRatio ( bool value)

Definition at line 2296 of file kis_config.cc.

2297{
2298 m_cfg.writeEntry("LineSmoothingDistanceKeepAspectRatio", value);
2299}

References m_cfg, and value().

◆ setLineSmoothingDistanceMax()

void KisConfig::setLineSmoothingDistanceMax ( qreal value)

Definition at line 2286 of file kis_config.cc.

2287{
2288 m_cfg.writeEntry("LineSmoothingDistanceMax", value);
2289}

References m_cfg, and value().

◆ setLineSmoothingDistanceMin()

void KisConfig::setLineSmoothingDistanceMin ( qreal value)

Definition at line 2276 of file kis_config.cc.

2277{
2278 m_cfg.writeEntry("LineSmoothingDistanceMin", value);
2279}

References m_cfg, and value().

◆ setLineSmoothingFinishStabilizedCurve()

void KisConfig::setLineSmoothingFinishStabilizedCurve ( bool value)

Definition at line 2356 of file kis_config.cc.

2357{
2358 m_cfg.writeEntry("LineSmoothingFinishStabilizedCurve", value);
2359}

References m_cfg, and value().

◆ setLineSmoothingScalableDistance()

void KisConfig::setLineSmoothingScalableDistance ( bool value)

Definition at line 2326 of file kis_config.cc.

2327{
2328 m_cfg.writeEntry("LineSmoothingScalableDistance", value);
2329}

References m_cfg, and value().

◆ setLineSmoothingSmoothPressure()

void KisConfig::setLineSmoothingSmoothPressure ( bool value)

Definition at line 2316 of file kis_config.cc.

2317{
2318 m_cfg.writeEntry("LineSmoothingSmoothPressure", value);
2319}

References m_cfg, and value().

◆ setLineSmoothingStabilizeSensors()

void KisConfig::setLineSmoothingStabilizeSensors ( bool value)

Definition at line 2366 of file kis_config.cc.

2367{
2368 m_cfg.writeEntry("LineSmoothingStabilizeSensors", value);
2369}

References m_cfg, and value().

◆ setLineSmoothingTailAggressiveness()

void KisConfig::setLineSmoothingTailAggressiveness ( qreal value)

Definition at line 2306 of file kis_config.cc.

2307{
2308 m_cfg.writeEntry("LineSmoothingTailAggressiveness", value);
2309}

References m_cfg, and value().

◆ setLineSmoothingType()

void KisConfig::setLineSmoothingType ( int value)

Definition at line 2266 of file kis_config.cc.

2267{
2268 m_cfg.writeEntry("LineSmoothingType", value);
2269}

References m_cfg, and value().

◆ setLineSmoothingUseDelayDistance()

void KisConfig::setLineSmoothingUseDelayDistance ( bool value)

Definition at line 2346 of file kis_config.cc.

2347{
2348 m_cfg.writeEntry("LineSmoothingUseDelayDistance", value);
2349}

References m_cfg, and value().

◆ setLongPressEnabled()

void KisConfig::setLongPressEnabled ( bool value)

Definition at line 3042 of file kis_config.cc.

3043{
3044 m_cfg.writeEntry("longPressEnabled", value);
3046}
void notifyLongPressChanged(bool enabled)

References KisConfigNotifier::instance(), m_cfg, KisConfigNotifier::notifyLongPressChanged(), and value().

◆ setMDIBackgroundColor()

void KisConfig::setMDIBackgroundColor ( const QString & v) const

Definition at line 687 of file kis_config.cc.

688{
689 m_cfg.writeEntry("mdiBackgroundColorXML", v);
690}

References m_cfg, and v.

◆ setMDIBackgroundImage()

void KisConfig::setMDIBackgroundImage ( const QString & fileName) const

Definition at line 697 of file kis_config.cc.

698{
699 m_cfg.writeEntry("mdiBackgroundImage", filename);
700}

References m_cfg.

◆ setMonitorProfile()

void KisConfig::setMonitorProfile ( int screen,
const QString & monitorProfile ) const

Definition at line 856 of file kis_config.cc.

857{
858 m_cfg.writeEntry("monitorProfile" + QString(screen == 0 ? "": QString("_%1").arg(screen)), monitorProfile);
859 if (!getScreenStringIdentfier(screen).isEmpty()) {
860 m_cfg.writeEntry("monitorProfile" + getScreenStringIdentfier(screen), monitorProfile);
861 }
862}

References getScreenStringIdentfier(), m_cfg, and monitorProfile().

◆ setNewCursorStyle()

void KisConfig::setNewCursorStyle ( CursorStyle style)

Definition at line 378 of file kis_config.cc.

379{
380 m_cfg.writeEntry("newCursorStyle", (int)style);
381}

References m_cfg.

◆ setNewOutlineStyle()

void KisConfig::setNewOutlineStyle ( OutlineStyle style)

Definition at line 439 of file kis_config.cc.

440{
441 m_cfg.writeEntry("newOutlineStyle", (int)style);
442}

References m_cfg.

◆ setNewsCheckEnabled()

void KisConfig::setNewsCheckEnabled ( bool value)

Definition at line 3063 of file kis_config.cc.

3064{
3065 m_cfg.writeEntry(QStringLiteral("newsCheckEnabled"), value);
3066}

References m_cfg, and value().

◆ setNewsFirstStartup()

void KisConfig::setNewsFirstStartup ( bool value)

Definition at line 3073 of file kis_config.cc.

3074{
3075 m_cfg.writeEntry(QStringLiteral("newsFirstStartup"), value);
3076}

References m_cfg, and value().

◆ setNumDefaultLayers()

void KisConfig::setNumDefaultLayers ( const QLatin1String & dialogType,
int num )

Definition at line 2226 of file kis_config.cc.

2227{
2228 m_cfg.writeEntry(dialogType + "NumberOfLayersForNewImage", num);
2229}

References m_cfg.

◆ setOcioColorManagementMode()

void KisConfig::setOcioColorManagementMode ( OcioColorManagementMode mode) const

Definition at line 2088 of file kis_config.cc.

2089{
2090 // FIXME: this option duplicates ocioConfiguration(), please deprecate it
2091 m_cfg.writeEntry("Krita/Ocio/OcioColorManagementMode", (int) mode);
2092}

References m_cfg.

◆ setOcioConfiguration()

void KisConfig::setOcioConfiguration ( const KisOcioConfiguration & cfg)

Definition at line 2071 of file kis_config.cc.

2072{
2073 m_cfg.writeEntry("Krita/Ocio/OcioColorManagementMode", (int) cfg.mode);
2074 m_cfg.writeEntry("Krita/Ocio/OcioConfigPath", cfg.configurationPath);
2075 m_cfg.writeEntry("Krita/Ocio/OcioLutPath", cfg.lutPath);
2076 m_cfg.writeEntry("Krita/Ocio/InputColorSpace", cfg.inputColorSpace);
2077 m_cfg.writeEntry("Krita/Ocio/DisplayDevice", cfg.displayDevice);
2078}

References KisOcioConfiguration::configurationPath, KisOcioConfiguration::displayDevice, KisOcioConfiguration::inputColorSpace, KisOcioConfiguration::lutPath, m_cfg, and KisOcioConfiguration::mode.

◆ setOcioLockColorVisualRepresentation()

void KisConfig::setOcioLockColorVisualRepresentation ( bool value)

Definition at line 2109 of file kis_config.cc.

2110{
2111 m_cfg.writeEntry("Krita/Ocio/OcioLockColorVisualRepresentation", value);
2112}

References m_cfg, and value().

◆ setOcioLutEdgeSize()

void KisConfig::setOcioLutEdgeSize ( int value)

Definition at line 2099 of file kis_config.cc.

2100{
2101 m_cfg.writeEntry("Krita/Ocio/LutEdgeSize", value);
2102}

References m_cfg, and value().

◆ setOpenGLFilteringMode()

void KisConfig::setOpenGLFilteringMode ( int filteringMode)

Definition at line 1089 of file kis_config.cc.

1090{
1091 m_cfg.writeEntry("OpenGLFilterMode", filteringMode);
1092}

References m_cfg.

◆ setOutlineSizeMinimum()

void KisConfig::setOutlineSizeMinimum ( qreal outlineSizeMinimum) const

Definition at line 1514 of file kis_config.cc.

1515{
1516 m_cfg.writeEntry("OutlineSizeMinimum", outlineSizeMinimum);
1517}
qreal outlineSizeMinimum(bool defaultValue=false) const

References m_cfg, and outlineSizeMinimum().

◆ setPaintopPopupDetached()

void KisConfig::setPaintopPopupDetached ( bool detached) const

Definition at line 1606 of file kis_config.cc.

1607{
1608 m_cfg.writeEntry("PaintopPopupDetached", detached);
1609}

References m_cfg.

◆ setPasteBehaviour()

void KisConfig::setPasteBehaviour ( qint32 behaviour) const

Definition at line 1034 of file kis_config.cc.

1035{
1036 m_cfg.writeEntry("pasteBehaviour", renderIntent);
1037}

References m_cfg.

◆ setPasteFormat()

void KisConfig::setPasteFormat ( qint32 format)

Definition at line 1044 of file kis_config.cc.

1045{
1046 m_cfg.writeEntry("pasteFormat", format);
1047}

References m_cfg.

◆ setPixelGridColor()

void KisConfig::setPixelGridColor ( const QColor & v) const

Definition at line 1228 of file kis_config.cc.

1229{
1230 m_cfg.writeEntry("pixelGridColor", v);
1231}

References m_cfg, and v.

◆ setPixelGridDrawingThreshold()

void KisConfig::setPixelGridDrawingThreshold ( qreal v) const

Definition at line 1239 of file kis_config.cc.

1240{
1241 m_cfg.writeEntry("pixelGridDrawingThreshold", v);
1242}

References m_cfg, and v.

◆ setPreferredVectorImportResolutionPPI()

void KisConfig::setPreferredVectorImportResolutionPPI ( int value) const

Definition at line 297 of file kis_config.cc.

298{
299 m_cfg.writeEntry("preferredVectorImportResolution", value);
300}

References m_cfg, and value().

◆ setPreferXcbEglProvider()

void KisConfig::setPreferXcbEglProvider ( bool value)

Definition at line 1126 of file kis_config.cc.

1127{
1128 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1129 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1130 kritarc.setValue("preferXcbEglProvider", value);
1131}

References value().

◆ setPresetChooserViewMode()

void KisConfig::setPresetChooserViewMode ( const int mode) const

Definition at line 1810 of file kis_config.cc.

1811{
1812 m_cfg.writeEntry("presetChooserViewMode", mode);
1813}

References m_cfg.

◆ setPresetIconSize()

void KisConfig::setPresetIconSize ( const int value) const

Definition at line 1820 of file kis_config.cc.

1821{
1822 m_cfg.writeEntry("presetIconSize", value);
1823}

References m_cfg, and value().

◆ setPresetStripVisible()

void KisConfig::setPresetStripVisible ( bool visible)

Definition at line 2186 of file kis_config.cc.

2187{
2188 m_cfg.writeEntry("presetStripVisible", visible);
2189}

References m_cfg.

◆ setPressureTabletCurve()

void KisConfig::setPressureTabletCurve ( const QString & curveString) const

Definition at line 1628 of file kis_config.cc.

1629{
1630 m_cfg.writeEntry("tabletPressureCurve", curveString);
1631}

References m_cfg.

◆ setPrinterColorSpace()

void KisConfig::setPrinterColorSpace ( const QString & printerColorSpace) const

Definition at line 936 of file kis_config.cc.

937{
938 m_cfg.writeEntry("printerColorSpace", printerColorSpace);
939}
QString printerColorSpace(bool defaultValue=false) const

References m_cfg, and printerColorSpace().

◆ setPrinterProfile()

void KisConfig::setPrinterProfile ( const QString & printerProfile) const

Definition at line 947 of file kis_config.cc.

948{
949 m_cfg.writeEntry("printerProfile", printerProfile);
950}
QString printerProfile(bool defaultValue=false) const

References m_cfg, and printerProfile().

◆ setRenamePastedLayers()

void KisConfig::setRenamePastedLayers ( bool value)

Definition at line 2968 of file kis_config.cc.

2969{
2970 m_cfg.writeEntry("renamePastedLayers", value);
2971}

References m_cfg, and value().

◆ setRenderIntent()

void KisConfig::setRenderIntent ( qint32 monitorRenderIntent) const

Definition at line 1057 of file kis_config.cc.

1058{
1059 if (renderIntent > 3) renderIntent = 3;
1060 if (renderIntent < 0) renderIntent = 0;
1061 m_cfg.writeEntry("renderIntent", renderIntent);
1062}

References m_cfg.

◆ setRootSurfaceFormat() [1/2]

void KisConfig::setRootSurfaceFormat ( QSettings * displayrc,
KisConfig::RootSurfaceFormat value )
static

Definition at line 2933 of file kis_config.cc.

2934{
2935 const QString textValue =
2936 value == BT709_G10 ? "bt709-g10" :
2937 value == BT2020_PQ ? "bt2020-pq" :
2938 "bt709-g22";
2939
2940 displayrc->setValue("rootSurfaceFormat", textValue);
2941}

References BT2020_PQ, BT709_G10, and value().

◆ setRootSurfaceFormat() [2/2]

void KisConfig::setRootSurfaceFormat ( KisConfig::RootSurfaceFormat value)

Definition at line 2912 of file kis_config.cc.

2913{
2914 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2915 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
2916
2917 setRootSurfaceFormat(&kritarc, value);
2918}
void setRootSurfaceFormat(RootSurfaceFormat value)

References setRootSurfaceFormat(), and value().

◆ setRulersTrackMouse()

void KisConfig::setRulersTrackMouse ( bool value) const

Definition at line 1024 of file kis_config.cc.

1025{
1026 m_cfg.writeEntry("rulersTrackMouse", value);
1027}

References m_cfg, and value().

◆ setSaveSessionOnQuit()

void KisConfig::setSaveSessionOnQuit ( bool value)

Definition at line 1494 of file kis_config.cc.

1495{
1496 m_cfg.writeEntry("saveSessionOnQuit", value);
1497}

References m_cfg, and value().

◆ setScratchpadVisible()

void KisConfig::setScratchpadVisible ( bool visible)

Definition at line 2196 of file kis_config.cc.

2197{
2198 m_cfg.writeEntry("scratchpadVisible", visible);
2199}

References m_cfg.

◆ setScrollbarZoomEnabled()

void KisConfig::setScrollbarZoomEnabled ( bool enabled) const

Definition at line 1360 of file kis_config.cc.

1361{
1362 m_cfg.writeEntry("scrollbarZoomEnabled", enabled);
1363}

References m_cfg.

◆ setScrollingCheckers()

void KisConfig::setScrollingCheckers ( bool scrollCheckers) const

Definition at line 1329 of file kis_config.cc.

1330{
1331 m_cfg.writeEntry("scrollingcheckers", sc);
1332}

References m_cfg.

◆ setScrubbingAudioUpdatesDelay()

void KisConfig::setScrubbingAudioUpdatesDelay ( int value)

Definition at line 2717 of file kis_config.cc.

2718{
2719 m_cfg.writeEntry("scrubbingAudioUpdatesDelay", value);
2720}

References m_cfg, and value().

◆ setScrubbingUpdatesDelay()

void KisConfig::setScrubbingUpdatesDelay ( int value)

Definition at line 2707 of file kis_config.cc.

2708{
2709 m_cfg.writeEntry("scrubbingUpdatesDelay", value);
2710}

References m_cfg, and value().

◆ setSelectionActionBar()

void KisConfig::setSelectionActionBar ( bool value)

Definition at line 2869 of file kis_config.cc.

2870{
2871 m_cfg.writeEntry("selectionActionBar", value);
2872}

References m_cfg, and value().

◆ setSelectionActionBarBehavior()

void KisConfig::setSelectionActionBarBehavior ( KisConfig::SelectionActionsBarBehavior value)

Definition at line 2879 of file kis_config.cc.

2880{
2881 m_cfg.writeEntry("selectionActionBarBehavior", (int)value);
2882}

References m_cfg, and value().

◆ setSelectionActionBarOrientation()

void KisConfig::setSelectionActionBarOrientation ( KisConfig::SelectionActionsBarOrientation value)

Definition at line 2899 of file kis_config.cc.

2900{
2901 m_cfg.writeEntry("selectionActionBarOrientation", (int)value);
2902}

References m_cfg, and value().

◆ setSelectionActionBarPosition()

void KisConfig::setSelectionActionBarPosition ( KisConfig::SelectionActionsBarPosition value)

Definition at line 2889 of file kis_config.cc.

2890{
2891 m_cfg.writeEntry("selectionActionBarPosition", (int)value);
2892}

References m_cfg, and value().

◆ setSelectionViewSizeMinimum()

void KisConfig::setSelectionViewSizeMinimum ( qreal outlineSizeMinimum) const

Definition at line 1524 of file kis_config.cc.

1525{
1526 m_cfg.writeEntry("SelectionViewSizeMinimum", outlineSizeMinimum);
1527}

References m_cfg, and outlineSizeMinimum().

◆ setSeparateEraserCursor()

void KisConfig::setSeparateEraserCursor ( bool value) const

Definition at line 467 of file kis_config.cc.

468{
469 m_cfg.writeEntry("separateEraserCursor", value);
470}

References m_cfg, and value().

◆ setSessionOnStartup()

void KisConfig::setSessionOnStartup ( SessionOnStartup value)

Definition at line 1475 of file kis_config.cc.

1476{
1477 m_cfg.writeEntry("sessionOnStartup", (int)value);
1478}

References m_cfg, and value().

◆ setShowBrushHud()

void KisConfig::setShowBrushHud ( bool value)

Definition at line 2787 of file kis_config.cc.

2788{
2789 m_cfg.writeEntry("showBrushHud", value);
2790}

References m_cfg, and value().

◆ setShowCanvasMessages()

void KisConfig::setShowCanvasMessages ( bool show)

Definition at line 2436 of file kis_config.cc.

2437{
2438 m_cfg.writeEntry("showOnCanvasMessages", show);
2439}

References m_cfg.

◆ setShowDockers()

void KisConfig::setShowDockers ( const bool value) const

Definition at line 1904 of file kis_config.cc.

1905{
1906 m_cfg.writeEntry("showDockers", value);
1907}

References m_cfg, and value().

◆ setShowDockerTitleBars()

void KisConfig::setShowDockerTitleBars ( const bool value) const

Definition at line 1894 of file kis_config.cc.

1895{
1896 m_cfg.writeEntry("showDockerTitleBars", value);
1897}

References m_cfg, and value().

◆ setShowEraserOutlineWhilePainting()

void KisConfig::setShowEraserOutlineWhilePainting ( bool showEraserOutlineWhilePainting) const

Definition at line 1455 of file kis_config.cc.

1456{
1457 m_cfg.writeEntry("ShowEraserOutlineWhilePainting", showEraserOutlineWhilePainting);
1458}
bool showEraserOutlineWhilePainting(bool defaultValue=false) const

References m_cfg, and showEraserOutlineWhilePainting().

◆ setShowFilterGallery()

void KisConfig::setShowFilterGallery ( bool showFilterGallery) const

Definition at line 1555 of file kis_config.cc.

1556{
1557 m_cfg.writeEntry("showFilterGallery", showFilterGallery);
1558}
bool showFilterGallery(bool defaultValue=false) const

References m_cfg, and showFilterGallery().

◆ setShowFilterGalleryLayerMaskDialog()

void KisConfig::setShowFilterGalleryLayerMaskDialog ( bool showFilterGallery) const

Definition at line 1565 of file kis_config.cc.

1566{
1567 m_cfg.writeEntry("setShowFilterGalleryLayerMaskDialog", showFilterGallery);
1568}

References m_cfg, and showFilterGallery().

◆ setShowGlobalSelection()

void KisConfig::setShowGlobalSelection ( bool showGlobalSelection) const

Definition at line 1421 of file kis_config.cc.

1422{
1423 m_cfg.writeEntry("ShowGlobalSelection", showGlobalSelection);
1424}
bool showGlobalSelection(bool defaultValue=false) const

References m_cfg, and showGlobalSelection().

◆ setShowOutlineWhilePainting()

void KisConfig::setShowOutlineWhilePainting ( bool showOutlineWhilePainting) const

Definition at line 1433 of file kis_config.cc.

1434{
1435 m_cfg.writeEntry("ShowOutlineWhilePainting", showOutlineWhilePainting);
1436}
bool showOutlineWhilePainting(bool defaultValue=false) const

References m_cfg, and showOutlineWhilePainting().

◆ setShowPaletteBottomBar()

void KisConfig::setShowPaletteBottomBar ( bool value)

Definition at line 2797 of file kis_config.cc.

2798{
2799 m_cfg.writeEntry("showPaletteBottomBar", value);
2800}

References m_cfg, and value().

◆ setShowRootLayer()

void KisConfig::setShowRootLayer ( bool showRootLayer) const

Definition at line 1411 of file kis_config.cc.

1412{
1413 m_cfg.writeEntry("ShowRootLayer", showRootLayer);
1414}
bool showRootLayer(bool defaultValue=false) const

References m_cfg, and showRootLayer().

◆ setShowRulers()

void KisConfig::setShowRulers ( bool rulers) const

Definition at line 994 of file kis_config.cc.

995{
996 m_cfg.writeEntry("showrulers", rulers);
997}

References m_cfg.

◆ setShowSingleChannelAsColor()

void KisConfig::setShowSingleChannelAsColor ( bool asColor)

Definition at line 2206 of file kis_config.cc.

2207{
2208 m_cfg.writeEntry("showSingleChannelAsColor", asColor);
2209}

References m_cfg.

◆ setShowStatusBar()

void KisConfig::setShowStatusBar ( const bool value) const

Definition at line 1914 of file kis_config.cc.

1915{
1916 m_cfg.writeEntry("showStatusBar", value);
1917}

References m_cfg, and value().

◆ setSliderLabels()

void KisConfig::setSliderLabels ( bool enabled)

Definition at line 2166 of file kis_config.cc.

2167{
2168 m_cfg.writeEntry("sliderLabels", enabled);
2169}

References m_cfg.

◆ setSplashScreenImage()

void KisConfig::setSplashScreenImage ( const QString & value)

Definition at line 1844 of file kis_config.cc.

1845{
1846 m_cfg.writeEntry(QStringLiteral("splashScreenImage"), value);
1847}

References m_cfg, and value().

◆ setStabilizerDelayedPaint()

void KisConfig::setStabilizerDelayedPaint ( bool value)

Definition at line 2777 of file kis_config.cc.

2778{
2779 m_cfg.writeEntry("stabilizerDelayedPaint", value);
2780}

References m_cfg, and value().

◆ setStabilizerSampleSize()

void KisConfig::setStabilizerSampleSize ( int value)

Definition at line 2764 of file kis_config.cc.

2765{
2766 m_cfg.writeEntry("stabilizerSampleSize", value);
2767}

References m_cfg, and value().

◆ setSwitchSelectionCtrlAlt()

void KisConfig::setSwitchSelectionCtrlAlt ( bool value)

Definition at line 2737 of file kis_config.cc.

2738{
2739 m_cfg.writeEntry("switchSelectionCtrlAlt", value);
2740}

References m_cfg, and value().

◆ setTabletEventsDelay()

void KisConfig::setTabletEventsDelay ( int value)

Definition at line 2376 of file kis_config.cc.

2377{
2378 m_cfg.writeEntry("tabletEventsDelay", value);
2379}

References m_cfg, and value().

◆ setTestingAcceptCompressedTabletEvents()

void KisConfig::setTestingAcceptCompressedTabletEvents ( bool value)

Definition at line 2406 of file kis_config.cc.

2407{
2408 m_cfg.writeEntry("testingAcceptCompressedTabletEvents", value);
2409}

References m_cfg, and value().

◆ setTestingCompressBrushEvents()

void KisConfig::setTestingCompressBrushEvents ( bool value)

Definition at line 2421 of file kis_config.cc.

2422{
2423 m_cfg.writeEntry("testingCompressBrushEvents", value);
2424}

References m_cfg, and value().

◆ setTimelineZoom()

void KisConfig::setTimelineZoom ( qreal value)

Definition at line 2692 of file kis_config.cc.

2693{
2694 m_cfg.writeEntry("timelineZoom", value);
2695}

References m_cfg, and value().

◆ setToolbarSlider()

void KisConfig::setToolbarSlider ( int sliderNumber,
const QString & slider )

Definition at line 2136 of file kis_config.cc.

2137{
2138 m_cfg.writeEntry(QString("toolbarslider_%1").arg(sliderNumber), slider);
2139}

References m_cfg.

◆ setToolOptionsInDocker()

void KisConfig::setToolOptionsInDocker ( bool inDocker)

Definition at line 2485 of file kis_config.cc.

2486{
2487 m_cfg.writeEntry("ToolOptionsInDocker", inDocker);
2488}

References m_cfg.

◆ setToolOptionsPopupDetached()

void KisConfig::setToolOptionsPopupDetached ( bool detached) const

Definition at line 1595 of file kis_config.cc.

1596{
1597 m_cfg.writeEntry("ToolOptionsPopupDetached", detached);
1598}

References m_cfg.

◆ setTouchPainting()

void KisConfig::setTouchPainting ( TouchPainting value) const

Definition at line 151 of file kis_config.cc.

152{
153 m_cfg.writeEntry("touchPainting", int(value));
155}

References KisConfigNotifier::instance(), m_cfg, KisConfigNotifier::notifyTouchPaintingChanged(), and value().

◆ setTrackTabletEventLatency()

void KisConfig::setTrackTabletEventLatency ( bool value)

Definition at line 2386 of file kis_config.cc.

2387{
2388 m_cfg.writeEntry("trackTabletEventLatency", value);
2389}

References m_cfg, and value().

◆ setTrimFramesImport()

void KisConfig::setTrimFramesImport ( bool trim)

Definition at line 2465 of file kis_config.cc.

2466{
2467 m_cfg.writeEntry("TrimFramesImport", trim);
2468}

References m_cfg.

◆ setTrimKra()

void KisConfig::setTrimKra ( bool trim)

Definition at line 2456 of file kis_config.cc.

2457{
2458 m_cfg.writeEntry("TrimKra", trim);
2459}

References m_cfg.

◆ setUndoEnabled()

void KisConfig::setUndoEnabled ( bool undo) const

Definition at line 187 of file kis_config.cc.

188{
189 m_cfg.writeEntry("undoEnabled", undo);
190}

References m_cfg.

◆ setUndoStackLimit()

void KisConfig::setUndoStackLimit ( int limit) const

Definition at line 197 of file kis_config.cc.

198{
199 m_cfg.writeEntry("undoStackLimit", limit);
200}

References m_cfg.

◆ setUseBlackPointCompensation()

void KisConfig::setUseBlackPointCompensation ( bool useBlackPointCompensation) const

Definition at line 958 of file kis_config.cc.

959{
960 m_cfg.writeEntry("useBlackPointCompensation", useBlackPointCompensation);
961}
bool useBlackPointCompensation(bool defaultValue=false) const

References m_cfg, and useBlackPointCompensation().

◆ setUseDefaultColorSpace()

void KisConfig::setUseDefaultColorSpace ( bool value) const

Definition at line 307 of file kis_config.cc.

308{
309 m_cfg.writeEntry("useDefaultColorSpace", value);
310}

References m_cfg, and value().

◆ setUseDirtyPresets()

void KisConfig::setUseDirtyPresets ( bool value)

Definition at line 640 of file kis_config.cc.

641{
642 m_cfg.writeEntry("useDirtyPresets",value);
644}

References KisConfigNotifier::instance(), m_cfg, KisConfigNotifier::notifyConfigChanged(), and value().

◆ setUseEraserBrushOpacity()

void KisConfig::setUseEraserBrushOpacity ( bool value)

Definition at line 662 of file kis_config.cc.

663{
664 m_cfg.writeEntry("useEraserBrushOpacity",value);
666}

References KisConfigNotifier::instance(), m_cfg, KisConfigNotifier::notifyConfigChanged(), and value().

◆ setUseEraserBrushSize()

void KisConfig::setUseEraserBrushSize ( bool value)

Definition at line 651 of file kis_config.cc.

652{
653 m_cfg.writeEntry("useEraserBrushSize",value);
655}

References KisConfigNotifier::instance(), m_cfg, KisConfigNotifier::notifyConfigChanged(), and value().

◆ setUseInlineLayerInfoText()

void KisConfig::setUseInlineLayerInfoText ( bool value)

Definition at line 2998 of file kis_config.cc.

2999{
3000 m_cfg.writeEntry("useInlineLayerInfoText", value);
3001}

References m_cfg, and value().

◆ setUseLayerSelectionCheckbox()

void KisConfig::setUseLayerSelectionCheckbox ( bool value)

Definition at line 3008 of file kis_config.cc.

3009{
3010 m_cfg.writeEntry("useLayerSelectionCheckbox", value);
3011}

References m_cfg, and value().

◆ setUseOcio()

void KisConfig::setUseOcio ( bool useOCIO) const

Definition at line 2031 of file kis_config.cc.

2032{
2033 m_cfg.writeEntry("Krita/Ocio/UseOcio", useOCIO);
2034}

References m_cfg.

◆ setUseOpenGLTextureBuffer()

void KisConfig::setUseOpenGLTextureBuffer ( bool useBuffer)

Definition at line 1109 of file kis_config.cc.

1110{
1111 m_cfg.writeEntry("useOpenGLTextureBuffer", useBuffer);
1112}

References m_cfg.

◆ setUseProjections()

void KisConfig::setUseProjections ( bool useProj) const

Definition at line 177 of file kis_config.cc.

178{
179 m_cfg.writeEntry("useProjections", useProj);
180}

References m_cfg.

◆ setUseRightMiddleTabletButtonWorkaround()

void KisConfig::setUseRightMiddleTabletButtonWorkaround ( bool value)

Definition at line 1678 of file kis_config.cc.

1679{
1680 m_cfg.writeEntry("useRightMiddleTabletButtonWorkaround", value);
1681}

References m_cfg, and value().

◆ setUseWin8PointerInput()

void KisConfig::setUseWin8PointerInput ( bool value)

Definition at line 1646 of file kis_config.cc.

1647{
1648#ifdef Q_OS_WIN
1649
1650 // Special handling: Only set value if changed
1651 // I don't want it to be set if the user hasn't touched it
1652 if (useWin8PointerInput() != value) {
1653 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1654 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1656 }
1657
1658#else
1659 Q_UNUSED(value);
1660#endif
1661}
static void setUseWin8PointerInputNoApp(QSettings *settings, bool value)

References setUseWin8PointerInputNoApp(), useWin8PointerInput(), and value().

◆ setUseWin8PointerInputNoApp()

void KisConfig::setUseWin8PointerInputNoApp ( QSettings * settings,
bool value )
static

Definition at line 1668 of file kis_config.cc.

1669{
1670 settings->setValue("useWin8PointerInput", value);
1671}

References value().

◆ setUseZip64()

void KisConfig::setUseZip64 ( bool value)

Definition at line 2948 of file kis_config.cc.

2949{
2950 m_cfg.writeEntry("UseZip64", value);
2951}

References m_cfg, and value().

◆ setVastScrolling()

void KisConfig::setVastScrolling ( const qreal factor) const

Definition at line 1799 of file kis_config.cc.

1800{
1801 m_cfg.writeEntry("vastScrolling", factor);
1802}

References m_cfg.

◆ setVerticalSplitLines()

void KisConfig::setVerticalSplitLines ( const int numberLines) const

Definition at line 1863 of file kis_config.cc.

1864{
1865 m_cfg.writeEntry("verticalSplitLines", numberLines);
1866}

References m_cfg.

◆ setWidgetStyle()

void KisConfig::setWidgetStyle ( QString name)

Definition at line 1094 of file kis_config.cc.

1095{
1096 m_cfg.writeEntry("widgetStyle", name);
1097}

References m_cfg.

◆ setWorkingColorSpace()

void KisConfig::setWorkingColorSpace ( const QString & workingColorSpace) const

Definition at line 924 of file kis_config.cc.

925{
926 m_cfg.writeEntry("workingColorSpace", workingColorSpace);
927}
QString workingColorSpace(bool defaultValue=false) const

References m_cfg, and workingColorSpace().

◆ setZoomHorizontal()

void KisConfig::setZoomHorizontal ( bool value)

Definition at line 2859 of file kis_config.cc.

2860{
2861 m_cfg.writeEntry("zoomHorizontal", value);
2862}

References m_cfg, and value().

◆ setZoomMarginSize()

void KisConfig::setZoomMarginSize ( int zoomMarginSize)

Definition at line 2551 of file kis_config.cc.

2552{
2553 m_cfg.writeEntry("zoomMarginSize", zoomMarginSize);
2554}
int zoomMarginSize(bool defaultValue=false) const

References m_cfg, and zoomMarginSize().

◆ setZoomSteps()

void KisConfig::setZoomSteps ( int steps)

Definition at line 2541 of file kis_config.cc.

2542{
2543 m_cfg.writeEntry("zoomSteps", steps);
2544}

References m_cfg.

◆ shouldEatDriverShortcuts()

bool KisConfig::shouldEatDriverShortcuts ( bool defaultValue = false) const

Definition at line 2411 of file kis_config.cc.

2412{
2413 return (defaultValue ? false : m_cfg.readEntry("shouldEatDriverShortcuts", false));
2414}

References m_cfg.

◆ showBrushHud()

bool KisConfig::showBrushHud ( bool defaultValue = false) const

Definition at line 2782 of file kis_config.cc.

2783{
2784 return defaultValue ? false : m_cfg.readEntry("showBrushHud", false);
2785}

References m_cfg.

◆ showCanvasMessages()

bool KisConfig::showCanvasMessages ( bool defaultValue = false) const

Definition at line 2431 of file kis_config.cc.

2432{
2433 return (defaultValue ? true : m_cfg.readEntry("showOnCanvasMessages", true));
2434}

References m_cfg.

◆ showDockers()

bool KisConfig::showDockers ( bool defaultValue = false) const

Definition at line 1899 of file kis_config.cc.

1900{
1901 return (defaultValue ? true : m_cfg.readEntry("showDockers", true));
1902}

References m_cfg.

◆ showDockerTitleBars()

bool KisConfig::showDockerTitleBars ( bool defaultValue = false) const

Definition at line 1889 of file kis_config.cc.

1890{
1891 return (defaultValue ? true : m_cfg.readEntry("showDockerTitleBars", true));
1892}

References m_cfg.

◆ showEraserOutlineWhilePainting()

bool KisConfig::showEraserOutlineWhilePainting ( bool defaultValue = false) const

Definition at line 1450 of file kis_config.cc.

1451{
1452 return (defaultValue ? true : m_cfg.readEntry("ShowEraserOutlineWhilePainting", true));
1453}

References m_cfg.

◆ showFilterGallery()

bool KisConfig::showFilterGallery ( bool defaultValue = false) const

Definition at line 1550 of file kis_config.cc.

1551{
1552 return (defaultValue ? false : m_cfg.readEntry("showFilterGallery", false));
1553}

References m_cfg.

◆ showFilterGalleryLayerMaskDialog()

bool KisConfig::showFilterGalleryLayerMaskDialog ( bool defaultValue = false) const

Definition at line 1560 of file kis_config.cc.

1561{
1562 return (defaultValue ? true : m_cfg.readEntry("showFilterGalleryLayerMaskDialog", true));
1563}

References m_cfg.

◆ showGlobalSelection()

bool KisConfig::showGlobalSelection ( bool defaultValue = false) const

Definition at line 1416 of file kis_config.cc.

1417{
1418 return (defaultValue ? false : m_cfg.readEntry("ShowGlobalSelection", false));
1419}

References m_cfg.

◆ showOutlineWhilePainting()

bool KisConfig::showOutlineWhilePainting ( bool defaultValue = false) const

Definition at line 1428 of file kis_config.cc.

1429{
1430 return (defaultValue ? true : m_cfg.readEntry("ShowOutlineWhilePainting", true));
1431}

References m_cfg.

◆ showPaletteBottomBar()

bool KisConfig::showPaletteBottomBar ( bool defaultValue = false) const

Definition at line 2792 of file kis_config.cc.

2793{
2794 return defaultValue ? true : m_cfg.readEntry("showPaletteBottomBar", true);
2795}

References m_cfg.

◆ showRootLayer()

bool KisConfig::showRootLayer ( bool defaultValue = false) const

Definition at line 1406 of file kis_config.cc.

1407{
1408 return (defaultValue ? false : m_cfg.readEntry("ShowRootLayer", false));
1409}

References m_cfg.

◆ showRulers()

bool KisConfig::showRulers ( bool defaultValue = false) const

Definition at line 989 of file kis_config.cc.

990{
991 return (defaultValue ? false : m_cfg.readEntry("showrulers", false));
992}

References m_cfg.

◆ showSingleChannelAsColor()

bool KisConfig::showSingleChannelAsColor ( bool defaultValue = false) const

Definition at line 2201 of file kis_config.cc.

2202{
2203 return (defaultValue ? false : m_cfg.readEntry("showSingleChannelAsColor", false));
2204}

References m_cfg.

◆ showStatusBar()

bool KisConfig::showStatusBar ( bool defaultValue = false) const

Definition at line 1909 of file kis_config.cc.

1910{
1911 return (defaultValue ? true : m_cfg.readEntry("showStatusBar", true));
1912}

References m_cfg.

◆ sliderLabels()

bool KisConfig::sliderLabels ( bool defaultValue = false) const

Definition at line 2161 of file kis_config.cc.

2162{
2163 return (defaultValue ? true : m_cfg.readEntry("sliderLabels", true));
2164}

References m_cfg.

◆ splashScreenImage()

QString KisConfig::splashScreenImage ( bool defaultValue = false) const

Definition at line 1835 of file kis_config.cc.

1836{
1837 if (defaultValue) {
1838 return QString();
1839 } else {
1840 return m_cfg.readEntry(QStringLiteral("splashScreenImage"), QString());
1841 }
1842}

References m_cfg.

◆ stabilizerDelayedPaint()

bool KisConfig::stabilizerDelayedPaint ( bool defaultValue = false) const

Definition at line 2769 of file kis_config.cc.

2770{
2771 const bool defaultEnabled = true;
2772
2773 return defaultValue ?
2774 defaultEnabled : m_cfg.readEntry("stabilizerDelayedPaint", defaultEnabled);
2775}

References m_cfg.

◆ stabilizerSampleSize()

int KisConfig::stabilizerSampleSize ( bool defaultValue = false) const

Definition at line 2752 of file kis_config.cc.

2753{
2754#ifdef Q_OS_WIN
2755 const int defaultSampleSize = 50;
2756#else
2757 const int defaultSampleSize = 15;
2758#endif
2759
2760 return defaultValue ?
2761 defaultSampleSize : m_cfg.readEntry("stabilizerSampleSize", defaultSampleSize);
2762}

References m_cfg.

◆ switchSelectionCtrlAlt()

bool KisConfig::switchSelectionCtrlAlt ( bool defaultValue = false) const

Definition at line 2732 of file kis_config.cc.

2733{
2734 return defaultValue ? false : m_cfg.readEntry("switchSelectionCtrlAlt", false);
2735}

References m_cfg.

◆ tabletEventsDelay()

int KisConfig::tabletEventsDelay ( bool defaultValue = false) const

Definition at line 2371 of file kis_config.cc.

2372{
2373 return (defaultValue ? 10 : m_cfg.readEntry("tabletEventsDelay", 10));
2374}

References m_cfg.

◆ testingAcceptCompressedTabletEvents()

bool KisConfig::testingAcceptCompressedTabletEvents ( bool defaultValue = false) const

Definition at line 2401 of file kis_config.cc.

2402{
2403 return (defaultValue ? false : m_cfg.readEntry("testingAcceptCompressedTabletEvents", false));
2404}

References m_cfg.

◆ testingCompressBrushEvents()

bool KisConfig::testingCompressBrushEvents ( bool defaultValue = false) const

Definition at line 2416 of file kis_config.cc.

2417{
2418 return (defaultValue ? false : m_cfg.readEntry("testingCompressBrushEvents", false));
2419}

References m_cfg.

◆ textureOverlapBorder()

int KisConfig::textureOverlapBorder ( ) const

Definition at line 1148 of file kis_config.cc.

1149{
1150 return 1 << qMax(0, numMipmapLevels());
1151}
int numMipmapLevels(bool defaultValue=false) const

References numMipmapLevels().

◆ timelineZoom()

qreal KisConfig::timelineZoom ( bool defaultValue = false) const

Definition at line 2687 of file kis_config.cc.

2688{
2689 return (defaultValue ? 1.0f : m_cfg.readEntry("timelineZoom", 1.0f));
2690}

References m_cfg.

◆ toolbarSlider()

QString KisConfig::toolbarSlider ( int sliderNumber,
bool defaultValue = false ) const

Definition at line 2124 of file kis_config.cc.

2125{
2126 QString def = "flow";
2127 if (sliderNumber == 1) {
2128 def = "opacity";
2129 }
2130 if (sliderNumber == 2) {
2131 def = "size";
2132 }
2133 return (defaultValue ? def : m_cfg.readEntry(QString("toolbarslider_%1").arg(sliderNumber), def));
2134}

References m_cfg.

◆ toolOptionsInDocker()

bool KisConfig::toolOptionsInDocker ( bool defaultValue = false) const

Definition at line 2480 of file kis_config.cc.

2481{
2482 return (defaultValue ? true : m_cfg.readEntry("ToolOptionsInDocker", true));
2483}

References m_cfg.

◆ toolOptionsPopupDetached()

bool KisConfig::toolOptionsPopupDetached ( bool defaultValue = false) const

Definition at line 1590 of file kis_config.cc.

1591{
1592 return (defaultValue ? false : m_cfg.readEntry("ToolOptionsPopupDetached", false));
1593}

References m_cfg.

◆ touchPainting()

KisConfig::TouchPainting KisConfig::touchPainting ( bool defaultValue = false) const

Definition at line 141 of file kis_config.cc.

142{
143 if (defaultValue) {
144 return TOUCH_PAINTING_AUTO;
145 } else {
146 int value = m_cfg.readEntry("touchPainting", int(TOUCH_PAINTING_AUTO));
147 return TouchPainting(value);
148 }
149}

References m_cfg, TOUCH_PAINTING_AUTO, and value().

◆ trackTabletEventLatency()

bool KisConfig::trackTabletEventLatency ( bool defaultValue = false) const

Definition at line 2381 of file kis_config.cc.

2382{
2383 return (defaultValue ? false : m_cfg.readEntry("trackTabletEventLatency", false));
2384}

References m_cfg.

◆ trimFramesImport()

bool KisConfig::trimFramesImport ( bool defaultValue = false) const

Definition at line 2461 of file kis_config.cc.

2462{
2463 return (defaultValue ? false : m_cfg.readEntry("TrimFramesImport", false));
2464}

References m_cfg.

◆ trimKra()

bool KisConfig::trimKra ( bool defaultValue = false) const

Definition at line 2451 of file kis_config.cc.

2452{
2453 return (defaultValue ? false : m_cfg.readEntry("TrimKra", false));
2454}

References m_cfg.

◆ undoEnabled()

bool KisConfig::undoEnabled ( bool defaultValue = false) const

Definition at line 182 of file kis_config.cc.

183{
184 return (defaultValue ? true : m_cfg.readEntry("undoEnabled", true));
185}

References m_cfg.

◆ undoStackLimit()

int KisConfig::undoStackLimit ( bool defaultValue = false) const

Definition at line 192 of file kis_config.cc.

193{
194 return (defaultValue ? 200 : m_cfg.readEntry("undoStackLimit", 200));
195}

References m_cfg.

◆ useBlackPointCompensation()

bool KisConfig::useBlackPointCompensation ( bool defaultValue = false) const

Definition at line 953 of file kis_config.cc.

954{
955 return (defaultValue ? true : m_cfg.readEntry("useBlackPointCompensation", true));
956}

References m_cfg.

◆ useCumulativeUndoRedo()

bool KisConfig::useCumulativeUndoRedo ( bool defaultValue = false) const

Definition at line 202 of file kis_config.cc.

203{
204 return (defaultValue ? false : m_cfg.readEntry("useCumulativeUndoRedo",false));
205}

References m_cfg.

◆ useDefaultColorSpace()

bool KisConfig::useDefaultColorSpace ( bool defaultvalue = false) const

Definition at line 302 of file kis_config.cc.

303{
304 return (defaultvalue? false: m_cfg.readEntry("useDefaultColorSpace", false));
305}

References m_cfg.

◆ useDirtyPresets()

bool KisConfig::useDirtyPresets ( bool defaultValue = false) const

Definition at line 636 of file kis_config.cc.

637{
638 return (defaultValue ? false : m_cfg.readEntry("useDirtyPresets", true));
639}

References m_cfg.

◆ useEraserBrushOpacity()

bool KisConfig::useEraserBrushOpacity ( bool defaultValue = false) const

Definition at line 657 of file kis_config.cc.

658{
659 return (defaultValue ? false : m_cfg.readEntry("useEraserBrushOpacity",false));
660}

References m_cfg.

◆ useEraserBrushSize()

bool KisConfig::useEraserBrushSize ( bool defaultValue = false) const

Definition at line 646 of file kis_config.cc.

647{
648 return (defaultValue ? false : m_cfg.readEntry("useEraserBrushSize", false));
649}

References m_cfg.

◆ useInlineLayerInfoText()

bool KisConfig::useInlineLayerInfoText ( bool defaultValue = false) const

Definition at line 2993 of file kis_config.cc.

2994{
2995 return defaultValue ? false : m_cfg.readEntry("useInlineLayerInfoText", false);
2996}

References m_cfg.

◆ useLayerSelectionCheckbox()

bool KisConfig::useLayerSelectionCheckbox ( bool defaultValue = false) const

Definition at line 3003 of file kis_config.cc.

3004{
3005 return defaultValue ? false : m_cfg.readEntry("useLayerSelectionCheckbox", true);
3006}

References m_cfg.

◆ useOcio()

bool KisConfig::useOcio ( bool defaultValue = false) const

Definition at line 2021 of file kis_config.cc.

2022{
2023#ifdef HAVE_OCIO
2024 return (defaultValue ? false : m_cfg.readEntry("Krita/Ocio/UseOcio", false));
2025#else
2026 Q_UNUSED(defaultValue);
2027 return false;
2028#endif
2029}

References m_cfg.

◆ useOpenGL()

bool KisConfig::useOpenGL ( bool defaultValue = false) const

Definition at line 1064 of file kis_config.cc.

1065{
1066 if (defaultValue) {
1067 return true;
1068 }
1069
1070 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1071 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1072
1073 return kritarc.value("OpenGLRenderer", "auto").toString() != "none";
1074}

◆ useOpenGLTextureBuffer()

bool KisConfig::useOpenGLTextureBuffer ( bool defaultValue = false) const

Definition at line 1104 of file kis_config.cc.

1105{
1106 return (defaultValue ? true : m_cfg.readEntry("useOpenGLTextureBuffer", true));
1107}

References m_cfg.

◆ useProjections()

bool KisConfig::useProjections ( bool defaultValue = false) const

Definition at line 172 of file kis_config.cc.

173{
174 return (defaultValue ? true : m_cfg.readEntry("useProjections", true));
175}

References m_cfg.

◆ useRightMiddleTabletButtonWorkaround()

bool KisConfig::useRightMiddleTabletButtonWorkaround ( bool defaultValue = false) const

Definition at line 1673 of file kis_config.cc.

1674{
1675 return (defaultValue ? false : m_cfg.readEntry("useRightMiddleTabletButtonWorkaround", false));
1676}

References m_cfg.

◆ useWin8PointerInput()

bool KisConfig::useWin8PointerInput ( bool defaultValue = false) const

Definition at line 1633 of file kis_config.cc.

1634{
1635#ifdef Q_OS_WIN
1636 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1637 QSettings kritarc(configPath + QStringLiteral("/kritadisplayrc"), QSettings::IniFormat);
1638
1639 return useWin8PointerInputNoApp(&kritarc, defaultValue);
1640#else
1641 Q_UNUSED(defaultValue);
1642 return false;
1643#endif
1644}
static bool useWin8PointerInputNoApp(QSettings *settings, bool defaultValue=false)

References useWin8PointerInputNoApp().

◆ useWin8PointerInputNoApp()

bool KisConfig::useWin8PointerInputNoApp ( QSettings * settings,
bool defaultValue = false )
static

Definition at line 1663 of file kis_config.cc.

1664{
1665 return defaultValue ? false : settings->value("useWin8PointerInput", false).toBool();
1666}

◆ useZip64()

bool KisConfig::useZip64 ( bool defaultValue = false) const

Definition at line 2943 of file kis_config.cc.

2944{
2945 return defaultValue ? false : m_cfg.readEntry("UseZip64", false);
2946}

References m_cfg.

◆ vastScrolling()

qreal KisConfig::vastScrolling ( bool defaultValue = false) const

Definition at line 1794 of file kis_config.cc.

1795{
1796 return (defaultValue ? 0.9 : m_cfg.readEntry("vastScrolling", 0.9));
1797}

References m_cfg.

◆ verticalSplitLines()

int KisConfig::verticalSplitLines ( bool defaultValue = false) const

Definition at line 1858 of file kis_config.cc.

1859{
1860 return (defaultValue ? 1 : m_cfg.readEntry("verticalSplitLines", 1));
1861}

References m_cfg.

◆ widgetStyle()

QString KisConfig::widgetStyle ( bool defaultValue = false)

Definition at line 1099 of file kis_config.cc.

1100{
1101 return (defaultValue ? "" : m_cfg.readEntry("widgetStyle", ""));
1102}

References m_cfg.

◆ workaroundX11SmoothPressureSteps()

int KisConfig::workaroundX11SmoothPressureSteps ( bool defaultValue = false) const

Definition at line 2426 of file kis_config.cc.

2427{
2428 return (defaultValue ? 0 : m_cfg.readEntry("workaroundX11SmoothPressureSteps", 0));
2429}

References m_cfg.

◆ workingColorSpace()

QString KisConfig::workingColorSpace ( bool defaultValue = false) const

Definition at line 919 of file kis_config.cc.

920{
921 return (defaultValue ? "RGBA" : m_cfg.readEntry("workingColorSpace", "RGBA"));
922}

References m_cfg.

◆ writeEntry()

template<class T >
void KisConfig::writeEntry ( const QString & name,
const T & value )
inline

Definition at line 904 of file kis_config.h.

904 {
905 m_cfg.writeEntry(name, value);
906 }

References value().

◆ writeKoColor()

void KisConfig::writeKoColor ( const QString & name,
const KoColor & color ) const

Definition at line 3081 of file kis_config.cc.

3082{
3083 QDomDocument doc = QDomDocument(name);
3084 QDomElement el = doc.createElement(name);
3085 doc.appendChild(el);
3086 color.toXML(doc, el);
3087 m_cfg.writeEntry(name, doc.toString());
3088}
void toXML(QDomDocument &doc, QDomElement &colorElt) const
Definition KoColor.cpp:304

References m_cfg, and KoColor::toXML().

◆ writeKoColors()

void KisConfig::writeKoColors ( const QString & name,
const QList< KoColor > & colors ) const

Definition at line 3111 of file kis_config.cc.

3112{
3113 QDomDocument doc = QDomDocument(name);
3114 QDomElement colorsElement = doc.createElement("colors");
3115 doc.appendChild(colorsElement);
3116
3117 // Writes like <colors><RGB ../><RGB .. /> ... </colors>
3118 Q_FOREACH(const KoColor & color, colors) {
3119 color.toXML(doc, colorsElement);
3120 }
3121 m_cfg.writeEntry(name, doc.toString());
3122}

References m_cfg, and KoColor::toXML().

◆ writeList()

template<class T >
void KisConfig::writeList ( const QString & name,
const QList< T > & value )
inline

Definition at line 909 of file kis_config.h.

909 {
910 m_cfg.writeEntry(name, value);
911 }

References value().

◆ zoomHorizontal()

bool KisConfig::zoomHorizontal ( bool defaultValue = false) const

Definition at line 2854 of file kis_config.cc.

2855{
2856 return defaultValue ? false : m_cfg.readEntry("zoomHorizontal", false);
2857}

References m_cfg.

◆ zoomMarginSize()

int KisConfig::zoomMarginSize ( bool defaultValue = false) const

Definition at line 2546 of file kis_config.cc.

2547{
2548 return (defaultValue ? 0 : m_cfg.readEntry("zoomMarginSize", 0));
2549}

References m_cfg.

◆ zoomSteps()

int KisConfig::zoomSteps ( bool defaultValue = false) const

Definition at line 2536 of file kis_config.cc.

2537{
2538 return (defaultValue ? 2 : m_cfg.readEntry("zoomSteps", 2));
2539}

References m_cfg.

Member Data Documentation

◆ m_cfg

KConfigGroup KisConfig::m_cfg
mutableprivate

Definition at line 928 of file kis_config.h.

◆ m_readOnly

bool KisConfig::m_readOnly
private

Definition at line 929 of file kis_config.h.


The documentation for this class was generated from the following files: