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