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