File indexing completed on 2024-05-19 04:28:56

0001 /*
0002  *  SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KIS_CONFIG_H_
0007 #define KIS_CONFIG_H_
0008 
0009 #include <QString>
0010 #include <QStringList>
0011 #include <QList>
0012 #include <QColor>
0013 #include <QObject>
0014 
0015 #include <ksharedconfig.h>
0016 #include <kconfiggroup.h>
0017 
0018 #include <kis_global.h>
0019 #include <kis_properties_configuration.h>
0020 #include "kritaui_export.h"
0021 
0022 class KoColorProfile;
0023 class KoColorSpace;
0024 class KisSnapConfig;
0025 class QSettings;
0026 class KisOcioConfiguration;
0027 struct KisCumulativeUndoData;
0028 
0029 class KRITAUI_EXPORT KisConfig
0030 {
0031 public:
0032     /**
0033      * @brief KisConfig create a kisconfig object
0034      * @param readOnly if true, there will be no call to sync when the object is deleted.
0035      *  Any KisConfig object created in a thread must be read-only.
0036      */
0037     KisConfig(bool readOnly);
0038 
0039     ~KisConfig();
0040 
0041 public Q_SLOTS:
0042     /// Log the most interesting settings to the usage log
0043     void logImportantSettings() const;
0044 public:
0045 
0046     bool disableTouchOnCanvas(bool defaultValue = false) const;
0047     void setDisableTouchOnCanvas(bool value) const;
0048 
0049     // XXX Unused?
0050     bool useProjections(bool defaultValue = false) const;
0051     void setUseProjections(bool useProj) const;
0052 
0053     bool undoEnabled(bool defaultValue = false) const;
0054     void setUndoEnabled(bool undo) const;
0055 
0056     int undoStackLimit(bool defaultValue = false) const;
0057     void setUndoStackLimit(int limit) const;
0058 
0059     bool useCumulativeUndoRedo(bool defaultValue = false) const;
0060     void setCumulativeUndoRedo(bool value);
0061 
0062     KisCumulativeUndoData cumulativeUndoData(bool defaultValue = false) const;
0063     void setCumulativeUndoData(KisCumulativeUndoData value);
0064 
0065     qint32 defImageWidth(bool defaultValue = false) const;
0066     void defImageWidth(qint32 width) const;
0067 
0068     qint32 defImageHeight(bool defaultValue = false) const;
0069     void defImageHeight(qint32 height) const;
0070 
0071     qreal defImageResolution(bool defaultValue = false) const;
0072     void defImageResolution(qreal res) const;
0073 
0074     int preferredVectorImportResolutionPPI(bool defaultValue = false) const;
0075     void setPreferredVectorImportResolutionPPI(int value) const;
0076 
0077     bool useDefaultColorSpace(bool defaultvalue = false) const;
0078     void setUseDefaultColorSpace(bool value) const;
0079     /**
0080      * @return the id of the default color model used for creating new images.
0081      */
0082     QString defColorModel(bool defaultValue = false) const;
0083     /**
0084      * set the id of the default color model used for creating new images.
0085      */
0086     void defColorModel(const QString & model) const;
0087 
0088     /**
0089      * @return the id of the default color depth used for creating new images.
0090      */
0091     QString defaultColorDepth(bool defaultValue = false) const;
0092     /**
0093      * set the id of the default color depth used for creating new images.
0094      */
0095     void setDefaultColorDepth(const QString & depth) const;
0096 
0097     /**
0098      * @return the id of the default color profile used for creating new images.
0099      */
0100     QString defColorProfile(bool defaultValue = false) const;
0101     /**
0102      * set the id of the default color profile used for creating new images.
0103      */
0104     void defColorProfile(const QString & depth) const;
0105 
0106     CursorStyle newCursorStyle(bool defaultValue = false) const;
0107     void setNewCursorStyle(CursorStyle style);
0108 
0109     QColor getCursorMainColor(bool defaultValue = false) const;
0110     void setCursorMainColor(const QColor& v) const;
0111 
0112     OutlineStyle newOutlineStyle(bool defaultValue = false) const;
0113     void setNewOutlineStyle(OutlineStyle style);
0114 
0115     OutlineStyle lastUsedOutlineStyle(bool defaultValue = false) const;
0116     void setLastUsedOutlineStyle(OutlineStyle style);
0117 
0118     bool separateEraserCursor(bool defaultValue = false) const;
0119     void setSeparateEraserCursor(bool value) const;
0120 
0121     CursorStyle eraserCursorStyle(bool defaultValue = false) const;
0122     void setEraserCursorStyle(CursorStyle style);
0123 
0124     QColor getEraserCursorMainColor(bool defaultValue = false) const;
0125     void setEraserCursorMainColor(const QColor& v) const;
0126 
0127     OutlineStyle eraserOutlineStyle(bool defaultValue = false) const;
0128     void setEraserOutlineStyle(OutlineStyle style);
0129 
0130     QRect colorPreviewRect() const;
0131     void setColorPreviewRect(const QRect &rect);
0132 
0133     /// get the profile the user has selected for the given screen
0134     QString monitorProfile(int screen) const;
0135     void setMonitorProfile(int screen, const QString & monitorProfile, bool override) const;
0136 
0137     QString monitorForScreen(int screen, const QString &defaultMonitor, bool defaultValue = true) const;
0138     void setMonitorForScreen(int screen, const QString& monitor);
0139 
0140     /// Get the actual profile to be used for the given screen, which is
0141     /// either the screen profile set by the color management system or
0142     /// the custom monitor profile set by the user, depending on the configuration
0143     const KoColorProfile *displayProfile(int screen) const;
0144 
0145     const QString getScreenStringIdentfier(int screenNo) const;
0146 
0147     QString workingColorSpace(bool defaultValue = false) const;
0148     void setWorkingColorSpace(const QString & workingColorSpace) const;
0149 
0150     QString importProfile(bool defaultValue = false) const;
0151     void setImportProfile(const QString & importProfile) const;
0152 
0153     QString printerColorSpace(bool defaultValue = false) const;
0154     void setPrinterColorSpace(const QString & printerColorSpace) const;
0155 
0156     QString printerProfile(bool defaultValue = false) const;
0157     void setPrinterProfile(const QString & printerProfile) const;
0158 
0159     bool useBlackPointCompensation(bool defaultValue = false) const;
0160     void setUseBlackPointCompensation(bool useBlackPointCompensation) const;
0161 
0162     bool allowLCMSOptimization(bool defaultValue = false) const;
0163     void setAllowLCMSOptimization(bool allowLCMSOptimization);
0164 
0165     bool forcePaletteColors(bool defaultValue = false) const;
0166     void setForcePaletteColors(bool forcePaletteColors);
0167 
0168     void writeKoColor(const QString& name, const KoColor& color) const;
0169     KoColor readKoColor(const QString& name, const KoColor& color = KoColor()) const;
0170 
0171     bool showRulers(bool defaultValue = false) const;
0172     void setShowRulers(bool rulers) const;
0173 
0174     bool forceShowSaveMessages(bool defaultValue = true) const;
0175     void setForceShowSaveMessages(bool value) const;
0176 
0177     bool forceShowAutosaveMessages(bool defaultValue = true) const;
0178     void setForceShowAutosaveMessages(bool ShowAutosaveMessages) const;
0179 
0180     bool rulersTrackMouse(bool defaultValue = false) const;
0181     void setRulersTrackMouse(bool value) const;
0182 
0183     qint32 pasteBehaviour(bool defaultValue = false) const;
0184     void setPasteBehaviour(qint32 behaviour) const;
0185 
0186     qint32 pasteFormat(bool defaultValue) const;
0187     void setPasteFormat(qint32 format);
0188 
0189     qint32 monitorRenderIntent(bool defaultValue = false) const;
0190     void setRenderIntent(qint32 monitorRenderIntent) const;
0191 
0192     bool useOpenGL(bool defaultValue = false) const;
0193     void disableOpenGL() const;
0194 
0195     int openGLFilteringMode(bool defaultValue = false) const;
0196     void setOpenGLFilteringMode(int filteringMode);
0197 
0198     void setWidgetStyle(QString name);
0199     QString widgetStyle(bool defaultValue = false);
0200 
0201     bool useOpenGLTextureBuffer(bool defaultValue = false) const;
0202     void setUseOpenGLTextureBuffer(bool useBuffer);
0203 
0204     bool forceOpenGLFenceWorkaround(bool defaultValue = false) const;
0205 
0206     int numMipmapLevels(bool defaultValue = false) const;
0207     int openGLTextureSize(bool defaultValue = false) const;
0208     int textureOverlapBorder() const;
0209 
0210     quint32 getGridMainStyle(bool defaultValue = false) const;
0211     void setGridMainStyle(quint32 v) const;
0212 
0213     quint32 getGridSubdivisionStyle(bool defaultValue = false) const;
0214     void setGridSubdivisionStyle(quint32 v) const;
0215 
0216     QColor getGridMainColor(bool defaultValue = false) const;
0217     void setGridMainColor(const QColor & v) const;
0218 
0219     QColor getGridSubdivisionColor(bool defaultValue = false) const;
0220     void setGridSubdivisionColor(const QColor & v) const;
0221 
0222     QColor getPixelGridColor(bool defaultValue = false) const;
0223     void setPixelGridColor(const QColor & v) const;
0224 
0225     qreal getPixelGridDrawingThreshold(bool defaultValue = false) const;
0226     void setPixelGridDrawingThreshold(qreal v) const;
0227 
0228     bool pixelGridEnabled(bool defaultValue = false) const;
0229     void enablePixelGrid(bool v) const;
0230 
0231     quint32 guidesLineStyle(bool defaultValue = false) const;
0232     void setGuidesLineStyle(quint32 v) const;
0233     QColor guidesColor(bool defaultValue = false) const;
0234     void setGuidesColor(const QColor & v) const;
0235 
0236     void loadSnapConfig(KisSnapConfig *config, bool defaultValue = false) const;
0237     void saveSnapConfig(const KisSnapConfig &config);
0238 
0239     qint32 checkSize(bool defaultValue = false) const;
0240     void setCheckSize(qint32 checkSize) const;
0241 
0242     bool scrollCheckers(bool defaultValue = false) const;
0243     void setScrollingCheckers(bool scrollCheckers) const;
0244 
0245     QColor checkersColor1(bool defaultValue = false) const;
0246     void setCheckersColor1(const QColor & v) const;
0247 
0248     QColor checkersColor2(bool defaultValue = false) const;
0249     void setCheckersColor2(const QColor & v) const;
0250 
0251     QColor canvasBorderColor(bool defaultValue = false) const;
0252     void setCanvasBorderColor(const QColor &color) const;
0253 
0254     bool hideScrollbars(bool defaultValue = false) const;
0255     void setHideScrollbars(bool value) const;
0256 
0257     bool scrollbarZoomEnabled(bool defaultValue = false) const;
0258     void setScrollbarZoomEnabled(bool enabled) const;
0259 
0260     bool antialiasCurves(bool defaultValue = false) const;
0261     void setAntialiasCurves(bool v) const;
0262 
0263     bool antialiasSelectionOutline(bool defaultValue = false) const;
0264     void setAntialiasSelectionOutline(bool v) const;
0265 
0266     bool showRootLayer(bool defaultValue = false) const;
0267     void setShowRootLayer(bool showRootLayer) const;
0268 
0269     bool showGlobalSelection(bool defaultValue = false) const;
0270     void setShowGlobalSelection(bool showGlobalSelection) const;
0271 
0272     bool showOutlineWhilePainting(bool defaultValue = false) const;
0273     void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const;
0274 
0275     bool forceAlwaysFullSizedOutline(bool defaultValue = false) const;
0276     void setForceAlwaysFullSizedOutline(bool value) const;
0277 
0278     bool showEraserOutlineWhilePainting(bool defaultValue = false) const;
0279     void setShowEraserOutlineWhilePainting(bool showEraserOutlineWhilePainting) const;
0280 
0281     bool forceAlwaysFullSizedEraserOutline(bool defaultValue = false) const;
0282     void setForceAlwaysFullSizedEraserOutline(bool value) const;
0283 
0284     enum SessionOnStartup {
0285         SOS_BlankSession,
0286         SOS_PreviousSession,
0287         SOS_ShowSessionManager
0288     };
0289     SessionOnStartup sessionOnStartup(bool defaultValue = false) const;
0290     void setSessionOnStartup(SessionOnStartup value);
0291 
0292     bool saveSessionOnQuit(bool defaultValue) const;
0293     void setSaveSessionOnQuit(bool value);
0294 
0295     bool hideDevFundBanner(bool defaultValue = false) const;
0296     void setHideDevFundBanner(bool value = true);
0297 
0298     qreal outlineSizeMinimum(bool defaultValue = false) const;
0299     void setOutlineSizeMinimum(qreal outlineSizeMinimum) const;
0300 
0301     qreal selectionViewSizeMinimum(bool defaultValue = false) const;
0302     void setSelectionViewSizeMinimum(qreal outlineSizeMinimum) const;
0303 
0304     int autoSaveInterval(bool defaultValue = false) const;
0305     void setAutoSaveInterval(int seconds) const;
0306 
0307     bool backupFile(bool defaultValue = false) const;
0308     void setBackupFile(bool backupFile) const;
0309 
0310     bool showFilterGallery(bool defaultValue = false) const;
0311     void setShowFilterGallery(bool showFilterGallery) const;
0312 
0313     bool showFilterGalleryLayerMaskDialog(bool defaultValue = false) const;
0314     void setShowFilterGalleryLayerMaskDialog(bool showFilterGallery) const;
0315 
0316     // OPENGL_SUCCESS, TRY_OPENGL, OPENGL_NOT_TRIED, OPENGL_FAILED
0317     QString canvasState(bool defaultValue = false) const;
0318     void setCanvasState(const QString& state) const;
0319 
0320     bool toolOptionsPopupDetached(bool defaultValue = false) const;
0321     void setToolOptionsPopupDetached(bool detached) const;
0322 
0323     bool paintopPopupDetached(bool defaultValue = false) const;
0324     void setPaintopPopupDetached(bool detached) const;
0325 
0326     QString pressureTabletCurve(bool defaultValue = false) const;
0327     void setPressureTabletCurve(const QString& curveString) const;
0328 
0329     bool useWin8PointerInput(bool defaultValue = false) const;
0330     void setUseWin8PointerInput(bool value);
0331 
0332     static bool useWin8PointerInputNoApp(QSettings *settings, bool defaultValue = false);
0333     static void setUseWin8PointerInputNoApp(QSettings *settings, bool value);
0334 
0335     bool useRightMiddleTabletButtonWorkaround(bool defaultValue = false) const;
0336     void setUseRightMiddleTabletButtonWorkaround(bool value);
0337 
0338     qreal vastScrolling(bool defaultValue = false) const;
0339     void setVastScrolling(const qreal factor) const;
0340 
0341     int presetChooserViewMode(bool defaultValue = false) const;
0342     void setPresetChooserViewMode(const int mode) const;
0343 
0344     int presetIconSize(bool defaultValue = false) const;
0345     void setPresetIconSize(const int value) const;
0346 
0347 
0348     bool firstRun(bool defaultValue = false) const;
0349     void setFirstRun(const bool firstRun) const;
0350 
0351     bool clicklessSpacePan(bool defaultValue = false) const;
0352     void setClicklessSpacePan(const bool toggle) const;
0353 
0354     int horizontalSplitLines(bool defaultValue = false) const;
0355     void setHorizontalSplitLines(const int numberLines) const;
0356 
0357     int verticalSplitLines(bool defaultValue = false) const;
0358     void setVerticalSplitLines(const int numberLines) const;
0359 
0360     bool hideDockersFullscreen(bool defaultValue = false) const;
0361     void setHideDockersFullscreen(const bool value) const;
0362 
0363     bool showDockerTitleBars(bool defaultValue = false) const;
0364     void setShowDockerTitleBars(const bool value) const;
0365 
0366     bool showDockers(bool defaultValue = false) const;
0367     void setShowDockers(const bool value) const;
0368 
0369     bool showStatusBar(bool defaultValue = false) const;
0370     void setShowStatusBar(const bool value) const;
0371 
0372     bool hideMenuFullscreen(bool defaultValue = false) const;
0373     void setHideMenuFullscreen(const bool value) const;
0374 
0375     bool hideScrollbarsFullscreen(bool defaultValue = false) const;
0376     void setHideScrollbarsFullscreen(const bool value) const;
0377 
0378     bool hideStatusbarFullscreen(bool defaultValue = false) const;
0379     void setHideStatusbarFullscreen(const bool value) const;
0380 
0381     bool hideTitlebarFullscreen(bool defaultValue = false) const;
0382     void setHideTitlebarFullscreen(const bool value) const;
0383 
0384     bool hideToolbarFullscreen(bool defaultValue = false) const;
0385     void setHideToolbarFullscreen(const bool value) const;
0386 
0387     bool fullscreenMode(bool defaultValue = false) const;
0388     void setFullscreenMode(const bool value) const;
0389 
0390     QStringList favoriteCompositeOps(bool defaultValue = false) const;
0391     void setFavoriteCompositeOps(const QStringList& compositeOps) const;
0392 
0393     QString exportConfigurationXML(const QString &filterId, bool defaultValue = false) const;
0394     KisPropertiesConfigurationSP exportConfiguration(const QString &filterId, bool defaultValue = false) const;
0395     void setExportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
0396 
0397     QString importConfiguration(const QString &filterId, bool defaultValue = false) const;
0398     void setImportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
0399 
0400     bool useOcio(bool defaultValue = false) const;
0401     void setUseOcio(bool useOCIO) const;
0402 
0403     int favoritePresets(bool defaultValue = false) const;
0404     void setFavoritePresets(const int value);
0405 
0406     bool levelOfDetailEnabled(bool defaultValue = false) const;
0407     void setLevelOfDetailEnabled(bool value);
0408 
0409     KisOcioConfiguration ocioConfiguration(bool defaultValue = false) const;
0410     void setOcioConfiguration(const KisOcioConfiguration &cfg);
0411 
0412     enum OcioColorManagementMode {
0413         INTERNAL = 0,
0414         OCIO_CONFIG,
0415         OCIO_ENVIRONMENT
0416     };
0417 
0418     OcioColorManagementMode ocioColorManagementMode(bool defaultValue = false) const;
0419     void setOcioColorManagementMode(OcioColorManagementMode mode) const;
0420 
0421     int ocioLutEdgeSize(bool defaultValue = false) const;
0422     void setOcioLutEdgeSize(int value);
0423 
0424     bool ocioLockColorVisualRepresentation(bool defaultValue = false) const;
0425     void setOcioLockColorVisualRepresentation(bool value);
0426 
0427     bool useSystemMonitorProfile(bool defaultValue = false) const;
0428     void setUseSystemMonitorProfile(bool _useSystemMonitorProfile) const;
0429 
0430     QString defaultPalette(bool defaultValue = false) const;
0431     void setDefaultPalette(const QString& name) const;
0432 
0433     QString toolbarSlider(int sliderNumber, bool defaultValue = false) const;
0434     void setToolbarSlider(int sliderNumber, const QString &slider);
0435 
0436 
0437     int layerThumbnailSize(bool defaultValue = false) const;
0438     void setLayerThumbnailSize(int size);
0439 
0440     int layerTreeIndentation(bool defaultValue = false) const;
0441     void setLayerTreeIndentation(int percentage);
0442 
0443 
0444     bool sliderLabels(bool defaultValue = false) const;
0445     void setSliderLabels(bool enabled);
0446 
0447     QString currentInputProfile(bool defaultValue = false) const;
0448     void setCurrentInputProfile(const QString& name);
0449 
0450     bool presetStripVisible(bool defaultValue = false) const;
0451     void setPresetStripVisible(bool visible);
0452 
0453     bool scratchpadVisible(bool defaultValue = false) const;
0454     void setScratchpadVisible(bool visible);
0455 
0456     bool showSingleChannelAsColor(bool defaultValue = false) const;
0457     void setShowSingleChannelAsColor(bool asColor);
0458 
0459     bool hidePopups(bool defaultValue = false) const;
0460     void setHidePopups(bool hidePopups);
0461 
0462     int numDefaultLayers(bool defaultValue = false) const;
0463     void setNumDefaultLayers(int num);
0464 
0465     quint8 defaultBackgroundOpacity(bool defaultValue = false) const;
0466     void setDefaultBackgroundOpacity(quint8 value);
0467 
0468     QColor defaultBackgroundColor(bool defaultValue = false) const;
0469     void setDefaultBackgroundColor(const QColor &value);
0470 
0471     enum BackgroundStyle {
0472         RASTER_LAYER = 0,
0473         CANVAS_COLOR = 1,
0474         FILL_LAYER = 2
0475     };
0476 
0477     BackgroundStyle defaultBackgroundStyle(bool defaultValue = false) const;
0478     void setDefaultBackgroundStyle(BackgroundStyle value);
0479 
0480     int lineSmoothingType(bool defaultValue = false) const;
0481     void setLineSmoothingType(int value);
0482 
0483     qreal lineSmoothingDistance(bool defaultValue = false) const;
0484     void setLineSmoothingDistance(qreal value);
0485 
0486     qreal lineSmoothingTailAggressiveness(bool defaultValue = false) const;
0487     void setLineSmoothingTailAggressiveness(qreal value);
0488 
0489     bool lineSmoothingSmoothPressure(bool defaultValue = false) const;
0490     void setLineSmoothingSmoothPressure(bool value);
0491 
0492     bool lineSmoothingScalableDistance(bool defaultValue = false) const;
0493     void setLineSmoothingScalableDistance(bool value);
0494 
0495     qreal lineSmoothingDelayDistance(bool defaultValue = false) const;
0496     void setLineSmoothingDelayDistance(qreal value);
0497 
0498     bool lineSmoothingUseDelayDistance(bool defaultValue = false) const;
0499     void setLineSmoothingUseDelayDistance(bool value);
0500 
0501     bool lineSmoothingFinishStabilizedCurve(bool defaultValue = false) const;
0502     void setLineSmoothingFinishStabilizedCurve(bool value);
0503 
0504     bool lineSmoothingStabilizeSensors(bool defaultValue = false) const;
0505     void setLineSmoothingStabilizeSensors(bool value);
0506 
0507     int tabletEventsDelay(bool defaultValue = false) const;
0508     void setTabletEventsDelay(int value);
0509 
0510     bool trackTabletEventLatency(bool defaultValue = false) const;
0511     void setTrackTabletEventLatency(bool value);
0512 
0513     bool testingAcceptCompressedTabletEvents(bool defaultValue = false) const;
0514     void setTestingAcceptCompressedTabletEvents(bool value);
0515 
0516     bool shouldEatDriverShortcuts(bool defaultValue = false) const;
0517 
0518     bool testingCompressBrushEvents(bool defaultValue = false) const;
0519     void setTestingCompressBrushEvents(bool value);
0520 
0521     const KoColorSpace* customColorSelectorColorSpace(bool defaultValue = false) const;
0522     void setCustomColorSelectorColorSpace(const KoColorSpace *cs);
0523 
0524     bool useDirtyPresets(bool defaultValue = false) const;
0525     void setUseDirtyPresets(bool value);
0526 
0527     bool useEraserBrushSize(bool defaultValue = false) const;
0528     void setUseEraserBrushSize(bool value);
0529 
0530     bool useEraserBrushOpacity(bool defaultValue = false) const;
0531     void setUseEraserBrushOpacity(bool value);
0532 
0533     QPoint getDefaultGridSpacing(bool defaultValue = false) const;
0534     void setDefaultGridSpacing(QPoint gridSpacing);
0535 
0536     QString getMDIBackgroundColor(bool defaultValue = false) const;
0537     void setMDIBackgroundColor(const QString & v) const;
0538 
0539     QString getMDIBackgroundImage(bool defaultValue = false) const;
0540     void setMDIBackgroundImage(const QString & fileName) const;
0541 
0542     int workaroundX11SmoothPressureSteps(bool defaultValue = false) const;
0543 
0544     bool showCanvasMessages(bool defaultValue = false) const;
0545     void setShowCanvasMessages(bool show);
0546 
0547     bool compressKra(bool defaultValue = false) const;
0548     void setCompressKra(bool compress);
0549 
0550     bool trimKra(bool defaultValue = false) const;
0551     void setTrimKra(bool trim);
0552 
0553     bool trimFramesImport(bool defaultValue = false) const;
0554     void setTrimFramesImport(bool trim);
0555 
0556     bool toolOptionsInDocker(bool defaultValue = false) const;
0557     void setToolOptionsInDocker(bool inDocker);
0558 
0559     bool kineticScrollingEnabled(bool defaultValue = false) const;
0560     void setKineticScrollingEnabled(bool enabled);
0561 
0562     int kineticScrollingGesture(bool defaultValue = false) const;
0563     void setKineticScrollingGesture(int kineticScroll);
0564 
0565     int kineticScrollingSensitivity(bool defaultValue = false) const;
0566     void setKineticScrollingSensitivity(int sensitivity);
0567 
0568     bool kineticScrollingHiddenScrollbars(bool defaultValue = false) const;
0569     void setKineticScrollingHideScrollbars(bool scrollbar);
0570 
0571     int zoomSteps(bool defaultValue = false) const;
0572     void setZoomSteps(int steps);
0573 
0574     int zoomMarginSize(bool defaultValue = false) const;
0575     void setZoomMarginSize(int zoomMarginSize);
0576 
0577     void setEnableOpenGLFramerateLogging(bool value) const;
0578     bool enableOpenGLFramerateLogging(bool defaultValue = false) const;
0579 
0580     void setEnableBrushSpeedLogging(bool value) const;
0581     bool enableBrushSpeedLogging(bool defaultValue = false) const;
0582 
0583     void setDisableVectorOptimizations(bool value);
0584     bool disableVectorOptimizations(bool defaultValue = false) const;
0585 
0586     void setDisableAVXOptimizations(bool value);
0587     bool disableAVXOptimizations(bool defaultValue = false) const;
0588 
0589     void setAnimationPlaybackBackend(int value);
0590     int animationPlaybackBackend(bool defaultValue = false) const;
0591 
0592     bool animationDropFrames(bool defaultValue = false) const;
0593     void setAnimationDropFrames(bool value);
0594 
0595     bool autoPinLayersToTimeline(bool defaultValue = false) const;
0596     void setAutoPinLayersToTimeline(bool value);
0597 
0598     bool adaptivePlaybackRange(bool defaultValue = false) const;
0599     void setAdaptivePlaybackRange(bool value);
0600     
0601     QString ffmpegLocation(bool defaultValue = false) const;
0602     void setFFMpegLocation(const QString& value);
0603 
0604     qreal timelineZoom(bool defaultValue = false) const;
0605     void setTimelineZoom(qreal value);
0606 
0607     int scrubbingUpdatesDelay(bool defaultValue = false) const;
0608     void setScrubbingUpdatesDelay(int value);
0609 
0610     int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
0611     void setScrubbingAudioUpdatesDelay(int value);
0612 
0613     int audioOffsetTolerance(bool defaultValue = false) const;
0614     void setAudioOffsetTolerance(int value);
0615 
0616     bool switchSelectionCtrlAlt(bool defaultValue = false) const;
0617     void setSwitchSelectionCtrlAlt(bool value);
0618 
0619     bool convertToImageColorspaceOnImport(bool defaultValue = false) const;
0620     void setConvertToImageColorspaceOnImport(bool value);
0621 
0622     int stabilizerSampleSize(bool defaultValue = false) const;
0623     void setStabilizerSampleSize(int value);
0624 
0625     bool stabilizerDelayedPaint(bool defaultValue = false) const;
0626     void setStabilizerDelayedPaint(bool value);
0627 
0628     bool showBrushHud(bool defaultValue = false) const;
0629     void setShowBrushHud(bool value);
0630     
0631     bool showPaletteBottomBar(bool defaultValue = false) const;
0632     void setShowPaletteBottomBar(bool value);
0633 
0634     QString brushHudSetting(bool defaultValue = false) const;
0635     void setBrushHudSetting(const QString &value) const;
0636 
0637     bool calculateAnimationCacheInBackground(bool defaultValue = false) const;
0638     void setCalculateAnimationCacheInBackground(bool value);
0639 
0640     QColor defaultAssistantsColor(bool defaultValue = false) const;
0641     void setDefaultAssistantsColor(const QColor &color) const;
0642 
0643     bool autoSmoothBezierCurves(bool defaultValue = false) const;
0644     void setAutoSmoothBezierCurves(bool value);
0645     
0646     bool activateTransformToolAfterPaste(bool defaultValue = false) const;
0647     void setActivateTransformToolAfterPaste(bool value);
0648     
0649     bool zoomHorizontal(bool defaultValue = false) const;
0650     void setZoomHorizontal(bool value);
0651     
0652     enum RootSurfaceFormat {
0653         BT709_G22 = 0,
0654         BT709_G10,
0655         BT2020_PQ
0656     };
0657     RootSurfaceFormat rootSurfaceFormat(bool defaultValue = false) const;
0658     void setRootSurfaceFormat(RootSurfaceFormat value);
0659 
0660     static RootSurfaceFormat rootSurfaceFormat(QSettings *displayrc, bool defaultValue = false);
0661     static void setRootSurfaceFormat(QSettings *displayrc, RootSurfaceFormat value);
0662 
0663     bool useZip64(bool defaultValue = false) const;
0664     void setUseZip64(bool value);
0665 
0666     bool convertLayerColorSpaceInProperties(bool defaultValue = false) const;
0667     void setConvertLayerColorSpaceInProperties(bool value);
0668 
0669     bool renamePastedLayers(bool defaultValue = false) const;
0670     void setRenamePastedLayers(bool value);
0671 
0672     enum LayerInfoTextStyle {
0673         INFOTEXT_NONE = 0,
0674         INFOTEXT_SIMPLE,
0675         INFOTEXT_BALANCED,
0676         INFOTEXT_DETAILED
0677     };
0678     LayerInfoTextStyle layerInfoTextStyle(bool defaultValue = false) const;
0679     void setLayerInfoTextStyle(LayerInfoTextStyle value);
0680 
0681     int layerInfoTextOpacity(bool defaultValue = false) const;
0682     void setLayerInfoTextOpacity(int value);
0683 
0684     bool useInlineLayerInfoText(bool defaultValue = false) const;
0685     void setUseInlineLayerInfoText(bool value);
0686 
0687     bool useLayerSelectionCheckbox(bool defaultValue = false) const;
0688     void setUseLayerSelectionCheckbox(bool value);
0689 
0690     enum AssistantsDrawMode {
0691         ASSISTANTS_DRAW_MODE_DIRECT = 0,             // no caching, draw directly on canvas
0692         ASSISTANTS_DRAW_MODE_PIXMAP_CACHE = 1,
0693         ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE = 2,
0694     };
0695     AssistantsDrawMode assistantsDrawMode(bool defaultValue = false) const;
0696     void setAssistantsDrawMode(AssistantsDrawMode value);
0697 
0698     template<class T>
0699     void writeEntry(const QString& name, const T& value) {
0700         m_cfg.writeEntry(name, value);
0701     }
0702 
0703     template<class T>
0704     void writeList(const QString& name, const QList<T>& value) {
0705         m_cfg.writeEntry(name, value);
0706     }
0707 
0708     template<class T>
0709     T readEntry(const QString& name, const T& defaultValue=T()) {
0710         return m_cfg.readEntry(name, defaultValue);
0711     }
0712 
0713     template<class T>
0714     QList<T> readList(const QString& name, const QList<T>& defaultValue=QList<T>()) {
0715         return m_cfg.readEntry(name, defaultValue);
0716     }
0717 
0718 
0719     /// get the profile the color management system has stored for the given screen
0720     static const KoColorProfile* getScreenProfile(int screen);
0721 
0722 private:
0723     KisConfig(const KisConfig&);
0724     KisConfig& operator=(const KisConfig&) const;
0725 
0726 
0727 private:
0728     mutable KConfigGroup m_cfg;
0729     bool m_readOnly;
0730 };
0731 
0732 #endif // KIS_CONFIG_H_