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
170 bool enableCanvasSurfaceColorSpaceManagement(bool defaultValue = false) const;
171 void setEnableCanvasSurfaceColorSpaceManagement(bool value);
172
173 enum class CanvasSurfaceMode {
174 Preferred = 0,
175 Rec709g22,
176 Rec709g10,
177 Rec2020pq,
178 Unmanaged
179 };
180
186 CanvasSurfaceMode canvasSurfaceColorSpaceManagementMode(bool defaultValue = false) const;
187 void setCanvasSurfaceColorSpaceManagementMode(CanvasSurfaceMode value);
188
190 DepthAuto = 0,
191 Depth8Bit,
192 Depth10Bit
193 };
194
195 static CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(QSettings *settings, bool defaultValue = false);
196 static void setCanvasSurfaceBitDepthMode(QSettings *settings, CanvasSurfaceBitDepthMode value);
197
198 CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(bool defaultValue = false) const;
199 void setCanvasSurfaceBitDepthMode(CanvasSurfaceBitDepthMode value);
200
201 CanvasSurfaceBitDepthMode effectiveCanvasSurfaceBitDepthMode(const QSurfaceFormat &format) const;
202
204 QString monitorProfile(int screen) const;
205 void setMonitorProfile(int screen, const QString & monitorProfile, bool override) const;
206
207 QString monitorForScreen(int screen, const QString &defaultMonitor, bool defaultValue = true) const;
208 void setMonitorForScreen(int screen, const QString& monitor);
209
213 const KoColorProfile *displayProfile(int screen) const;
214
215 const QString getScreenStringIdentfier(int screenNo) const;
216
217 QString workingColorSpace(bool defaultValue = false) const;
218 void setWorkingColorSpace(const QString & workingColorSpace) const;
219
220 QString importProfile(bool defaultValue = false) const;
221 void setImportProfile(const QString & importProfile) const;
222
223 QString printerColorSpace(bool defaultValue = false) const;
224 void setPrinterColorSpace(const QString & printerColorSpace) const;
225
226 QString printerProfile(bool defaultValue = false) const;
227 void setPrinterProfile(const QString & printerProfile) const;
228
229 bool useBlackPointCompensation(bool defaultValue = false) const;
230 void setUseBlackPointCompensation(bool useBlackPointCompensation) const;
231
232 bool allowLCMSOptimization(bool defaultValue = false) const;
233 void setAllowLCMSOptimization(bool allowLCMSOptimization);
234
235 bool forcePaletteColors(bool defaultValue = false) const;
236 void setForcePaletteColors(bool forcePaletteColors);
237
238 bool colorHistoryPerDocument(bool defaultValue = false) const;
239
240 void writeKoColor(const QString& name, const KoColor& color) const;
241 KoColor readKoColor(const QString& name, const KoColor& color = KoColor()) const;
242
243 QList<KoColor> readKoColors(const QString &name) const;
244 void writeKoColors(const QString &name, const QList<KoColor> &colors) const;
245
246 bool showRulers(bool defaultValue = false) const;
247 void setShowRulers(bool rulers) const;
248
249 bool forceShowSaveMessages(bool defaultValue = true) const;
250 void setForceShowSaveMessages(bool value) const;
251
252 bool forceShowAutosaveMessages(bool defaultValue = true) const;
253 void setForceShowAutosaveMessages(bool ShowAutosaveMessages) const;
254
255 bool rulersTrackMouse(bool defaultValue = false) const;
256 void setRulersTrackMouse(bool value) const;
257
258 qint32 pasteBehaviour(bool defaultValue = false) const;
259 void setPasteBehaviour(qint32 behaviour) const;
260
261 qint32 pasteFormat(bool defaultValue) const;
262 void setPasteFormat(qint32 format);
263
264 qint32 monitorRenderIntent(bool defaultValue = false) const;
265 void setRenderIntent(qint32 monitorRenderIntent) const;
266
267 bool useOpenGL(bool defaultValue = false) const;
268 void disableOpenGL() const;
269
270 int openGLFilteringMode(bool defaultValue = false) const;
271 void setOpenGLFilteringMode(int filteringMode);
272
273 void setWidgetStyle(QString name);
274 QString widgetStyle(bool defaultValue = false);
275
276 bool useOpenGLTextureBuffer(bool defaultValue = false) const;
277 void setUseOpenGLTextureBuffer(bool useBuffer);
278
279 bool forceOpenGLFenceWorkaround(bool defaultValue = false) const;
280
281 int numMipmapLevels(bool defaultValue = false) const;
282 int openGLTextureSize(bool defaultValue = false) const;
283 int textureOverlapBorder() const;
284
285 quint32 getGridMainStyle(bool defaultValue = false) const;
286 void setGridMainStyle(quint32 v) const;
287
288 quint32 getGridSubdivisionStyle(bool defaultValue = false) const;
289 void setGridSubdivisionStyle(quint32 v) const;
290
291 quint32 getGridIsoVerticalStyle(bool defaultValue = false) const;
292 void setGridIsoVerticalStyle(quint32 v) const;
293
294 QColor getGridMainColor(bool defaultValue = false) const;
295 void setGridMainColor(const QColor & v) const;
296
297 QColor getGridSubdivisionColor(bool defaultValue = false) const;
298 void setGridSubdivisionColor(const QColor & v) const;
299
300 QColor getGridIsoVerticalColor(bool defaultValue = false) const;
301 void setGridIsoVerticalColor(const QColor & v) const;
302
303 QColor getPixelGridColor(bool defaultValue = false) const;
304 void setPixelGridColor(const QColor & v) const;
305
306 qreal getPixelGridDrawingThreshold(bool defaultValue = false) const;
307 void setPixelGridDrawingThreshold(qreal v) const;
308
309 bool pixelGridEnabled(bool defaultValue = false) const;
310 void enablePixelGrid(bool v) const;
311
312 quint32 guidesLineStyle(bool defaultValue = false) const;
313 void setGuidesLineStyle(quint32 v) const;
314 QColor guidesColor(bool defaultValue = false) const;
315 void setGuidesColor(const QColor & v) const;
316
317 void loadSnapConfig(KisSnapConfig *config, bool defaultValue = false) const;
318 void saveSnapConfig(const KisSnapConfig &config);
319
320 qint32 checkSize(bool defaultValue = false) const;
321 void setCheckSize(qint32 checkSize) const;
322
323 bool scrollCheckers(bool defaultValue = false) const;
324 void setScrollingCheckers(bool scrollCheckers) const;
325
326 QColor checkersColor1(bool defaultValue = false) const;
327 void setCheckersColor1(const QColor & v) const;
328
329 QColor checkersColor2(bool defaultValue = false) const;
330 void setCheckersColor2(const QColor & v) const;
331
332 QColor canvasBorderColor(bool defaultValue = false) const;
333 void setCanvasBorderColor(const QColor &color) const;
334
335 bool hideScrollbars(bool defaultValue = false) const;
336 void setHideScrollbars(bool value) const;
337
338 bool scrollbarZoomEnabled(bool defaultValue = false) const;
339 void setScrollbarZoomEnabled(bool enabled) const;
340
341 bool antialiasCurves(bool defaultValue = false) const;
342 void setAntialiasCurves(bool v) const;
343
344 bool antialiasSelectionOutline(bool defaultValue = false) const;
345 void setAntialiasSelectionOutline(bool v) const;
346
347 bool showRootLayer(bool defaultValue = false) const;
348 void setShowRootLayer(bool showRootLayer) const;
349
350 bool showGlobalSelection(bool defaultValue = false) const;
351 void setShowGlobalSelection(bool showGlobalSelection) const;
352
353 bool showOutlineWhilePainting(bool defaultValue = false) const;
354 void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const;
355
356 bool forceAlwaysFullSizedOutline(bool defaultValue = false) const;
357 void setForceAlwaysFullSizedOutline(bool value) const;
358
359 bool showEraserOutlineWhilePainting(bool defaultValue = false) const;
360 void setShowEraserOutlineWhilePainting(bool showEraserOutlineWhilePainting) const;
361
362 bool forceAlwaysFullSizedEraserOutline(bool defaultValue = false) const;
363 void setForceAlwaysFullSizedEraserOutline(bool value) const;
364
370 SessionOnStartup sessionOnStartup(bool defaultValue = false) const;
371 void setSessionOnStartup(SessionOnStartup value);
372
373 bool saveSessionOnQuit(bool defaultValue) const;
374 void setSaveSessionOnQuit(bool value);
375
376 bool hideDevFundBanner(bool defaultValue = false) const;
377 void setHideDevFundBanner(bool value = true);
378
379 qreal outlineSizeMinimum(bool defaultValue = false) const;
380 void setOutlineSizeMinimum(qreal outlineSizeMinimum) const;
381
382 qreal selectionViewSizeMinimum(bool defaultValue = false) const;
383 void setSelectionViewSizeMinimum(qreal outlineSizeMinimum) const;
384
385 int autoSaveInterval(bool defaultValue = false) const;
386 void setAutoSaveInterval(int seconds) const;
387
388 bool backupFile(bool defaultValue = false) const;
389 void setBackupFile(bool backupFile) const;
390
391 bool showFilterGallery(bool defaultValue = false) const;
392 void setShowFilterGallery(bool showFilterGallery) const;
393
394 bool showFilterGalleryLayerMaskDialog(bool defaultValue = false) const;
395 void setShowFilterGalleryLayerMaskDialog(bool showFilterGallery) const;
396
397 // OPENGL_SUCCESS, TRY_OPENGL, OPENGL_NOT_TRIED, OPENGL_FAILED
398 QString canvasState(bool defaultValue = false) const;
399 void setCanvasState(const QString& state) const;
400
401 bool toolOptionsPopupDetached(bool defaultValue = false) const;
402 void setToolOptionsPopupDetached(bool detached) const;
403
404 bool paintopPopupDetached(bool defaultValue = false) const;
405 void setPaintopPopupDetached(bool detached) const;
406
407 QString pressureTabletCurve(bool defaultValue = false) const;
408 void setPressureTabletCurve(const QString& curveString) const;
409
410 bool useWin8PointerInput(bool defaultValue = false) const;
411 void setUseWin8PointerInput(bool value);
412
413 static bool useWin8PointerInputNoApp(QSettings *settings, bool defaultValue = false);
414 static void setUseWin8PointerInputNoApp(QSettings *settings, bool value);
415
416 bool useRightMiddleTabletButtonWorkaround(bool defaultValue = false) const;
417 void setUseRightMiddleTabletButtonWorkaround(bool value);
418
419#ifdef Q_OS_ANDROID
420 bool usePageUpDownMouseButtonEmulationWorkaround(bool defaultValue = false) const;
421 void setUsePageUpDownMouseButtonEmulationWorkaround(bool value);
422
423 bool useIgnoreHistoricTabletEventsWorkaround(bool defaultValue = false) const;
424 void setUseIgnoreHistoricTabletEventsWorkaround(bool value);
425#endif
426
427 qreal vastScrolling(bool defaultValue = false) const;
428 void setVastScrolling(const qreal factor) const;
429
430 int presetChooserViewMode(bool defaultValue = false) const;
431 void setPresetChooserViewMode(const int mode) const;
432
433 int presetIconSize(bool defaultValue = false) const;
434 void setPresetIconSize(const int value) const;
435
436
437 bool firstRun(bool defaultValue = false) const;
438 void setFirstRun(const bool firstRun) const;
439
440 bool clicklessSpacePan(bool defaultValue = false) const;
441 void setClicklessSpacePan(const bool toggle) const;
442
443 int horizontalSplitLines(bool defaultValue = false) const;
444 void setHorizontalSplitLines(const int numberLines) const;
445
446 int verticalSplitLines(bool defaultValue = false) const;
447 void setVerticalSplitLines(const int numberLines) const;
448
449 bool hideDockersFullscreen(bool defaultValue = false) const;
450 void setHideDockersFullscreen(const bool value) const;
451
452 bool showDockerTitleBars(bool defaultValue = false) const;
453 void setShowDockerTitleBars(const bool value) const;
454
455 bool showDockers(bool defaultValue = false) const;
456 void setShowDockers(const bool value) const;
457
458 bool showStatusBar(bool defaultValue = false) const;
459 void setShowStatusBar(const bool value) const;
460
461 bool hideMenuFullscreen(bool defaultValue = false) const;
462 void setHideMenuFullscreen(const bool value) const;
463
464 bool hideScrollbarsFullscreen(bool defaultValue = false) const;
465 void setHideScrollbarsFullscreen(const bool value) const;
466
467 bool hideStatusbarFullscreen(bool defaultValue = false) const;
468 void setHideStatusbarFullscreen(const bool value) const;
469
470 bool hideTitlebarFullscreen(bool defaultValue = false) const;
471 void setHideTitlebarFullscreen(const bool value) const;
472
473 bool hideToolbarFullscreen(bool defaultValue = false) const;
474 void setHideToolbarFullscreen(const bool value) const;
475
476 bool fullscreenMode(bool defaultValue = false) const;
477 void setFullscreenMode(const bool value) const;
478
479 QStringList favoriteCompositeOps(bool defaultValue = false) const;
480 void setFavoriteCompositeOps(const QStringList& compositeOps) const;
481
482 QString exportConfigurationXML(const QString &filterId, bool defaultValue = false) const;
483 KisPropertiesConfigurationSP exportConfiguration(const QString &filterId, bool defaultValue = false) const;
484 void setExportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
485
486 QString importConfiguration(const QString &filterId, bool defaultValue = false) const;
487 void setImportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
488
489 bool useOcio(bool defaultValue = false) const;
490 void setUseOcio(bool useOCIO) const;
491
492 int favoritePresets(bool defaultValue = false) const;
493 void setFavoritePresets(const int value);
494
495 bool levelOfDetailEnabled(bool defaultValue = false) const;
496 void setLevelOfDetailEnabled(bool value);
497
498 KisOcioConfiguration ocioConfiguration(bool defaultValue = false) const;
499 void setOcioConfiguration(const KisOcioConfiguration &cfg);
500
502 INTERNAL = 0,
504 OCIO_ENVIRONMENT
505 };
506
507 OcioColorManagementMode ocioColorManagementMode(bool defaultValue = false) const;
508 void setOcioColorManagementMode(OcioColorManagementMode mode) const;
509
510 int ocioLutEdgeSize(bool defaultValue = false) const;
511 void setOcioLutEdgeSize(int value);
512
513 bool ocioLockColorVisualRepresentation(bool defaultValue = false) const;
514 void setOcioLockColorVisualRepresentation(bool value);
515
516 bool useSystemMonitorProfile(bool defaultValue = false) const;
517 void setUseSystemMonitorProfile(bool _useSystemMonitorProfile) const;
518
519 QString defaultPalette(bool defaultValue = false) const;
520 void setDefaultPalette(const QString& name) const;
521
522 QString toolbarSlider(int sliderNumber, bool defaultValue = false) const;
523 void setToolbarSlider(int sliderNumber, const QString &slider);
524
525
526 int layerThumbnailSize(bool defaultValue = false) const;
527 void setLayerThumbnailSize(int size);
528
529 int layerTreeIndentation(bool defaultValue = false) const;
530 void setLayerTreeIndentation(int percentage);
531
532
533 bool sliderLabels(bool defaultValue = false) const;
534 void setSliderLabels(bool enabled);
535
536 QString currentInputProfile(bool defaultValue = false) const;
537 void setCurrentInputProfile(const QString& name);
538
539 bool presetStripVisible(bool defaultValue = false) const;
540 void setPresetStripVisible(bool visible);
541
542 bool scratchpadVisible(bool defaultValue = false) const;
543 void setScratchpadVisible(bool visible);
544
545 bool showSingleChannelAsColor(bool defaultValue = false) const;
546 void setShowSingleChannelAsColor(bool asColor);
547
548 bool hidePopups(bool defaultValue = false) const;
549 void setHidePopups(bool hidePopups);
550
551 int numDefaultLayers(bool defaultValue = false) const;
552 void setNumDefaultLayers(int num);
553
554 quint8 defaultBackgroundOpacity(bool defaultValue = false) const;
555 void setDefaultBackgroundOpacity(quint8 value);
556
557 QColor defaultBackgroundColor(bool defaultValue = false) const;
558 void setDefaultBackgroundColor(const QColor &value);
559
561 RASTER_LAYER = 0,
562 CANVAS_COLOR = 1,
563 FILL_LAYER = 2
564 };
565
566 BackgroundStyle defaultBackgroundStyle(bool defaultValue = false) const;
567 void setDefaultBackgroundStyle(BackgroundStyle value);
568
569 int lineSmoothingType(bool defaultValue = false) const;
570 void setLineSmoothingType(int value);
571
572 qreal lineSmoothingDistanceMin(bool defaultValue = false) const;
573 void setLineSmoothingDistanceMin(qreal value);
574
575 qreal lineSmoothingDistanceMax(bool defaultValue = false) const;
576 void setLineSmoothingDistanceMax(qreal value);
577
578 bool lineSmoothingDistanceKeepAspectRatio(bool defaultValue = false) const;
579 void setLineSmoothingDistanceKeepAspectRatio(bool value);
580
581 qreal lineSmoothingTailAggressiveness(bool defaultValue = false) const;
582 void setLineSmoothingTailAggressiveness(qreal value);
583
584 bool lineSmoothingSmoothPressure(bool defaultValue = false) const;
585 void setLineSmoothingSmoothPressure(bool value);
586
587 bool lineSmoothingScalableDistance(bool defaultValue = false) const;
588 void setLineSmoothingScalableDistance(bool value);
589
590 qreal lineSmoothingDelayDistance(bool defaultValue = false) const;
591 void setLineSmoothingDelayDistance(qreal value);
592
593 bool lineSmoothingUseDelayDistance(bool defaultValue = false) const;
594 void setLineSmoothingUseDelayDistance(bool value);
595
596 bool lineSmoothingFinishStabilizedCurve(bool defaultValue = false) const;
597 void setLineSmoothingFinishStabilizedCurve(bool value);
598
599 bool lineSmoothingStabilizeSensors(bool defaultValue = false) const;
600 void setLineSmoothingStabilizeSensors(bool value);
601
602 int tabletEventsDelay(bool defaultValue = false) const;
603 void setTabletEventsDelay(int value);
604
605 bool trackTabletEventLatency(bool defaultValue = false) const;
606 void setTrackTabletEventLatency(bool value);
607
608 bool ignoreHighFunctionKeys(bool defaultValue = false) const;
609 void setIgnoreHighFunctionKeys(bool value);
610
611 bool testingAcceptCompressedTabletEvents(bool defaultValue = false) const;
612 void setTestingAcceptCompressedTabletEvents(bool value);
613
614 bool shouldEatDriverShortcuts(bool defaultValue = false) const;
615
616 bool testingCompressBrushEvents(bool defaultValue = false) const;
617 void setTestingCompressBrushEvents(bool value);
618
619 const KoColorSpace* customColorSelectorColorSpace(bool defaultValue = false) const;
620 void setCustomColorSelectorColorSpace(const KoColorSpace *cs);
621
622 bool useDirtyPresets(bool defaultValue = false) const;
623 void setUseDirtyPresets(bool value);
624
625 bool useEraserBrushSize(bool defaultValue = false) const;
626 void setUseEraserBrushSize(bool value);
627
628 bool useEraserBrushOpacity(bool defaultValue = false) const;
629 void setUseEraserBrushOpacity(bool value);
630
631 QPoint getDefaultGridSpacing(bool defaultValue = false) const;
632 void setDefaultGridSpacing(QPoint gridSpacing);
633
634 QString getMDIBackgroundColor(bool defaultValue = false) const;
635 void setMDIBackgroundColor(const QString & v) const;
636
637 QString getMDIBackgroundImage(bool defaultValue = false) const;
638 void setMDIBackgroundImage(const QString & fileName) const;
639
640 int workaroundX11SmoothPressureSteps(bool defaultValue = false) const;
641
642 bool showCanvasMessages(bool defaultValue = false) const;
643 void setShowCanvasMessages(bool show);
644
645 bool compressKra(bool defaultValue = false) const;
646 void setCompressKra(bool compress);
647
648 bool trimKra(bool defaultValue = false) const;
649 void setTrimKra(bool trim);
650
651 bool trimFramesImport(bool defaultValue = false) const;
652 void setTrimFramesImport(bool trim);
653
654 QString exportMimeType(bool defaultValue) const;
655 void setExportMimeType(const QString &defaultExportMimeType);
656
657 bool toolOptionsInDocker(bool defaultValue = false) const;
658 void setToolOptionsInDocker(bool inDocker);
659
660 bool kineticScrollingEnabled(bool defaultValue = false) const;
661 void setKineticScrollingEnabled(bool enabled);
662
663 int kineticScrollingGesture(bool defaultValue = false) const;
664 void setKineticScrollingGesture(int kineticScroll);
665
666 int kineticScrollingSensitivity(bool defaultValue = false) const;
667 void setKineticScrollingSensitivity(int sensitivity);
668
669 bool kineticScrollingHiddenScrollbars(bool defaultValue = false) const;
670 void setKineticScrollingHideScrollbars(bool scrollbar);
671
672 int zoomSteps(bool defaultValue = false) const;
673 void setZoomSteps(int steps);
674
675 int zoomMarginSize(bool defaultValue = false) const;
676 void setZoomMarginSize(int zoomMarginSize);
677
678 void setEnableOpenGLFramerateLogging(bool value) const;
679 bool enableOpenGLFramerateLogging(bool defaultValue = false) const;
680
681 void setEnableBrushSpeedLogging(bool value) const;
682 bool enableBrushSpeedLogging(bool defaultValue = false) const;
683
684 void setDisableVectorOptimizations(bool value);
685 bool disableVectorOptimizations(bool defaultValue = false) const;
686
687 void setDisableAVXOptimizations(bool value);
688 bool disableAVXOptimizations(bool defaultValue = false) const;
689
690 void setAnimationPlaybackBackend(int value);
691 int animationPlaybackBackend(bool defaultValue = false) const;
692
693 bool animationDropFrames(bool defaultValue = false) const;
694 void setAnimationDropFrames(bool value);
695
696 bool autoPinLayersToTimeline(bool defaultValue = false) const;
697 void setAutoPinLayersToTimeline(bool value);
698
699 bool adaptivePlaybackRange(bool defaultValue = false) const;
700 void setAdaptivePlaybackRange(bool value);
701
702 bool autoZoomTimelineToPlaybackRange(bool defaultValue = false) const;
703 void setAutoZoomTimelineToPlaybackRange(bool value);
704
705 QString ffmpegLocation(bool defaultValue = false) const;
706 void setFFMpegLocation(const QString& value);
707
708 qreal timelineZoom(bool defaultValue = false) const;
709 void setTimelineZoom(qreal value);
710
711 int scrubbingUpdatesDelay(bool defaultValue = false) const;
712 void setScrubbingUpdatesDelay(int value);
713
714 int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
715 void setScrubbingAudioUpdatesDelay(int value);
716
717 int audioOffsetTolerance(bool defaultValue = false) const;
718 void setAudioOffsetTolerance(int value);
719
720 bool switchSelectionCtrlAlt(bool defaultValue = false) const;
721 void setSwitchSelectionCtrlAlt(bool value);
722
723 bool convertToImageColorspaceOnImport(bool defaultValue = false) const;
724 void setConvertToImageColorspaceOnImport(bool value);
725
726 int stabilizerSampleSize(bool defaultValue = false) const;
727 void setStabilizerSampleSize(int value);
728
729 bool stabilizerDelayedPaint(bool defaultValue = false) const;
730 void setStabilizerDelayedPaint(bool value);
731
732 bool showBrushHud(bool defaultValue = false) const;
733 void setShowBrushHud(bool value);
734
735 bool showPaletteBottomBar(bool defaultValue = false) const;
736 void setShowPaletteBottomBar(bool value);
737
738 QString brushHudSetting(bool defaultValue = false) const;
739 void setBrushHudSetting(const QString &value) const;
740
741 bool calculateAnimationCacheInBackground(bool defaultValue = false) const;
742 void setCalculateAnimationCacheInBackground(bool value);
743
744 QColor defaultAssistantsColor(bool defaultValue = false) const;
745 void setDefaultAssistantsColor(const QColor &color) const;
746
747 bool autoSmoothBezierCurves(bool defaultValue = false) const;
748 void setAutoSmoothBezierCurves(bool value);
749
750 bool activateTransformToolAfterPaste(bool defaultValue = false) const;
751 void setActivateTransformToolAfterPaste(bool value);
752
753 bool zoomHorizontal(bool defaultValue = false) const;
754 void setZoomHorizontal(bool value);
755
756 bool selectionActionBar(bool defaultValue = false) const;
757 void setSelectionActionBar(bool value);
758
760 BT709_G22 = 0,
762 BT2020_PQ
763 };
764 RootSurfaceFormat rootSurfaceFormat(bool defaultValue = false) const;
765 void setRootSurfaceFormat(RootSurfaceFormat value);
766
767 static RootSurfaceFormat rootSurfaceFormat(QSettings *displayrc, bool defaultValue = false);
768 static void setRootSurfaceFormat(QSettings *displayrc, RootSurfaceFormat value);
769
770 bool useZip64(bool defaultValue = false) const;
771 void setUseZip64(bool value);
772
773 bool convertLayerColorSpaceInProperties(bool defaultValue = false) const;
774 void setConvertLayerColorSpaceInProperties(bool value);
775
776 bool renamePastedLayers(bool defaultValue = false) const;
777 void setRenamePastedLayers(bool value);
778
780 INFOTEXT_NONE = 0,
783 INFOTEXT_DETAILED
784 };
785 LayerInfoTextStyle layerInfoTextStyle(bool defaultValue = false) const;
786 void setLayerInfoTextStyle(LayerInfoTextStyle value);
787
788 int layerInfoTextOpacity(bool defaultValue = false) const;
789 void setLayerInfoTextOpacity(int value);
790
791 bool useInlineLayerInfoText(bool defaultValue = false) const;
792 void setUseInlineLayerInfoText(bool value);
793
794 bool useLayerSelectionCheckbox(bool defaultValue = false) const;
795 void setUseLayerSelectionCheckbox(bool value);
796
798 ASSISTANTS_DRAW_MODE_DIRECT = 0, // no caching, draw directly on canvas
799 ASSISTANTS_DRAW_MODE_PIXMAP_CACHE = 1,
800 ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE = 2,
801 };
802 AssistantsDrawMode assistantsDrawMode(bool defaultValue = false) const;
803 void setAssistantsDrawMode(AssistantsDrawMode value);
804
805 bool longPressEnabled(bool defaultValue = false) const;
806 void setLongPressEnabled(bool value);
807
808 template<class T>
809 void writeEntry(const QString& name, const T& value) {
810 m_cfg.writeEntry(name, value);
811 }
812
813 template<class T>
814 void writeList(const QString& name, const QList<T>& value) {
815 m_cfg.writeEntry(name, value);
816 }
817
818 template<class T>
819 T readEntry(const QString& name, const T& defaultValue=T()) {
820 return m_cfg.readEntry(name, defaultValue);
821 }
822
823 template<class T>
824 QList<T> readList(const QString& name, const QList<T>& defaultValue=QList<T>()) {
825 return m_cfg.readEntry(name, defaultValue);
826 }
827
828
830 static const KoColorProfile* getScreenProfile(int screen);
831
832private:
835
836private:
837 mutable KConfigGroup m_cfg;
839};
840
843
844#endif // KIS_CONFIG_H_
845
846KRITAUI_EXPORT
847QDebug operator<<(QDebug debug, const KisConfig::CanvasSurfaceMode &mode);
848
849KRITAUI_EXPORT
850QDebug 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:814
KConfigGroup m_cfg
Definition kis_config.h:837
QList< T > readList(const QString &name, const QList< T > &defaultValue=QList< T >())
Definition kis_config.h:824
KisConfig(const KisConfig &)
void writeEntry(const QString &name, const T &value)
Definition kis_config.h:809
bool m_readOnly
Definition kis_config.h:838
QString importProfile(bool defaultValue=false) const
@ INFOTEXT_SIMPLE
Definition kis_config.h:781
@ INFOTEXT_BALANCED
Definition kis_config.h:782
@ 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
OcioColorManagementMode
Definition kis_config.h:501
KisConfig & operator=(const KisConfig &) const
T readEntry(const QString &name, const T &defaultValue=T())
Definition kis_config.h:819
CanvasSurfaceBitDepthMode
Definition kis_config.h:189
@ SOS_PreviousSession
Definition kis_config.h:367
@ SOS_BlankSession
Definition kis_config.h:366
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)