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