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