Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_config.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KIS_CONFIG_H_
7#define KIS_CONFIG_H_
8
9#include <QString>
10#include <QStringList>
11#include <QList>
12#include <QColor>
13#include <QObject>
14
15#include <ksharedconfig.h>
16#include <kconfiggroup.h>
17
18#include <kis_global.h>
20#include "kritaui_export.h"
21
22class KoColorProfile;
23class KoColorSpace;
24class KisSnapConfig;
25class QSettings;
28class QSurfaceFormat;
29
30class KRITAUI_EXPORT KisConfig
31{
32public:
38 KisConfig(bool readOnly);
39
40 ~KisConfig();
41
42public Q_SLOTS:
44 void logImportantSettings() const;
45public:
46
52
53 TouchPainting touchPainting(bool defaultValue = false) const;
54 void setTouchPainting(TouchPainting value) const;
55 bool disableTouchOnCanvas() const;
56
57 // XXX Unused?
58 bool useProjections(bool defaultValue = false) const;
59 void setUseProjections(bool useProj) const;
60
61 bool undoEnabled(bool defaultValue = false) const;
62 void setUndoEnabled(bool undo) const;
63
64 int undoStackLimit(bool defaultValue = false) const;
65 void setUndoStackLimit(int limit) const;
66
67 bool useCumulativeUndoRedo(bool defaultValue = false) const;
68 void setCumulativeUndoRedo(bool value);
69
70 KisCumulativeUndoData cumulativeUndoData(bool defaultValue = false) const;
71 void setCumulativeUndoData(KisCumulativeUndoData value);
72
73 qint32 defImageWidth(bool defaultValue = false) const;
74 void defImageWidth(qint32 width) const;
75
76 qint32 defImageHeight(bool defaultValue = false) const;
77 void defImageHeight(qint32 height) const;
78
79 qreal defImageResolution(bool defaultValue = false) const;
80 void defImageResolution(qreal res) const;
81
82 int preferredVectorImportResolutionPPI(bool defaultValue = false) const;
83 void setPreferredVectorImportResolutionPPI(int value) const;
84
85 bool useDefaultColorSpace(bool defaultvalue = false) const;
86 void setUseDefaultColorSpace(bool value) const;
90 QString defColorModel(bool defaultValue = false) const;
94 void defColorModel(const QString & model) const;
95
99 QString defaultColorDepth(bool defaultValue = false) const;
103 void setDefaultColorDepth(const QString & depth) const;
104
108 QString defColorProfile(bool defaultValue = false) const;
112 void defColorProfile(const QString & depth) const;
113
114 CursorStyle newCursorStyle(bool defaultValue = false) const;
115 void setNewCursorStyle(CursorStyle style);
116
117 QColor getCursorMainColor(bool defaultValue = false) const;
118 void setCursorMainColor(const QColor& v) const;
119
120 OutlineStyle newOutlineStyle(bool defaultValue = false) const;
121 void setNewOutlineStyle(OutlineStyle style);
122
123 OutlineStyle lastUsedOutlineStyle(bool defaultValue = false) const;
124 void setLastUsedOutlineStyle(OutlineStyle style);
125
126 bool separateEraserCursor(bool defaultValue = false) const;
127 void setSeparateEraserCursor(bool value) const;
128
129 CursorStyle eraserCursorStyle(bool defaultValue = false) const;
130 void setEraserCursorStyle(CursorStyle style);
131
132 QColor getEraserCursorMainColor(bool defaultValue = false) const;
133 void setEraserCursorMainColor(const QColor& v) const;
134
135 OutlineStyle eraserOutlineStyle(bool defaultValue = false) const;
136 void setEraserOutlineStyle(OutlineStyle style);
137
139 None,
140 Circle,
141 RectangleLeft,
142 RectangleRight,
143 RectangleAbove,
144 Count,
145 };
146
147 ColorSamplerPreviewStyle colorSamplerPreviewStyle(bool defaultValue = false) const;
148 void setColorSamplerPreviewStyle(ColorSamplerPreviewStyle style);
149
150 int colorSamplerPreviewCircleDiameter(bool defaultValue = false) const;
151 void setColorSamplerPreviewCircleDiameter(int style);
152
153 qreal colorSamplerPreviewCircleThickness(bool defaultValue = false) const;
154 void setColorSamplerPreviewCircleThickness(qreal thickness);
155
156 bool colorSamplerPreviewCircleOutlineEnabled(bool defaultValue = false) const;
157 void setColorSamplerPreviewCircleOutlineEnabled(bool enabled);
158
159 bool colorSamplerPreviewCircleExtraCirclesEnabled(bool defaultValue = false) const;
160 void setColorSamplerPreviewCircleExtraCirclesEnabled(bool enabled);
161
162 bool colorSamplerZoomPreviewEnabled(bool defaultValue = false) const;
163 void setColorSamplerZoomPreviewEnabled(bool enabled);
164
165 qreal colorSamplerZoomPreviewScale(bool defaultValue = false) const;
166 void setColorSamplerZoomPreviewScale(qreal scale);
167
169 Center,
170 Top,
171 TopLeft,
172 TopRight,
173 Count,
174 };
175
176 ColorSamplerPreviewCirclePosition colorSamplerPreviewCirclePosition(bool defaultValue = false) const;
177 void setColorSamplerPreviewCirclePosition(ColorSamplerPreviewCirclePosition position);
178
187 bool enableCanvasSurfaceColorSpaceManagement(bool defaultValue = false) const;
188 void setEnableCanvasSurfaceColorSpaceManagement(bool value);
189
196 bool effectiveShouldUseNativeSurfaceForCanvas(bool osManagedSurfacePresent) const;
197
198 enum class CanvasSurfaceMode {
199 Preferred = 0,
200 Rec709g22,
201 Rec709g10,
202 Rec2020pq,
203 Unmanaged
204 };
205
211 CanvasSurfaceMode canvasSurfaceColorSpaceManagementMode(bool defaultValue = false) const;
212 void setCanvasSurfaceColorSpaceManagementMode(CanvasSurfaceMode value);
213
215 DepthAuto = 0,
216 Depth8Bit,
217 Depth10Bit
218 };
219
220 static CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(QSettings *settings, bool defaultValue = false);
221 static void setCanvasSurfaceBitDepthMode(QSettings *settings, CanvasSurfaceBitDepthMode value);
222
223 CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(bool defaultValue = false) const;
224 void setCanvasSurfaceBitDepthMode(CanvasSurfaceBitDepthMode value);
225
226 CanvasSurfaceBitDepthMode effectiveCanvasSurfaceBitDepthMode(const QSurfaceFormat &format) const;
227
229 QString monitorProfile(int screen) const;
230 void setMonitorProfile(int screen, const QString & monitorProfile) const;
231
235 const KoColorProfile *displayProfile(int screen) const;
236
237 const QString getScreenStringIdentfier(int screenNo) const;
238
239 QString workingColorSpace(bool defaultValue = false) const;
240 void setWorkingColorSpace(const QString & workingColorSpace) const;
241
242 QString importProfile(bool defaultValue = false) const;
243 void setImportProfile(const QString & importProfile) const;
244
245 QString printerColorSpace(bool defaultValue = false) const;
246 void setPrinterColorSpace(const QString & printerColorSpace) const;
247
248 QString printerProfile(bool defaultValue = false) const;
249 void setPrinterProfile(const QString & printerProfile) const;
250
251 bool useBlackPointCompensation(bool defaultValue = false) const;
252 void setUseBlackPointCompensation(bool useBlackPointCompensation) const;
253
254 bool allowLCMSOptimization(bool defaultValue = false) const;
255 void setAllowLCMSOptimization(bool allowLCMSOptimization);
256
257 bool forcePaletteColors(bool defaultValue = false) const;
258 void setForcePaletteColors(bool forcePaletteColors);
259
260 bool colorHistoryPerDocument(bool defaultValue = false) const;
261
262 void writeKoColor(const QString& name, const KoColor& color) const;
263 KoColor readKoColor(const QString& name, const KoColor& color = KoColor()) const;
264
265 QList<KoColor> readKoColors(const QString &name) const;
266 void writeKoColors(const QString &name, const QList<KoColor> &colors) const;
267
268 bool showRulers(bool defaultValue = false) const;
269 void setShowRulers(bool rulers) const;
270
271 bool forceShowSaveMessages(bool defaultValue = true) const;
272 void setForceShowSaveMessages(bool value) const;
273
274 bool forceShowAutosaveMessages(bool defaultValue = true) const;
275 void setForceShowAutosaveMessages(bool ShowAutosaveMessages) const;
276
277 bool rulersTrackMouse(bool defaultValue = false) const;
278 void setRulersTrackMouse(bool value) const;
279
280 qint32 pasteBehaviour(bool defaultValue = false) const;
281 void setPasteBehaviour(qint32 behaviour) const;
282
283 qint32 pasteFormat(bool defaultValue) const;
284 void setPasteFormat(qint32 format);
285
286 qint32 monitorRenderIntent(bool defaultValue = false) const;
287 void setRenderIntent(qint32 monitorRenderIntent) const;
288
289 bool useOpenGL(bool defaultValue = false) const;
290 void disableOpenGL() const;
291
292 int openGLFilteringMode(bool defaultValue = false) const;
293 void setOpenGLFilteringMode(int filteringMode);
294
295 void setWidgetStyle(QString name);
296 QString widgetStyle(bool defaultValue = false);
297
298 bool useOpenGLTextureBuffer(bool defaultValue = false) const;
299 void setUseOpenGLTextureBuffer(bool useBuffer);
300
301 static bool preferXcbEglProvider(const QSettings *settings, bool defaultValue = false);
302 bool preferXcbEglProvider(bool defaultValue = false) const;
303 void setPreferXcbEglProvider(bool value);
304
305 bool forceOpenGLFenceWorkaround(bool defaultValue = false) const;
306
307 int numMipmapLevels(bool defaultValue = false) const;
308 int openGLTextureSize(bool defaultValue = false) const;
309 int textureOverlapBorder() const;
310
311 quint32 getGridMainStyle(bool defaultValue = false) const;
312 void setGridMainStyle(quint32 v) const;
313
314 quint32 getGridSubdivisionStyle(bool defaultValue = false) const;
315 void setGridSubdivisionStyle(quint32 v) const;
316
317 quint32 getGridIsoVerticalStyle(bool defaultValue = false) const;
318 void setGridIsoVerticalStyle(quint32 v) const;
319
320 QColor getGridMainColor(bool defaultValue = false) const;
321 void setGridMainColor(const QColor & v) const;
322
323 QColor getGridSubdivisionColor(bool defaultValue = false) const;
324 void setGridSubdivisionColor(const QColor & v) const;
325
326 QColor getGridIsoVerticalColor(bool defaultValue = false) const;
327 void setGridIsoVerticalColor(const QColor & v) const;
328
329 QColor getPixelGridColor(bool defaultValue = false) const;
330 void setPixelGridColor(const QColor & v) const;
331
332 qreal getPixelGridDrawingThreshold(bool defaultValue = false) const;
333 void setPixelGridDrawingThreshold(qreal v) const;
334
335 bool pixelGridEnabled(bool defaultValue = false) const;
336 void enablePixelGrid(bool v) const;
337
338 quint32 guidesLineStyle(bool defaultValue = false) const;
339 void setGuidesLineStyle(quint32 v) const;
340 QColor guidesColor(bool defaultValue = false) const;
341 void setGuidesColor(const QColor & v) const;
342
343 void loadSnapConfig(KisSnapConfig *config, bool defaultValue = false) const;
344 void saveSnapConfig(const KisSnapConfig &config);
345
346 qint32 checkSize(bool defaultValue = false) const;
347 void setCheckSize(qint32 checkSize) const;
348
349 bool scrollCheckers(bool defaultValue = false) const;
350 void setScrollingCheckers(bool scrollCheckers) const;
351
352 QColor checkersColor1(bool defaultValue = false) const;
353 void setCheckersColor1(const QColor & v) const;
354
355 QColor checkersColor2(bool defaultValue = false) const;
356 void setCheckersColor2(const QColor & v) const;
357
358 QColor canvasBorderColor(bool defaultValue = false) const;
359 void setCanvasBorderColor(const QColor &color) const;
360
361 bool hideScrollbars(bool defaultValue = false) const;
362 void setHideScrollbars(bool value) const;
363
364 bool scrollbarZoomEnabled(bool defaultValue = false) const;
365 void setScrollbarZoomEnabled(bool enabled) const;
366
367 bool antialiasCurves(bool defaultValue = false) const;
368 void setAntialiasCurves(bool v) const;
369
370 bool antialiasSelectionOutline(bool defaultValue = false) const;
371 void setAntialiasSelectionOutline(bool v) const;
372
373 bool showRootLayer(bool defaultValue = false) const;
374 void setShowRootLayer(bool showRootLayer) const;
375
376 bool showGlobalSelection(bool defaultValue = false) const;
377 void setShowGlobalSelection(bool showGlobalSelection) const;
378
379 bool showOutlineWhilePainting(bool defaultValue = false) const;
380 void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const;
381
382 bool forceAlwaysFullSizedOutline(bool defaultValue = false) const;
383 void setForceAlwaysFullSizedOutline(bool value) const;
384
385 bool showEraserOutlineWhilePainting(bool defaultValue = false) const;
386 void setShowEraserOutlineWhilePainting(bool showEraserOutlineWhilePainting) const;
387
388 bool forceAlwaysFullSizedEraserOutline(bool defaultValue = false) const;
389 void setForceAlwaysFullSizedEraserOutline(bool value) const;
390
396 SessionOnStartup sessionOnStartup(bool defaultValue = false) const;
397 void setSessionOnStartup(SessionOnStartup value);
398
404 IconsInMenu iconsInMenu(bool defaultValue = false) const;
405 void setIconsInMenu(IconsInMenu value);
406
407 bool saveSessionOnQuit(bool defaultValue) const;
408 void setSaveSessionOnQuit(bool value);
409
410 bool hideDevFundBanner(bool defaultValue = false) const;
411 void setHideDevFundBanner(bool value = true);
412
413 qreal outlineSizeMinimum(bool defaultValue = false) const;
414 void setOutlineSizeMinimum(qreal outlineSizeMinimum) const;
415
416 qreal selectionViewSizeMinimum(bool defaultValue = false) const;
417 void setSelectionViewSizeMinimum(qreal outlineSizeMinimum) const;
418
419 int autoSaveInterval(bool defaultValue = false) const;
420 void setAutoSaveInterval(int seconds) const;
421
422 bool backupFile(bool defaultValue = false) const;
423 void setBackupFile(bool backupFile) const;
424
425 bool showFilterGallery(bool defaultValue = false) const;
426 void setShowFilterGallery(bool showFilterGallery) const;
427
428 bool showFilterGalleryLayerMaskDialog(bool defaultValue = false) const;
429 void setShowFilterGalleryLayerMaskDialog(bool showFilterGallery) const;
430
431 // OPENGL_SUCCESS, TRY_OPENGL, OPENGL_NOT_TRIED, OPENGL_FAILED
432 QString canvasState(bool defaultValue = false) const;
433 void setCanvasState(const QString& state) const;
434
435 bool toolOptionsPopupDetached(bool defaultValue = false) const;
436 void setToolOptionsPopupDetached(bool detached) const;
437
438 bool paintopPopupDetached(bool defaultValue = false) const;
439 void setPaintopPopupDetached(bool detached) const;
440
441 QString pressureTabletCurve(bool defaultValue = false) const;
442 void setPressureTabletCurve(const QString& curveString) const;
443
444 bool useWin8PointerInput(bool defaultValue = false) const;
445 void setUseWin8PointerInput(bool value);
446
447 static bool useWin8PointerInputNoApp(QSettings *settings, bool defaultValue = false);
448 static void setUseWin8PointerInputNoApp(QSettings *settings, bool value);
449
450 bool useRightMiddleTabletButtonWorkaround(bool defaultValue = false) const;
451 void setUseRightMiddleTabletButtonWorkaround(bool value);
452
453#ifdef Q_OS_ANDROID
454 bool usePageUpDownMouseButtonEmulationWorkaround(bool defaultValue = false) const;
455 void setUsePageUpDownMouseButtonEmulationWorkaround(bool value);
456
457 bool useHighFunctionKeyMouseButtonEmulationWorkaround(bool defaultValue = false) const;
458 void setUseHighFunctionKeyMouseButtonEmulationWorkaround(bool value);
459
460 bool useIgnoreHistoricTabletEventsWorkaround(bool defaultValue = false) const;
461 void setUseIgnoreHistoricTabletEventsWorkaround(bool value);
462
463 bool hideTouchAndStylusCursorsWorkaround(bool defaultValue = false) const;
464 void setHideTouchAndStylusCursorsWorkaround(bool value);
465
466 qreal androidScalingLastInitialScale(bool defaultValue = false) const;
467 void setAndroidScalingLastInitialScale(qreal value);
468
469 qreal androidScalingTargetScale(bool defaultValue = false) const;
470 void setAndroidScalingTargetScale(qreal value);
471
472 bool androidScalingAskOnStartup(bool defaultValue = false) const;
473 void setAndroidScalingAskOnStartup(bool value);
474#endif
475
476 qreal vastScrolling(bool defaultValue = false) const;
477 void setVastScrolling(const qreal factor) const;
478
479 int presetChooserViewMode(bool defaultValue = false) const;
480 void setPresetChooserViewMode(const int mode) const;
481
482 int presetIconSize(bool defaultValue = false) const;
483 void setPresetIconSize(const int value) const;
484
485
486 bool firstRun(bool defaultValue = false) const;
487 void setFirstRun(const bool firstRun) const;
488
489 QString splashScreenImage(bool defaultValue = false) const;
490 void setSplashScreenImage(const QString &value);
491
492 bool clicklessSpacePan(bool defaultValue = false) const;
493 void setClicklessSpacePan(const bool toggle) const;
494
495 int horizontalSplitLines(bool defaultValue = false) const;
496 void setHorizontalSplitLines(const int numberLines) const;
497
498 int verticalSplitLines(bool defaultValue = false) const;
499 void setVerticalSplitLines(const int numberLines) const;
500
501 bool hideDockersFullscreen(bool defaultValue = false) const;
502 void setHideDockersFullscreen(const bool value) const;
503
504 bool showDockerTitleBars(bool defaultValue = false) const;
505 void setShowDockerTitleBars(const bool value) const;
506
507 bool showDockers(bool defaultValue = false) const;
508 void setShowDockers(const bool value) const;
509
510 bool showStatusBar(bool defaultValue = false) const;
511 void setShowStatusBar(const bool value) const;
512
513 bool hideMenuFullscreen(bool defaultValue = false) const;
514 void setHideMenuFullscreen(const bool value) const;
515
516 bool hideScrollbarsFullscreen(bool defaultValue = false) const;
517 void setHideScrollbarsFullscreen(const bool value) const;
518
519 bool hideStatusbarFullscreen(bool defaultValue = false) const;
520 void setHideStatusbarFullscreen(const bool value) const;
521
522 bool hideTitlebarFullscreen(bool defaultValue = false) const;
523 void setHideTitlebarFullscreen(const bool value) const;
524
525 bool hideToolbarFullscreen(bool defaultValue = false) const;
526 void setHideToolbarFullscreen(const bool value) const;
527
528 bool fullscreenMode(bool defaultValue = false) const;
529 void setFullscreenMode(const bool value) const;
530
531 QStringList favoriteCompositeOps(bool defaultValue = false) const;
532 void setFavoriteCompositeOps(const QStringList& compositeOps) const;
533
534 QString exportConfigurationXML(const QString &filterId, bool defaultValue = false) const;
535 KisPropertiesConfigurationSP exportConfiguration(const QString &filterId, bool defaultValue = false) const;
536 void setExportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
537
538 QString importConfiguration(const QString &filterId, bool defaultValue = false) const;
539 void setImportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
540
541 bool useOcio(bool defaultValue = false) const;
542 void setUseOcio(bool useOCIO) const;
543
544 int favoritePresets(bool defaultValue = false) const;
545 void setFavoritePresets(const int value);
546
547 bool levelOfDetailEnabled(bool defaultValue = false) const;
548 void setLevelOfDetailEnabled(bool value);
549
550 KisOcioConfiguration ocioConfiguration(bool defaultValue = false) const;
551 void setOcioConfiguration(const KisOcioConfiguration &cfg);
552
554 INTERNAL = 0,
556 OCIO_ENVIRONMENT
557 };
558
559 OcioColorManagementMode ocioColorManagementMode(bool defaultValue = false) const;
560 void setOcioColorManagementMode(OcioColorManagementMode mode) const;
561
562 int ocioLutEdgeSize(bool defaultValue = false) const;
563 void setOcioLutEdgeSize(int value);
564
565 bool ocioLockColorVisualRepresentation(bool defaultValue = false) const;
566 void setOcioLockColorVisualRepresentation(bool value);
567
568 QString defaultPalette(bool defaultValue = false) const;
569 void setDefaultPalette(const QString& name) const;
570
571 QString toolbarSlider(int sliderNumber, bool defaultValue = false) const;
572 void setToolbarSlider(int sliderNumber, const QString &slider);
573
574
575 int layerThumbnailSize(bool defaultValue = false) const;
576 void setLayerThumbnailSize(int size);
577
578 int layerTreeIndentation(bool defaultValue = false) const;
579 void setLayerTreeIndentation(int percentage);
580
581
582 bool sliderLabels(bool defaultValue = false) const;
583 void setSliderLabels(bool enabled);
584
585 QString currentInputProfile(bool defaultValue = false) const;
586 void setCurrentInputProfile(const QString& name);
587
588 bool presetStripVisible(bool defaultValue = false) const;
589 void setPresetStripVisible(bool visible);
590
591 bool scratchpadVisible(bool defaultValue = false) const;
592 void setScratchpadVisible(bool visible);
593
594 bool showSingleChannelAsColor(bool defaultValue = false) const;
595 void setShowSingleChannelAsColor(bool asColor);
596
597 bool hidePopups(bool defaultValue = false) const;
598 void setHidePopups(bool hidePopups);
599
600 int numDefaultLayers(const QLatin1String &dialogType, bool defaultValue = false) const;
601 void setNumDefaultLayers(const QLatin1String &dialogType, int num);
602
603 quint8 defaultBackgroundOpacity(const QLatin1String &dialogType, bool defaultValue = false) const;
604 void setDefaultBackgroundOpacity(const QLatin1String &dialogType, quint8 value);
605
606 QColor defaultBackgroundColor(const QLatin1String &dialogType, bool defaultValue = false) const;
607 void setDefaultBackgroundColor(const QLatin1String &dialogType, const QColor &value);
608
610 RASTER_LAYER = 0,
611 CANVAS_COLOR = 1,
612 FILL_LAYER = 2
613 };
614
615 BackgroundStyle defaultBackgroundStyle(const QLatin1String &dialogType, bool defaultValue = false) const;
616 void setDefaultBackgroundStyle(const QLatin1String &dialogType, BackgroundStyle value);
617
618 int lineSmoothingType(bool defaultValue = false) const;
619 void setLineSmoothingType(int value);
620
621 qreal lineSmoothingDistanceMin(bool defaultValue = false) const;
622 void setLineSmoothingDistanceMin(qreal value);
623
624 qreal lineSmoothingDistanceMax(bool defaultValue = false) const;
625 void setLineSmoothingDistanceMax(qreal value);
626
627 bool lineSmoothingDistanceKeepAspectRatio(bool defaultValue = false) const;
628 void setLineSmoothingDistanceKeepAspectRatio(bool value);
629
630 qreal lineSmoothingTailAggressiveness(bool defaultValue = false) const;
631 void setLineSmoothingTailAggressiveness(qreal value);
632
633 bool lineSmoothingSmoothPressure(bool defaultValue = false) const;
634 void setLineSmoothingSmoothPressure(bool value);
635
636 bool lineSmoothingScalableDistance(bool defaultValue = false) const;
637 void setLineSmoothingScalableDistance(bool value);
638
639 qreal lineSmoothingDelayDistance(bool defaultValue = false) const;
640 void setLineSmoothingDelayDistance(qreal value);
641
642 bool lineSmoothingUseDelayDistance(bool defaultValue = false) const;
643 void setLineSmoothingUseDelayDistance(bool value);
644
645 bool lineSmoothingFinishStabilizedCurve(bool defaultValue = false) const;
646 void setLineSmoothingFinishStabilizedCurve(bool value);
647
648 bool lineSmoothingStabilizeSensors(bool defaultValue = false) const;
649 void setLineSmoothingStabilizeSensors(bool value);
650
651 int tabletEventsDelay(bool defaultValue = false) const;
652 void setTabletEventsDelay(int value);
653
654 bool trackTabletEventLatency(bool defaultValue = false) const;
655 void setTrackTabletEventLatency(bool value);
656
657 bool ignoreHighFunctionKeys(bool defaultValue = false) const;
658 void setIgnoreHighFunctionKeys(bool value);
659
660 bool testingAcceptCompressedTabletEvents(bool defaultValue = false) const;
661 void setTestingAcceptCompressedTabletEvents(bool value);
662
663 bool shouldEatDriverShortcuts(bool defaultValue = false) const;
664
665 bool testingCompressBrushEvents(bool defaultValue = false) const;
666 void setTestingCompressBrushEvents(bool value);
667
668 const KoColorSpace* customColorSelectorColorSpace(bool defaultValue = false) const;
669 void setCustomColorSelectorColorSpace(const KoColorSpace *cs);
670
671 bool useDirtyPresets(bool defaultValue = false) const;
672 void setUseDirtyPresets(bool value);
673
674 bool useEraserBrushSize(bool defaultValue = false) const;
675 void setUseEraserBrushSize(bool value);
676
677 bool useEraserBrushOpacity(bool defaultValue = false) const;
678 void setUseEraserBrushOpacity(bool value);
679
680 QPoint getDefaultGridSpacing(bool defaultValue = false) const;
681 void setDefaultGridSpacing(QPoint gridSpacing);
682
683 QString getMDIBackgroundColor(bool defaultValue = false) const;
684 void setMDIBackgroundColor(const QString & v) const;
685
686 QString getMDIBackgroundImage(bool defaultValue = false) const;
687 void setMDIBackgroundImage(const QString & fileName) const;
688
689 int workaroundX11SmoothPressureSteps(bool defaultValue = false) const;
690
691 bool showCanvasMessages(bool defaultValue = false) const;
692 void setShowCanvasMessages(bool show);
693
694 bool compressKra(bool defaultValue = false) const;
695 void setCompressKra(bool compress);
696
697 bool trimKra(bool defaultValue = false) const;
698 void setTrimKra(bool trim);
699
700 bool trimFramesImport(bool defaultValue = false) const;
701 void setTrimFramesImport(bool trim);
702
703 QString exportMimeType(bool defaultValue) const;
704 void setExportMimeType(const QString &defaultExportMimeType);
705
706 bool toolOptionsInDocker(bool defaultValue = false) const;
707 void setToolOptionsInDocker(bool inDocker);
708
709 bool kineticScrollingEnabled(bool defaultValue = false) const;
710 void setKineticScrollingEnabled(bool enabled);
711
712 int kineticScrollingGesture(bool defaultValue = false) const;
713 void setKineticScrollingGesture(int kineticScroll);
714
715 int kineticScrollingSensitivity(bool defaultValue = false) const;
716 void setKineticScrollingSensitivity(int sensitivity);
717
718 bool kineticScrollingHiddenScrollbars(bool defaultValue = false) const;
719 void setKineticScrollingHideScrollbars(bool scrollbar);
720
721 int zoomSteps(bool defaultValue = false) const;
722 void setZoomSteps(int steps);
723
724 int zoomMarginSize(bool defaultValue = false) const;
725 void setZoomMarginSize(int zoomMarginSize);
726
727 void setEnableOpenGLFramerateLogging(bool value) const;
728 bool enableOpenGLFramerateLogging(bool defaultValue = false) const;
729
730 void setEnableBrushSpeedLogging(bool value) const;
731 bool enableBrushSpeedLogging(bool defaultValue = false) const;
732
733 void setDisableVectorOptimizations(bool value);
734 bool disableVectorOptimizations(bool defaultValue = false) const;
735
736 void setDisableAVXOptimizations(bool value);
737 bool disableAVXOptimizations(bool defaultValue = false) const;
738
739 void setAnimationPlaybackBackend(int value);
740 int animationPlaybackBackend(bool defaultValue = false) const;
741
742 bool animationDropFrames(bool defaultValue = false) const;
743 void setAnimationDropFrames(bool value);
744
745 bool autoPinLayersToTimeline(bool defaultValue = false) const;
746 void setAutoPinLayersToTimeline(bool value);
747
748 bool adaptivePlaybackRange(bool defaultValue = false) const;
749 void setAdaptivePlaybackRange(bool value);
750
751 bool autoZoomTimelineToPlaybackRange(bool defaultValue = false) const;
752 void setAutoZoomTimelineToPlaybackRange(bool value);
753
754 QString ffmpegLocation(bool defaultValue = false) const;
755 void setFFMpegLocation(const QString& value);
756
757 qreal timelineZoom(bool defaultValue = false) const;
758 void setTimelineZoom(qreal value);
759
760 int scrubbingUpdatesDelay(bool defaultValue = false) const;
761 void setScrubbingUpdatesDelay(int value);
762
763 int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
764 void setScrubbingAudioUpdatesDelay(int value);
765
766 int audioOffsetTolerance(bool defaultValue = false) const;
767 void setAudioOffsetTolerance(int value);
768
769 bool switchSelectionCtrlAlt(bool defaultValue = false) const;
770 void setSwitchSelectionCtrlAlt(bool value);
771
772 bool convertToImageColorspaceOnImport(bool defaultValue = false) const;
773 void setConvertToImageColorspaceOnImport(bool value);
774
775 int stabilizerSampleSize(bool defaultValue = false) const;
776 void setStabilizerSampleSize(int value);
777
778 bool stabilizerDelayedPaint(bool defaultValue = false) const;
779 void setStabilizerDelayedPaint(bool value);
780
781 bool showBrushHud(bool defaultValue = false) const;
782 void setShowBrushHud(bool value);
783
784 bool showPaletteBottomBar(bool defaultValue = false) const;
785 void setShowPaletteBottomBar(bool value);
786
787 QString brushHudSetting(bool defaultValue = false) const;
788 void setBrushHudSetting(const QString &value) const;
789
790 bool calculateAnimationCacheInBackground(bool defaultValue = false) const;
791 void setCalculateAnimationCacheInBackground(bool value);
792
793 QColor defaultAssistantsColor(bool defaultValue = false) const;
794 void setDefaultAssistantsColor(const QColor &color) const;
795
796 bool autoSmoothBezierCurves(bool defaultValue = false) const;
797 void setAutoSmoothBezierCurves(bool value);
798
799 bool activateTransformToolAfterPaste(bool defaultValue = false) const;
800 void setActivateTransformToolAfterPaste(bool value);
801
802 bool zoomHorizontal(bool defaultValue = false) const;
803 void setZoomHorizontal(bool value);
804
805 bool selectionActionBar(bool defaultValue = false) const;
806 void setSelectionActionBar(bool value);
807
809 FreeFloating = 0,
810 Fixed
811 };
812
823
825 Horizontal = 0,
826 Vertical
827 };
828
829 SelectionActionsBarBehavior
830 selectionActionBarBehavior(bool defaultValue = false) const;
831 void setSelectionActionBarBehavior(SelectionActionsBarBehavior value);
832
833 SelectionActionsBarPosition selectionActionBarPosition(bool defaultValue = false) const;
834 void setSelectionActionBarPosition(SelectionActionsBarPosition value);
835
836 SelectionActionsBarOrientation selectionActionBarOrientation(bool defaultValue = false) const;
837 void setSelectionActionBarOrientation(SelectionActionsBarOrientation value);
838
840 BT709_G22 = 0,
842 BT2020_PQ
843 };
844 RootSurfaceFormat rootSurfaceFormat(bool defaultValue = false) const;
845 void setRootSurfaceFormat(RootSurfaceFormat value);
846
847 static RootSurfaceFormat rootSurfaceFormat(QSettings *displayrc, bool defaultValue = false);
848 static void setRootSurfaceFormat(QSettings *displayrc, RootSurfaceFormat value);
849
850 bool useZip64(bool defaultValue = false) const;
851 void setUseZip64(bool value);
852
853 bool convertLayerColorSpaceInProperties(bool defaultValue = false) const;
854 void setConvertLayerColorSpaceInProperties(bool value);
855
856 bool renamePastedLayers(bool defaultValue = false) const;
857 void setRenamePastedLayers(bool value);
858
860 INFOTEXT_NONE = 0,
863 INFOTEXT_DETAILED
864 };
865 LayerInfoTextStyle layerInfoTextStyle(bool defaultValue = false) const;
866 void setLayerInfoTextStyle(LayerInfoTextStyle value);
867
868 int layerInfoTextOpacity(bool defaultValue = false) const;
869 void setLayerInfoTextOpacity(int value);
870
871 bool useInlineLayerInfoText(bool defaultValue = false) const;
872 void setUseInlineLayerInfoText(bool value);
873
874 bool useLayerSelectionCheckbox(bool defaultValue = false) const;
875 void setUseLayerSelectionCheckbox(bool value);
876
878 ASSISTANTS_DRAW_MODE_DIRECT = 0, // no caching, draw directly on canvas
879 ASSISTANTS_DRAW_MODE_PIXMAP_CACHE = 1,
880 ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE = 2,
881 };
882 AssistantsDrawMode assistantsDrawMode(bool defaultValue = false) const;
883 void setAssistantsDrawMode(AssistantsDrawMode value);
884
885 bool longPressEnabled(bool defaultValue = false) const;
886 void setLongPressEnabled(bool value);
887
894 int layerThumbnailGenerationTimeout(bool defaultValue = false) const;
895 void setLayerThumbnailGenerationTimeout(int value);
896
897 bool newsCheckEnabled() const;
898 void setNewsCheckEnabled(bool value);
899
900 bool newsFirstStartup() const;
901 void setNewsFirstStartup(bool value);
902
903 template<class T>
904 void writeEntry(const QString& name, const T& value) {
905 m_cfg.writeEntry(name, value);
906 }
907
908 template<class T>
909 void writeList(const QString& name, const QList<T>& value) {
910 m_cfg.writeEntry(name, value);
911 }
912
913 template<class T>
914 T readEntry(const QString& name, const T& defaultValue=T()) {
915 return m_cfg.readEntry(name, defaultValue);
916 }
917
918 template<class T>
919 QList<T> readList(const QString& name, const QList<T>& defaultValue=QList<T>()) {
920 return m_cfg.readEntry(name, defaultValue);
921 }
922
923private:
926
927private:
928 mutable KConfigGroup m_cfg;
930};
931
934
935#endif // KIS_CONFIG_H_
936
937KRITAUI_EXPORT
938QDebug operator<<(QDebug debug, const KisConfig::CanvasSurfaceMode &mode);
939
940KRITAUI_EXPORT
941QDebug operator<<(QDebug debug, const KisConfig::CanvasSurfaceBitDepthMode &mode);
float value(const T *src, size_t ch)
qreal v
void writeList(const QString &name, const QList< T > &value)
Definition kis_config.h:909
KConfigGroup m_cfg
Definition kis_config.h:928
QList< T > readList(const QString &name, const QList< T > &defaultValue=QList< T >())
Definition kis_config.h:919
KisConfig(const KisConfig &)
void writeEntry(const QString &name, const T &value)
Definition kis_config.h:904
bool m_readOnly
Definition kis_config.h:929
SelectionActionsBarPosition
Definition kis_config.h:813
SelectionActionsBarBehavior
Definition kis_config.h:808
QString importProfile(bool defaultValue=false) const
@ INFOTEXT_SIMPLE
Definition kis_config.h:861
@ INFOTEXT_BALANCED
Definition kis_config.h:862
@ TOUCH_PAINTING_DISABLED
Definition kis_config.h:50
@ TOUCH_PAINTING_ENABLED
Definition kis_config.h:49
@ TOUCH_PAINTING_AUTO
Definition kis_config.h:48
void setImportProfile(const QString &importProfile) const
ColorSamplerPreviewStyle
Definition kis_config.h:138
SelectionActionsBarOrientation
Definition kis_config.h:824
ColorSamplerPreviewCirclePosition
Definition kis_config.h:168
OcioColorManagementMode
Definition kis_config.h:553
KisConfig & operator=(const KisConfig &) const
T readEntry(const QString &name, const T &defaultValue=T())
Definition kis_config.h:914
CanvasSurfaceBitDepthMode
Definition kis_config.h:214
@ SOS_PreviousSession
Definition kis_config.h:393
@ SOS_BlankSession
Definition kis_config.h:392
KRITAUI_EXPORT QDebug operator<<(QDebug debug, const KisConfig::CanvasSurfaceMode &mode)
OutlineStyle
Definition kis_global.h:53
CursorStyle
Definition kis_global.h:62
Q_DECLARE_METATYPE(KisPaintopLodLimitations)
qint32 Fixed
Definition psd.h:31