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