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 qreal androidScalingLastInitialScale(bool defaultValue = false) const;
464 void setAndroidScalingLastInitialScale(qreal value);
465
466 qreal androidScalingTargetScale(bool defaultValue = false) const;
467 void setAndroidScalingTargetScale(qreal value);
468
469 bool androidScalingAskOnStartup(bool defaultValue = false) const;
470 void setAndroidScalingAskOnStartup(bool value);
471#endif
472
473 qreal vastScrolling(bool defaultValue = false) const;
474 void setVastScrolling(const qreal factor) const;
475
476 int presetChooserViewMode(bool defaultValue = false) const;
477 void setPresetChooserViewMode(const int mode) const;
478
479 int presetIconSize(bool defaultValue = false) const;
480 void setPresetIconSize(const int value) const;
481
482
483 bool firstRun(bool defaultValue = false) const;
484 void setFirstRun(const bool firstRun) const;
485
486 bool clicklessSpacePan(bool defaultValue = false) const;
487 void setClicklessSpacePan(const bool toggle) const;
488
489 int horizontalSplitLines(bool defaultValue = false) const;
490 void setHorizontalSplitLines(const int numberLines) const;
491
492 int verticalSplitLines(bool defaultValue = false) const;
493 void setVerticalSplitLines(const int numberLines) const;
494
495 bool hideDockersFullscreen(bool defaultValue = false) const;
496 void setHideDockersFullscreen(const bool value) const;
497
498 bool showDockerTitleBars(bool defaultValue = false) const;
499 void setShowDockerTitleBars(const bool value) const;
500
501 bool showDockers(bool defaultValue = false) const;
502 void setShowDockers(const bool value) const;
503
504 bool showStatusBar(bool defaultValue = false) const;
505 void setShowStatusBar(const bool value) const;
506
507 bool hideMenuFullscreen(bool defaultValue = false) const;
508 void setHideMenuFullscreen(const bool value) const;
509
510 bool hideScrollbarsFullscreen(bool defaultValue = false) const;
511 void setHideScrollbarsFullscreen(const bool value) const;
512
513 bool hideStatusbarFullscreen(bool defaultValue = false) const;
514 void setHideStatusbarFullscreen(const bool value) const;
515
516 bool hideTitlebarFullscreen(bool defaultValue = false) const;
517 void setHideTitlebarFullscreen(const bool value) const;
518
519 bool hideToolbarFullscreen(bool defaultValue = false) const;
520 void setHideToolbarFullscreen(const bool value) const;
521
522 bool fullscreenMode(bool defaultValue = false) const;
523 void setFullscreenMode(const bool value) const;
524
525 QStringList favoriteCompositeOps(bool defaultValue = false) const;
526 void setFavoriteCompositeOps(const QStringList& compositeOps) const;
527
528 QString exportConfigurationXML(const QString &filterId, bool defaultValue = false) const;
529 KisPropertiesConfigurationSP exportConfiguration(const QString &filterId, bool defaultValue = false) const;
530 void setExportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
531
532 QString importConfiguration(const QString &filterId, bool defaultValue = false) const;
533 void setImportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
534
535 bool useOcio(bool defaultValue = false) const;
536 void setUseOcio(bool useOCIO) const;
537
538 int favoritePresets(bool defaultValue = false) const;
539 void setFavoritePresets(const int value);
540
541 bool levelOfDetailEnabled(bool defaultValue = false) const;
542 void setLevelOfDetailEnabled(bool value);
543
544 KisOcioConfiguration ocioConfiguration(bool defaultValue = false) const;
545 void setOcioConfiguration(const KisOcioConfiguration &cfg);
546
548 INTERNAL = 0,
550 OCIO_ENVIRONMENT
551 };
552
553 OcioColorManagementMode ocioColorManagementMode(bool defaultValue = false) const;
554 void setOcioColorManagementMode(OcioColorManagementMode mode) const;
555
556 int ocioLutEdgeSize(bool defaultValue = false) const;
557 void setOcioLutEdgeSize(int value);
558
559 bool ocioLockColorVisualRepresentation(bool defaultValue = false) const;
560 void setOcioLockColorVisualRepresentation(bool value);
561
562 QString defaultPalette(bool defaultValue = false) const;
563 void setDefaultPalette(const QString& name) const;
564
565 QString toolbarSlider(int sliderNumber, bool defaultValue = false) const;
566 void setToolbarSlider(int sliderNumber, const QString &slider);
567
568
569 int layerThumbnailSize(bool defaultValue = false) const;
570 void setLayerThumbnailSize(int size);
571
572 int layerTreeIndentation(bool defaultValue = false) const;
573 void setLayerTreeIndentation(int percentage);
574
575
576 bool sliderLabels(bool defaultValue = false) const;
577 void setSliderLabels(bool enabled);
578
579 QString currentInputProfile(bool defaultValue = false) const;
580 void setCurrentInputProfile(const QString& name);
581
582 bool presetStripVisible(bool defaultValue = false) const;
583 void setPresetStripVisible(bool visible);
584
585 bool scratchpadVisible(bool defaultValue = false) const;
586 void setScratchpadVisible(bool visible);
587
588 bool showSingleChannelAsColor(bool defaultValue = false) const;
589 void setShowSingleChannelAsColor(bool asColor);
590
591 bool hidePopups(bool defaultValue = false) const;
592 void setHidePopups(bool hidePopups);
593
594 int numDefaultLayers(bool defaultValue = false) const;
595 void setNumDefaultLayers(int num);
596
597 quint8 defaultBackgroundOpacity(bool defaultValue = false) const;
598 void setDefaultBackgroundOpacity(quint8 value);
599
600 QColor defaultBackgroundColor(bool defaultValue = false) const;
601 void setDefaultBackgroundColor(const QColor &value);
602
604 RASTER_LAYER = 0,
605 CANVAS_COLOR = 1,
606 FILL_LAYER = 2
607 };
608
609 BackgroundStyle defaultBackgroundStyle(bool defaultValue = false) const;
610 void setDefaultBackgroundStyle(BackgroundStyle value);
611
612 int lineSmoothingType(bool defaultValue = false) const;
613 void setLineSmoothingType(int value);
614
615 qreal lineSmoothingDistanceMin(bool defaultValue = false) const;
616 void setLineSmoothingDistanceMin(qreal value);
617
618 qreal lineSmoothingDistanceMax(bool defaultValue = false) const;
619 void setLineSmoothingDistanceMax(qreal value);
620
621 bool lineSmoothingDistanceKeepAspectRatio(bool defaultValue = false) const;
622 void setLineSmoothingDistanceKeepAspectRatio(bool value);
623
624 qreal lineSmoothingTailAggressiveness(bool defaultValue = false) const;
625 void setLineSmoothingTailAggressiveness(qreal value);
626
627 bool lineSmoothingSmoothPressure(bool defaultValue = false) const;
628 void setLineSmoothingSmoothPressure(bool value);
629
630 bool lineSmoothingScalableDistance(bool defaultValue = false) const;
631 void setLineSmoothingScalableDistance(bool value);
632
633 qreal lineSmoothingDelayDistance(bool defaultValue = false) const;
634 void setLineSmoothingDelayDistance(qreal value);
635
636 bool lineSmoothingUseDelayDistance(bool defaultValue = false) const;
637 void setLineSmoothingUseDelayDistance(bool value);
638
639 bool lineSmoothingFinishStabilizedCurve(bool defaultValue = false) const;
640 void setLineSmoothingFinishStabilizedCurve(bool value);
641
642 bool lineSmoothingStabilizeSensors(bool defaultValue = false) const;
643 void setLineSmoothingStabilizeSensors(bool value);
644
645 int tabletEventsDelay(bool defaultValue = false) const;
646 void setTabletEventsDelay(int value);
647
648 bool trackTabletEventLatency(bool defaultValue = false) const;
649 void setTrackTabletEventLatency(bool value);
650
651 bool ignoreHighFunctionKeys(bool defaultValue = false) const;
652 void setIgnoreHighFunctionKeys(bool value);
653
654 bool testingAcceptCompressedTabletEvents(bool defaultValue = false) const;
655 void setTestingAcceptCompressedTabletEvents(bool value);
656
657 bool shouldEatDriverShortcuts(bool defaultValue = false) const;
658
659 bool testingCompressBrushEvents(bool defaultValue = false) const;
660 void setTestingCompressBrushEvents(bool value);
661
662 const KoColorSpace* customColorSelectorColorSpace(bool defaultValue = false) const;
663 void setCustomColorSelectorColorSpace(const KoColorSpace *cs);
664
665 bool useDirtyPresets(bool defaultValue = false) const;
666 void setUseDirtyPresets(bool value);
667
668 bool useEraserBrushSize(bool defaultValue = false) const;
669 void setUseEraserBrushSize(bool value);
670
671 bool useEraserBrushOpacity(bool defaultValue = false) const;
672 void setUseEraserBrushOpacity(bool value);
673
674 QPoint getDefaultGridSpacing(bool defaultValue = false) const;
675 void setDefaultGridSpacing(QPoint gridSpacing);
676
677 QString getMDIBackgroundColor(bool defaultValue = false) const;
678 void setMDIBackgroundColor(const QString & v) const;
679
680 QString getMDIBackgroundImage(bool defaultValue = false) const;
681 void setMDIBackgroundImage(const QString & fileName) const;
682
683 int workaroundX11SmoothPressureSteps(bool defaultValue = false) const;
684
685 bool showCanvasMessages(bool defaultValue = false) const;
686 void setShowCanvasMessages(bool show);
687
688 bool compressKra(bool defaultValue = false) const;
689 void setCompressKra(bool compress);
690
691 bool trimKra(bool defaultValue = false) const;
692 void setTrimKra(bool trim);
693
694 bool trimFramesImport(bool defaultValue = false) const;
695 void setTrimFramesImport(bool trim);
696
697 QString exportMimeType(bool defaultValue) const;
698 void setExportMimeType(const QString &defaultExportMimeType);
699
700 bool toolOptionsInDocker(bool defaultValue = false) const;
701 void setToolOptionsInDocker(bool inDocker);
702
703 bool kineticScrollingEnabled(bool defaultValue = false) const;
704 void setKineticScrollingEnabled(bool enabled);
705
706 int kineticScrollingGesture(bool defaultValue = false) const;
707 void setKineticScrollingGesture(int kineticScroll);
708
709 int kineticScrollingSensitivity(bool defaultValue = false) const;
710 void setKineticScrollingSensitivity(int sensitivity);
711
712 bool kineticScrollingHiddenScrollbars(bool defaultValue = false) const;
713 void setKineticScrollingHideScrollbars(bool scrollbar);
714
715 int zoomSteps(bool defaultValue = false) const;
716 void setZoomSteps(int steps);
717
718 int zoomMarginSize(bool defaultValue = false) const;
719 void setZoomMarginSize(int zoomMarginSize);
720
721 void setEnableOpenGLFramerateLogging(bool value) const;
722 bool enableOpenGLFramerateLogging(bool defaultValue = false) const;
723
724 void setEnableBrushSpeedLogging(bool value) const;
725 bool enableBrushSpeedLogging(bool defaultValue = false) const;
726
727 void setDisableVectorOptimizations(bool value);
728 bool disableVectorOptimizations(bool defaultValue = false) const;
729
730 void setDisableAVXOptimizations(bool value);
731 bool disableAVXOptimizations(bool defaultValue = false) const;
732
733 void setAnimationPlaybackBackend(int value);
734 int animationPlaybackBackend(bool defaultValue = false) const;
735
736 bool animationDropFrames(bool defaultValue = false) const;
737 void setAnimationDropFrames(bool value);
738
739 bool autoPinLayersToTimeline(bool defaultValue = false) const;
740 void setAutoPinLayersToTimeline(bool value);
741
742 bool adaptivePlaybackRange(bool defaultValue = false) const;
743 void setAdaptivePlaybackRange(bool value);
744
745 bool autoZoomTimelineToPlaybackRange(bool defaultValue = false) const;
746 void setAutoZoomTimelineToPlaybackRange(bool value);
747
748 QString ffmpegLocation(bool defaultValue = false) const;
749 void setFFMpegLocation(const QString& value);
750
751 qreal timelineZoom(bool defaultValue = false) const;
752 void setTimelineZoom(qreal value);
753
754 int scrubbingUpdatesDelay(bool defaultValue = false) const;
755 void setScrubbingUpdatesDelay(int value);
756
757 int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
758 void setScrubbingAudioUpdatesDelay(int value);
759
760 int audioOffsetTolerance(bool defaultValue = false) const;
761 void setAudioOffsetTolerance(int value);
762
763 bool switchSelectionCtrlAlt(bool defaultValue = false) const;
764 void setSwitchSelectionCtrlAlt(bool value);
765
766 bool convertToImageColorspaceOnImport(bool defaultValue = false) const;
767 void setConvertToImageColorspaceOnImport(bool value);
768
769 int stabilizerSampleSize(bool defaultValue = false) const;
770 void setStabilizerSampleSize(int value);
771
772 bool stabilizerDelayedPaint(bool defaultValue = false) const;
773 void setStabilizerDelayedPaint(bool value);
774
775 bool showBrushHud(bool defaultValue = false) const;
776 void setShowBrushHud(bool value);
777
778 bool showPaletteBottomBar(bool defaultValue = false) const;
779 void setShowPaletteBottomBar(bool value);
780
781 QString brushHudSetting(bool defaultValue = false) const;
782 void setBrushHudSetting(const QString &value) const;
783
784 bool calculateAnimationCacheInBackground(bool defaultValue = false) const;
785 void setCalculateAnimationCacheInBackground(bool value);
786
787 QColor defaultAssistantsColor(bool defaultValue = false) const;
788 void setDefaultAssistantsColor(const QColor &color) const;
789
790 bool autoSmoothBezierCurves(bool defaultValue = false) const;
791 void setAutoSmoothBezierCurves(bool value);
792
793 bool activateTransformToolAfterPaste(bool defaultValue = false) const;
794 void setActivateTransformToolAfterPaste(bool value);
795
796 bool zoomHorizontal(bool defaultValue = false) const;
797 void setZoomHorizontal(bool value);
798
799 bool selectionActionBar(bool defaultValue = false) const;
800 void setSelectionActionBar(bool value);
801
803 FreeFloating = 0,
804 Fixed
805 };
806
817
819 Horizontal = 0,
820 Vertical
821 };
822
823 SelectionActionsBarBehavior
824 selectionActionBarBehavior(bool defaultValue = false) const;
825 void setSelectionActionBarBehavior(SelectionActionsBarBehavior value);
826
827 SelectionActionsBarPosition selectionActionBarPosition(bool defaultValue = false) const;
828 void setSelectionActionBarPosition(SelectionActionsBarPosition value);
829
830 SelectionActionsBarOrientation selectionActionBarOrientation(bool defaultValue = false) const;
831 void setSelectionActionBarOrientation(SelectionActionsBarOrientation value);
832
834 BT709_G22 = 0,
836 BT2020_PQ
837 };
838 RootSurfaceFormat rootSurfaceFormat(bool defaultValue = false) const;
839 void setRootSurfaceFormat(RootSurfaceFormat value);
840
841 static RootSurfaceFormat rootSurfaceFormat(QSettings *displayrc, bool defaultValue = false);
842 static void setRootSurfaceFormat(QSettings *displayrc, RootSurfaceFormat value);
843
844 bool useZip64(bool defaultValue = false) const;
845 void setUseZip64(bool value);
846
847 bool convertLayerColorSpaceInProperties(bool defaultValue = false) const;
848 void setConvertLayerColorSpaceInProperties(bool value);
849
850 bool renamePastedLayers(bool defaultValue = false) const;
851 void setRenamePastedLayers(bool value);
852
854 INFOTEXT_NONE = 0,
857 INFOTEXT_DETAILED
858 };
859 LayerInfoTextStyle layerInfoTextStyle(bool defaultValue = false) const;
860 void setLayerInfoTextStyle(LayerInfoTextStyle value);
861
862 int layerInfoTextOpacity(bool defaultValue = false) const;
863 void setLayerInfoTextOpacity(int value);
864
865 bool useInlineLayerInfoText(bool defaultValue = false) const;
866 void setUseInlineLayerInfoText(bool value);
867
868 bool useLayerSelectionCheckbox(bool defaultValue = false) const;
869 void setUseLayerSelectionCheckbox(bool value);
870
872 ASSISTANTS_DRAW_MODE_DIRECT = 0, // no caching, draw directly on canvas
873 ASSISTANTS_DRAW_MODE_PIXMAP_CACHE = 1,
874 ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE = 2,
875 };
876 AssistantsDrawMode assistantsDrawMode(bool defaultValue = false) const;
877 void setAssistantsDrawMode(AssistantsDrawMode value);
878
879 bool longPressEnabled(bool defaultValue = false) const;
880 void setLongPressEnabled(bool value);
881
888 int layerThumbnailGenerationTimeout(bool defaultValue = false) const;
889 void setLayerThumbnailGenerationTimeout(int value);
890
891 template<class T>
892 void writeEntry(const QString& name, const T& value) {
893 m_cfg.writeEntry(name, value);
894 }
895
896 template<class T>
897 void writeList(const QString& name, const QList<T>& value) {
898 m_cfg.writeEntry(name, value);
899 }
900
901 template<class T>
902 T readEntry(const QString& name, const T& defaultValue=T()) {
903 return m_cfg.readEntry(name, defaultValue);
904 }
905
906 template<class T>
907 QList<T> readList(const QString& name, const QList<T>& defaultValue=QList<T>()) {
908 return m_cfg.readEntry(name, defaultValue);
909 }
910
911private:
914
915private:
916 mutable KConfigGroup m_cfg;
918};
919
922
923#endif // KIS_CONFIG_H_
924
925KRITAUI_EXPORT
926QDebug operator<<(QDebug debug, const KisConfig::CanvasSurfaceMode &mode);
927
928KRITAUI_EXPORT
929QDebug 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:897
KConfigGroup m_cfg
Definition kis_config.h:916
QList< T > readList(const QString &name, const QList< T > &defaultValue=QList< T >())
Definition kis_config.h:907
KisConfig(const KisConfig &)
void writeEntry(const QString &name, const T &value)
Definition kis_config.h:892
bool m_readOnly
Definition kis_config.h:917
SelectionActionsBarPosition
Definition kis_config.h:807
SelectionActionsBarBehavior
Definition kis_config.h:802
QString importProfile(bool defaultValue=false) const
@ INFOTEXT_SIMPLE
Definition kis_config.h:855
@ INFOTEXT_BALANCED
Definition kis_config.h:856
@ 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:818
ColorSamplerPreviewCirclePosition
Definition kis_config.h:168
OcioColorManagementMode
Definition kis_config.h:547
KisConfig & operator=(const KisConfig &) const
T readEntry(const QString &name, const T &defaultValue=T())
Definition kis_config.h:902
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