File indexing completed on 2024-05-12 16:01:29

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 
0028 class KRITAUI_EXPORT KisConfig
0029 {
0030 public:
0031     /**
0032      * @brief KisConfig create a kisconfig object
0033      * @param readOnly if true, there will be no call to sync when the object is deleted.
0034      *  Any KisConfig object created in a thread must be read-only.
0035      */
0036     KisConfig(bool readOnly);
0037 
0038     ~KisConfig();
0039 
0040 public Q_SLOTS:
0041     /// Log the most interesting settings to the usage log
0042     void logImportantSettings() const;
0043 public:
0044 
0045     bool disableTouchOnCanvas(bool defaultValue = false) const;
0046     void setDisableTouchOnCanvas(bool value) const;
0047 
0048     // XXX Unused?
0049     bool useProjections(bool defaultValue = false) const;
0050     void setUseProjections(bool useProj) const;
0051 
0052     bool undoEnabled(bool defaultValue = false) const;
0053     void setUndoEnabled(bool undo) const;
0054 
0055     int undoStackLimit(bool defaultValue = false) const;
0056     void setUndoStackLimit(int limit) const;
0057 
0058     bool useCumulativeUndoRedo(bool defaultValue = false) const;
0059     void setCumulativeUndoRedo(bool value);
0060 
0061     double stackT1(bool defaultValue = false) const;
0062     void setStackT1(int T1);
0063 
0064     double stackT2(bool defaultValue = false) const;
0065     void setStackT2(int T2);
0066 
0067     int stackN(bool defaultValue = false) const;
0068     void setStackN(int N);
0069 
0070     qint32 defImageWidth(bool defaultValue = false) const;
0071     void defImageWidth(qint32 width) const;
0072 
0073     qint32 defImageHeight(bool defaultValue = false) const;
0074     void defImageHeight(qint32 height) const;
0075 
0076     qreal defImageResolution(bool defaultValue = false) const;
0077     void defImageResolution(qreal res) const;
0078 
0079     int preferredVectorImportResolutionPPI(bool defaultValue = false) const;
0080     void setPreferredVectorImportResolutionPPI(int value) const;
0081 
0082     bool useDefaultColorSpace(bool defaultvalue = false) const;
0083     void setUseDefaultColorSpace(bool value) const;
0084     /**
0085      * @return the id of the default color model used for creating new images.
0086      */
0087     QString defColorModel(bool defaultValue = false) const;
0088     /**
0089      * set the id of the default color model used for creating new images.
0090      */
0091     void defColorModel(const QString & model) const;
0092 
0093     /**
0094      * @return the id of the default color depth used for creating new images.
0095      */
0096     QString defaultColorDepth(bool defaultValue = false) const;
0097     /**
0098      * set the id of the default color depth used for creating new images.
0099      */
0100     void setDefaultColorDepth(const QString & depth) const;
0101 
0102     /**
0103      * @return the id of the default color profile used for creating new images.
0104      */
0105     QString defColorProfile(bool defaultValue = false) const;
0106     /**
0107      * set the id of the default color profile used for creating new images.
0108      */
0109     void defColorProfile(const QString & depth) const;
0110 
0111     CursorStyle newCursorStyle(bool defaultValue = false) const;
0112     void setNewCursorStyle(CursorStyle style);
0113 
0114     QColor getCursorMainColor(bool defaultValue = false) const;
0115     void setCursorMainColor(const QColor& v) const;
0116 
0117     OutlineStyle newOutlineStyle(bool defaultValue = false) const;
0118     void setNewOutlineStyle(OutlineStyle style);
0119 
0120     OutlineStyle lastUsedOutlineStyle(bool defaultValue = false) const;
0121     void setLastUsedOutlineStyle(OutlineStyle style);
0122 
0123     bool separateEraserCursor(bool defaultValue = false) const;
0124     void setSeparateEraserCursor(bool value) const;
0125 
0126     CursorStyle eraserCursorStyle(bool defaultValue = false) const;
0127     void setEraserCursorStyle(CursorStyle style);
0128 
0129     QColor getEraserCursorMainColor(bool defaultValue = false) const;
0130     void setEraserCursorMainColor(const QColor& v) const;
0131 
0132     OutlineStyle eraserOutlineStyle(bool defaultValue = false) const;
0133     void setEraserOutlineStyle(OutlineStyle style);
0134 
0135     QRect colorPreviewRect() const;
0136     void setColorPreviewRect(const QRect &rect);
0137 
0138     /// get the profile the user has selected for the given screen
0139     QString monitorProfile(int screen) const;
0140     void setMonitorProfile(int screen, const QString & monitorProfile, bool override) const;
0141 
0142     QString monitorForScreen(int screen, const QString &defaultMonitor, bool defaultValue = true) const;
0143     void setMonitorForScreen(int screen, const QString& monitor);
0144 
0145     /// Get the actual profile to be used for the given screen, which is
0146     /// either the screen profile set by the color management system or
0147     /// the custom monitor profile set by the user, depending on the configuration
0148     const KoColorProfile *displayProfile(int screen) const;
0149 
0150     QString workingColorSpace(bool defaultValue = false) const;
0151     void setWorkingColorSpace(const QString & workingColorSpace) const;
0152 
0153     QString importProfile(bool defaultValue = false) const;
0154     void setImportProfile(const QString & importProfile) const;
0155 
0156     QString printerColorSpace(bool defaultValue = false) const;
0157     void setPrinterColorSpace(const QString & printerColorSpace) const;
0158 
0159     QString printerProfile(bool defaultValue = false) const;
0160     void setPrinterProfile(const QString & printerProfile) const;
0161 
0162     bool useBlackPointCompensation(bool defaultValue = false) const;
0163     void setUseBlackPointCompensation(bool useBlackPointCompensation) const;
0164 
0165     bool allowLCMSOptimization(bool defaultValue = false) const;
0166     void setAllowLCMSOptimization(bool allowLCMSOptimization);
0167 
0168     bool forcePaletteColors(bool defaultValue = false) const;
0169     void setForcePaletteColors(bool forcePaletteColors);
0170 
0171     void writeKoColor(const QString& name, const KoColor& color) const;
0172     KoColor readKoColor(const QString& name, const KoColor& color = KoColor()) const;
0173 
0174     bool showRulers(bool defaultValue = false) const;
0175     void setShowRulers(bool rulers) const;
0176 
0177     bool forceShowSaveMessages(bool defaultValue = true) const;
0178     void setForceShowSaveMessages(bool value) const;
0179 
0180     bool forceShowAutosaveMessages(bool defaultValue = true) const;
0181     void setForceShowAutosaveMessages(bool ShowAutosaveMessages) const;
0182 
0183     bool rulersTrackMouse(bool defaultValue = false) const;
0184     void setRulersTrackMouse(bool value) const;
0185 
0186     qint32 pasteBehaviour(bool defaultValue = false) const;
0187     void setPasteBehaviour(qint32 behaviour) const;
0188 
0189     qint32 pasteFormat(bool defaultValue) const;
0190     void setPasteFormat(qint32 format);
0191 
0192     qint32 monitorRenderIntent(bool defaultValue = false) const;
0193     void setRenderIntent(qint32 monitorRenderIntent) const;
0194 
0195     bool useOpenGL(bool defaultValue = false) const;
0196     void disableOpenGL() const;
0197 
0198     int openGLFilteringMode(bool defaultValue = false) const;
0199     void setOpenGLFilteringMode(int filteringMode);
0200 
0201     void setWidgetStyle(QString name);
0202     QString widgetStyle(bool defaultValue = false);
0203 
0204     bool useOpenGLTextureBuffer(bool defaultValue = false) const;
0205     void setUseOpenGLTextureBuffer(bool useBuffer);
0206 
0207     bool forceOpenGLFenceWorkaround(bool defaultValue = false) const;
0208 
0209     int numMipmapLevels(bool defaultValue = false) const;
0210     int openGLTextureSize(bool defaultValue = false) const;
0211     int textureOverlapBorder() const;
0212 
0213     quint32 getGridMainStyle(bool defaultValue = false) const;
0214     void setGridMainStyle(quint32 v) const;
0215 
0216     quint32 getGridSubdivisionStyle(bool defaultValue = false) const;
0217     void setGridSubdivisionStyle(quint32 v) const;
0218 
0219     QColor getGridMainColor(bool defaultValue = false) const;
0220     void setGridMainColor(const QColor & v) const;
0221 
0222     QColor getGridSubdivisionColor(bool defaultValue = false) const;
0223     void setGridSubdivisionColor(const QColor & v) const;
0224 
0225     QColor getPixelGridColor(bool defaultValue = false) const;
0226     void setPixelGridColor(const QColor & v) const;
0227 
0228     qreal getPixelGridDrawingThreshold(bool defaultValue = false) const;
0229     void setPixelGridDrawingThreshold(qreal v) const;
0230 
0231     bool pixelGridEnabled(bool defaultValue = false) const;
0232     void enablePixelGrid(bool v) const;
0233 
0234     quint32 guidesLineStyle(bool defaultValue = false) const;
0235     void setGuidesLineStyle(quint32 v) const;
0236     QColor guidesColor(bool defaultValue = false) const;
0237     void setGuidesColor(const QColor & v) const;
0238 
0239     void loadSnapConfig(KisSnapConfig *config, bool defaultValue = false) const;
0240     void saveSnapConfig(const KisSnapConfig &config);
0241 
0242     qint32 checkSize(bool defaultValue = false) const;
0243     void setCheckSize(qint32 checkSize) const;
0244 
0245     bool scrollCheckers(bool defaultValue = false) const;
0246     void setScrollingCheckers(bool scollCheckers) const;
0247 
0248     QColor checkersColor1(bool defaultValue = false) const;
0249     void setCheckersColor1(const QColor & v) const;
0250 
0251     QColor checkersColor2(bool defaultValue = false) const;
0252     void setCheckersColor2(const QColor & v) const;
0253 
0254     QColor canvasBorderColor(bool defaultValue = false) const;
0255     void setCanvasBorderColor(const QColor &color) const;
0256 
0257     bool hideScrollbars(bool defaultValue = false) const;
0258     void setHideScrollbars(bool value) const;
0259 
0260     bool scrollbarZoomEnabled(bool defaultValue = false) const;
0261     void setScrollbarZoomEnabled(bool enabled) const;
0262 
0263     bool antialiasCurves(bool defaultValue = false) const;
0264     void setAntialiasCurves(bool v) const;
0265 
0266     bool antialiasSelectionOutline(bool defaultValue = false) const;
0267     void setAntialiasSelectionOutline(bool v) const;
0268 
0269     bool showRootLayer(bool defaultValue = false) const;
0270     void setShowRootLayer(bool showRootLayer) const;
0271 
0272     bool showGlobalSelection(bool defaultValue = false) const;
0273     void setShowGlobalSelection(bool showGlobalSelection) const;
0274 
0275     bool showOutlineWhilePainting(bool defaultValue = false) const;
0276     void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const;
0277 
0278     bool forceAlwaysFullSizedOutline(bool defaultValue = false) const;
0279     void setForceAlwaysFullSizedOutline(bool value) const;
0280 
0281     bool showEraserOutlineWhilePainting(bool defaultValue = false) const;
0282     void setShowEraserOutlineWhilePainting(bool showEraserOutlineWhilePainting) const;
0283 
0284     bool forceAlwaysFullSizedEraserOutline(bool defaultValue = false) const;
0285     void setForceAlwaysFullSizedEraserOutline(bool value) const;
0286 
0287     enum SessionOnStartup {
0288         SOS_BlankSession,
0289         SOS_PreviousSession,
0290         SOS_ShowSessionManager
0291     };
0292     SessionOnStartup sessionOnStartup(bool defaultValue = false) const;
0293     void setSessionOnStartup(SessionOnStartup value);
0294 
0295     bool saveSessionOnQuit(bool defaultValue) const;
0296     void setSaveSessionOnQuit(bool value);
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     QString getMDIBackgroundColor(bool defaultValue = false) const;
0534     void setMDIBackgroundColor(const QString & v) const;
0535 
0536     QString getMDIBackgroundImage(bool defaultValue = false) const;
0537     void setMDIBackgroundImage(const QString & fileName) const;
0538 
0539     int workaroundX11SmoothPressureSteps(bool defaultValue = false) const;
0540 
0541     bool showCanvasMessages(bool defaultValue = false) const;
0542     void setShowCanvasMessages(bool show);
0543 
0544     bool compressKra(bool defaultValue = false) const;
0545     void setCompressKra(bool compress);
0546 
0547     bool trimKra(bool defaultValue = false) const;
0548     void setTrimKra(bool trim);
0549 
0550     bool trimFramesImport(bool defaultValue = false) const;
0551     void setTrimFramesImport(bool trim);
0552 
0553     bool toolOptionsInDocker(bool defaultValue = false) const;
0554     void setToolOptionsInDocker(bool inDocker);
0555 
0556     bool kineticScrollingEnabled(bool defaultValue = false) const;
0557     void setKineticScrollingEnabled(bool enabled);
0558 
0559     int kineticScrollingGesture(bool defaultValue = false) const;
0560     void setKineticScrollingGesture(int kineticScroll);
0561 
0562     int kineticScrollingSensitivity(bool defaultValue = false) const;
0563     void setKineticScrollingSensitivity(int sensitivity);
0564 
0565     bool kineticScrollingHiddenScrollbars(bool defaultValue = false) const;
0566     void setKineticScrollingHideScrollbars(bool scrollbar);
0567 
0568     bool smoothZooming(bool defaultValue = false) const;
0569     void setSmoothZooming(bool scale);
0570 
0571     int zoomMarginSize(int defaultValue = 0) const;
0572     void setZoomMarginSize(int zoomMarginSize);
0573 
0574     void setEnableOpenGLFramerateLogging(bool value) const;
0575     bool enableOpenGLFramerateLogging(bool defaultValue = false) const;
0576 
0577     void setEnableBrushSpeedLogging(bool value) const;
0578     bool enableBrushSpeedLogging(bool defaultValue = false) const;
0579 
0580     void setDisableVectorOptimizations(bool value);
0581     bool disableVectorOptimizations(bool defaultValue = false) const;
0582 
0583     void setDisableAVXOptimizations(bool value);
0584     bool disableAVXOptimizations(bool defaultValue = false) const;
0585 
0586     bool animationDropFrames(bool defaultValue = false) const;
0587     void setAnimationDropFrames(bool value);
0588 
0589     bool autoPinLayersToTimeline(bool defaultValue = false) const;
0590     void setAutoPinLayersToTimeline(bool value);
0591 
0592     bool adaptivePlaybackRange(bool defaultValue = false) const;
0593     void setAdaptivePlaybackRange(bool value);
0594     
0595     QString ffmpegLocation(bool defaultValue = false) const;
0596     void setFFMpegLocation(const QString& value);
0597 
0598     qreal timelineZoom(bool defaultValue = false) const;
0599     void setTimelineZoom(qreal value);
0600 
0601     int scrubbingUpdatesDelay(bool defaultValue = false) const;
0602     void setScrubbingUpdatesDelay(int value);
0603 
0604     int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
0605     void setScrubbingAudioUpdatesDelay(int value);
0606 
0607     int audioOffsetTolerance(bool defaultValue = false) const;
0608     void setAudioOffsetTolerance(int value);
0609 
0610     bool switchSelectionCtrlAlt(bool defaultValue = false) const;
0611     void setSwitchSelectionCtrlAlt(bool value);
0612 
0613     bool convertToImageColorspaceOnImport(bool defaultValue = false) const;
0614     void setConvertToImageColorspaceOnImport(bool value);
0615 
0616     int stabilizerSampleSize(bool defaultValue = false) const;
0617     void setStabilizerSampleSize(int value);
0618 
0619     bool stabilizerDelayedPaint(bool defaultValue = false) const;
0620     void setStabilizerDelayedPaint(bool value);
0621 
0622     bool showBrushHud(bool defaultValue = false) const;
0623     void setShowBrushHud(bool value);
0624     
0625     bool showPaletteBottomBar(bool defaultValue = false) const;
0626     void setShowPaletteBottomBar(bool value);
0627 
0628     QString brushHudSetting(bool defaultValue = false) const;
0629     void setBrushHudSetting(const QString &value) const;
0630 
0631     bool calculateAnimationCacheInBackground(bool defaultValue = false) const;
0632     void setCalculateAnimationCacheInBackground(bool value);
0633 
0634     QColor defaultAssistantsColor(bool defaultValue = false) const;
0635     void setDefaultAssistantsColor(const QColor &color) const;
0636 
0637     bool autoSmoothBezierCurves(bool defaultValue = false) const;
0638     void setAutoSmoothBezierCurves(bool value);
0639     
0640     bool activateTransformToolAfterPaste(bool defaultValue = false) const;
0641     void setActivateTransformToolAfterPaste(bool value);
0642     
0643     enum RootSurfaceFormat {
0644         BT709_G22 = 0,
0645         BT709_G10,
0646         BT2020_PQ
0647     };
0648     RootSurfaceFormat rootSurfaceFormat(bool defaultValue = false) const;
0649     void setRootSurfaceFormat(RootSurfaceFormat value);
0650 
0651     static RootSurfaceFormat rootSurfaceFormat(QSettings *displayrc, bool defaultValue = false);
0652     static void setRootSurfaceFormat(QSettings *displayrc, RootSurfaceFormat value);
0653 
0654     bool useZip64(bool defaultValue = false) const;
0655     void setUseZip64(bool value);
0656 
0657     bool convertLayerColorSpaceInProperties(bool defaultValue = false) const;
0658     void setConvertLayerColorSpaceInProperties(bool value);
0659 
0660     template<class T>
0661     void writeEntry(const QString& name, const T& value) {
0662         m_cfg.writeEntry(name, value);
0663     }
0664 
0665     template<class T>
0666     void writeList(const QString& name, const QList<T>& value) {
0667         m_cfg.writeEntry(name, value);
0668     }
0669 
0670     template<class T>
0671     T readEntry(const QString& name, const T& defaultValue=T()) {
0672         return m_cfg.readEntry(name, defaultValue);
0673     }
0674 
0675     template<class T>
0676     QList<T> readList(const QString& name, const QList<T>& defaultValue=QList<T>()) {
0677         return m_cfg.readEntry(name, defaultValue);
0678     }
0679 
0680 
0681     /// get the profile the color management system has stored for the given screen
0682     static const KoColorProfile* getScreenProfile(int screen);
0683 
0684 private:
0685     KisConfig(const KisConfig&);
0686     KisConfig& operator=(const KisConfig&) const;
0687 
0688 
0689 private:
0690     mutable KConfigGroup m_cfg;
0691     bool m_readOnly;
0692 };
0693 
0694 #endif // KIS_CONFIG_H_