Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

kis_config.h 23.6 KB
Newer Older
1
/*
Patrick Julien's avatar
Patrick Julien committed
2
 *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
3 4 5 6 7 8 9 10 11 12 13 14 15
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
16
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
 */
18
#ifndef KIS_CONFIG_H_
Patrick Julien's avatar
Patrick Julien committed
19
#define KIS_CONFIG_H_
20

21
#include <QString>
22
#include <QStringList>
23
#include <QList>
24 25
#include <QColor>

26
#include <ksharedconfig.h>
27
#include <kconfiggroup.h>
28

29 30
#include <kis_global.h>
#include <kis_properties_configuration.h>
31
#include "kritaui_export.h"
32

33
class KoColorProfile;
34
class KoColorSpace;
35
class KisSnapConfig;
36
class QSettings;
37
class KisOcioConfiguration;
38

Boudewijn Rempt's avatar
Boudewijn Rempt committed
39 40
class KRITAUI_EXPORT KisConfig
{
41
public:
42 43 44 45 46 47 48
    /**
     * @brief KisConfig create a kisconfig object
     * @param readOnly if true, there will be no call to sync when the object is deleted.
     *  Any KisConfig object created in a thread must be read-only.
     */
    KisConfig(bool readOnly);

49
    ~KisConfig();
Patrick Julien's avatar
Patrick Julien committed
50

51
    bool disableTouchOnCanvas(bool defaultValue = false) const;
52 53
    void setDisableTouchOnCanvas(bool value) const;

54 55 56
    bool disableTouchRotation(bool defaultValue = false) const;
    void setDisableTouchRotation(bool value) const;

57
    bool useProjections(bool defaultValue = false) const;
58
    void setUseProjections(bool useProj) const;
59

60
    bool undoEnabled(bool defaultValue = false) const;
61
    void setUndoEnabled(bool undo) const;
62

63
    int undoStackLimit(bool defaultValue = false) const;
64
    void setUndoStackLimit(int limit) const;
65

66
    bool useCumulativeUndoRedo(bool defaultValue = false) const;
67 68
    void setCumulativeUndoRedo(bool value);

69
    double stackT1(bool defaultValue = false) const;
70 71
    void setStackT1(int T1);

72
    double stackT2(bool defaultValue = false) const;
73 74
    void setStackT2(int T2);

75
    int stackN(bool defaultValue = false) const;
76 77
    void setStackN(int N);

78
    qint32 defImageWidth(bool defaultValue = false) const;
79
    void defImageWidth(qint32 width) const;
80

81
    qint32 defImageHeight(bool defaultValue = false) const;
82
    void defImageHeight(qint32 height) const;
83

84 85
    qreal defImageResolution(bool defaultValue = false) const;
    void defImageResolution(qreal res) const;
86

87 88 89
    int preferredVectorImportResolutionPPI(bool defaultValue = false) const;
    void setPreferredVectorImportResolutionPPI(int value) const;

90 91 92
    /**
     * @return the id of the default color model used for creating new images.
     */
93
    QString defColorModel(bool defaultValue = false) const;
94 95 96
    /**
     * set the id of the default color model used for creating new images.
     */
97
    void defColorModel(const QString & model) const;
98 99 100 101

    /**
     * @return the id of the default color depth used for creating new images.
     */
102
    QString defaultColorDepth(bool defaultValue = false) const;
103 104 105
    /**
     * set the id of the default color depth used for creating new images.
     */
106
    void setDefaultColorDepth(const QString & depth) const;
107 108 109 110

    /**
     * @return the id of the default color profile used for creating new images.
     */
111
    QString defColorProfile(bool defaultValue = false) const;
112 113 114
    /**
     * set the id of the default color profile used for creating new images.
     */
115
    void defColorProfile(const QString & depth) const;
116

117 118 119
    CursorStyle newCursorStyle(bool defaultValue = false) const;
    void setNewCursorStyle(CursorStyle style);

120 121 122
    QColor getCursorMainColor(bool defaultValue = false) const;
    void setCursorMainColor(const QColor& v) const;

123 124
    OutlineStyle newOutlineStyle(bool defaultValue = false) const;
    void setNewOutlineStyle(OutlineStyle style);
125

126 127 128
    QRect colorPreviewRect() const;
    void setColorPreviewRect(const QRect &rect);

129 130 131 132
    /// get the profile the user has selected for the given screen
    QString monitorProfile(int screen) const;
    void setMonitorProfile(int screen, const QString & monitorProfile, bool override) const;

133
    QString monitorForScreen(int screen, const QString &defaultMonitor, bool defaultValue = true) const;
134 135 136 137 138 139
    void setMonitorForScreen(int screen, const QString& monitor);

    /// Get the actual profile to be used for the given screen, which is
    /// either the screen profile set by the color management system or
    /// the custom monitor profile set by the user, depending on the configuration
    const KoColorProfile *displayProfile(int screen) const;
140

141
    QString workingColorSpace(bool defaultValue = false) const;
142
    void setWorkingColorSpace(const QString & workingColorSpace) const;
143

144
    QString importProfile(bool defaultValue = false) const;
145
    void setImportProfile(const QString & importProfile) const;
146

147
    QString printerColorSpace(bool defaultValue = false) const;
148
    void setPrinterColorSpace(const QString & printerColorSpace) const;
149

150
    QString printerProfile(bool defaultValue = false) const;
151
    void setPrinterProfile(const QString & printerProfile) const;
152

153
    bool useBlackPointCompensation(bool defaultValue = false) const;
154
    void setUseBlackPointCompensation(bool useBlackPointCompensation) const;
155

156
    bool allowLCMSOptimization(bool defaultValue = false) const;
157 158
    void setAllowLCMSOptimization(bool allowLCMSOptimization);

159 160 161
    bool forcePaletteColors(bool defaultValue = false) const;
    void setForcePaletteColors(bool forcePaletteColors);

162 163 164
    void writeKoColor(const QString& name, const KoColor& color) const;
    KoColor readKoColor(const QString& name, const KoColor& color = KoColor()) const;

165
    bool showRulers(bool defaultValue = false) const;
166
    void setShowRulers(bool rulers) const;
167

168 169 170 171 172 173
    bool forceShowSaveMessages(bool defaultValue = true) const;
    void setForceShowSaveMessages(bool value) const;

    bool forceShowAutosaveMessages(bool defaultValue = true) const;
    void setForceShowAutosaveMessages(bool ShowAutosaveMessages) const;

174 175 176
    bool rulersTrackMouse(bool defaultValue = false) const;
    void setRulersTrackMouse(bool value) const;

177
    qint32 pasteBehaviour(bool defaultValue = false) const;
178
    void setPasteBehaviour(qint32 behaviour) const;
179

180 181
    qint32 monitorRenderIntent(bool defaultValue = false) const;
    void setRenderIntent(qint32 monitorRenderIntent) const;
182

183
    bool useOpenGL(bool defaultValue = false) const;
184
    void disableOpenGL() const;
185

186
    int openGLFilteringMode(bool defaultValue = false) const;
187
    void setOpenGLFilteringMode(int filteringMode);
188

189
    bool useOpenGLTextureBuffer(bool defaultValue = false) const;
190 191
    void setUseOpenGLTextureBuffer(bool useBuffer);

192
    bool disableVSync(bool defaultValue = false) const;
193 194
    void setDisableVSync(bool disableVSync);

195
    bool showAdvancedOpenGLSettings(bool defaultValue = false) const;
196

197
    bool forceOpenGLFenceWorkaround(bool defaultValue = false) const;
198

199 200
    int numMipmapLevels(bool defaultValue = false) const;
    int openGLTextureSize(bool defaultValue = false) const;
201 202
    int textureOverlapBorder() const;

203
    quint32 getGridMainStyle(bool defaultValue = false) const;
204
    void setGridMainStyle(quint32 v) const;
205

206
    quint32 getGridSubdivisionStyle(bool defaultValue = false) const;
207
    void setGridSubdivisionStyle(quint32 v) const;
208

209
    QColor getGridMainColor(bool defaultValue = false) const;
210
    void setGridMainColor(const QColor & v) const;
211

212
    QColor getGridSubdivisionColor(bool defaultValue = false) const;
213
    void setGridSubdivisionColor(const QColor & v) const;
214

215 216
    QColor getPixelGridColor(bool defaultValue = false) const;
    void setPixelGridColor(const QColor & v) const;
217

218 219 220 221 222
    qreal getPixelGridDrawingThreshold(bool defaultValue = false) const;
    void setPixelGridDrawingThreshold(qreal v) const;

    bool pixelGridEnabled(bool defaultValue = false) const;
    void enablePixelGrid(bool v) const;
223

224 225 226 227 228
    quint32 guidesLineStyle(bool defaultValue = false) const;
    void setGuidesLineStyle(quint32 v) const;
    QColor guidesColor(bool defaultValue = false) const;
    void setGuidesColor(const QColor & v) const;

229 230 231
    void loadSnapConfig(KisSnapConfig *config, bool defaultValue = false) const;
    void saveSnapConfig(const KisSnapConfig &config);

232
    qint32 checkSize(bool defaultValue = false) const;
233
    void setCheckSize(qint32 checkSize) const;
234

235
    bool scrollCheckers(bool defaultValue = false) const;
236
    void setScrollingCheckers(bool scollCheckers) const;
237

238
    QColor checkersColor1(bool defaultValue = false) const;
239
    void setCheckersColor1(const QColor & v) const;
240

241
    QColor checkersColor2(bool defaultValue = false) const;
242
    void setCheckersColor2(const QColor & v) const;
243

244
    QColor canvasBorderColor(bool defaultValue = false) const;
245
    void setCanvasBorderColor(const QColor &color) const;
246

247
    bool hideScrollbars(bool defaultValue = false) const;
248 249
    void setHideScrollbars(bool value) const;

250
    bool antialiasCurves(bool defaultValue = false) const;
251
    void setAntialiasCurves(bool v) const;
252

253
    bool antialiasSelectionOutline(bool defaultValue = false) const;
254 255
    void setAntialiasSelectionOutline(bool v) const;

256
    bool showRootLayer(bool defaultValue = false) const;
257
    void setShowRootLayer(bool showRootLayer) const;
258

259
    bool showGlobalSelection(bool defaultValue = false) const;
Dmitry Kazakov's avatar
Dmitry Kazakov committed
260 261
    void setShowGlobalSelection(bool showGlobalSelection) const;

262
    bool showOutlineWhilePainting(bool defaultValue = false) const;
263
    void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const;
264

265 266 267
    bool forceAlwaysFullSizedOutline(bool defaultValue = false) const;
    void setForceAlwaysFullSizedOutline(bool value) const;

268 269 270 271 272 273 274
    enum SessionOnStartup {
        SOS_BlankSession,
        SOS_PreviousSession,
        SOS_ShowSessionManager
    };
    SessionOnStartup sessionOnStartup(bool defaultValue = false) const;
    void setSessionOnStartup(SessionOnStartup value);
275

276 277 278
    bool saveSessionOnQuit(bool defaultValue) const;
    void setSaveSessionOnQuit(bool value);

279
    qreal outlineSizeMinimum(bool defaultValue = false) const;
280 281
    void setOutlineSizeMinimum(qreal outlineSizeMinimum) const;

282 283 284
    qreal selectionViewSizeMinimum(bool defaultValue = false) const;
    void setSelectionViewSizeMinimum(qreal outlineSizeMinimum) const;

285
    int autoSaveInterval(bool defaultValue = false) const;
286
    void setAutoSaveInterval(int seconds) const;
287

288
    bool backupFile(bool defaultValue = false) const;
289
    void setBackupFile(bool backupFile) const;
290

291
    bool showFilterGallery(bool defaultValue = false) const;
292
    void setShowFilterGallery(bool showFilterGallery) const;
293

294
    bool showFilterGalleryLayerMaskDialog(bool defaultValue = false) const;
295
    void setShowFilterGalleryLayerMaskDialog(bool showFilterGallery) const;
296

297
    // OPENGL_SUCCESS, TRY_OPENGL, OPENGL_NOT_TRIED, OPENGL_FAILED
298
    QString canvasState(bool defaultValue = false) const;
299
    void setCanvasState(const QString& state) const;
300

301 302 303
    bool toolOptionsPopupDetached(bool defaultValue = false) const;
    void setToolOptionsPopupDetached(bool detached) const;

304
    bool paintopPopupDetached(bool defaultValue = false) const;
305
    void setPaintopPopupDetached(bool detached) const;
306

307
    QString pressureTabletCurve(bool defaultValue = false) const;
308
    void setPressureTabletCurve(const QString& curveString) const;
309

310
    bool useWin8PointerInput(bool defaultValue = false) const;
311 312 313 314
    void setUseWin8PointerInput(bool value);

    static bool useWin8PointerInputNoApp(QSettings *settings, bool defaultValue = false);
    static void setUseWin8PointerInputNoApp(QSettings *settings, bool value);
315

316 317 318
    bool useRightMiddleTabletButtonWorkaround(bool defaultValue = false) const;
    void setUseRightMiddleTabletButtonWorkaround(bool value);

319
    qreal vastScrolling(bool defaultValue = false) const;
320
    void setVastScrolling(const qreal factor) const;
321

322
    int presetChooserViewMode(bool defaultValue = false) const;
323
    void setPresetChooserViewMode(const int mode) const;
324

325 326 327 328
    int presetIconSize(bool defaultValue = false) const;
    void setPresetIconSize(const int value) const;


329
    bool firstRun(bool defaultValue = false) const;
330 331
    void setFirstRun(const bool firstRun) const;

332
    bool clicklessSpacePan(bool defaultValue = false) const;
333
    void setClicklessSpacePan(const bool toggle) const;
334

335
    int horizontalSplitLines(bool defaultValue = false) const;
336 337
    void setHorizontalSplitLines(const int numberLines) const;

338
    int verticalSplitLines(bool defaultValue = false) const;
339 340
    void setVerticalSplitLines(const int numberLines) const;

341 342
    bool hideDockersFullscreen(bool defaultValue = false) const;
    void setHideDockersFullscreen(const bool value) const;
343

344 345 346
    bool showDockers(bool defaultValue = false) const;
    void setShowDockers(const bool value) const;

347 348 349
    bool showStatusBar(bool defaultValue = false) const;
    void setShowStatusBar(const bool value) const;

350 351
    bool hideMenuFullscreen(bool defaultValue = false) const;
    void setHideMenuFullscreen(const bool value) const;
352

353 354
    bool hideScrollbarsFullscreen(bool defaultValue = false) const;
    void setHideScrollbarsFullscreen(const bool value) const;
355

356 357
    bool hideStatusbarFullscreen(bool defaultValue = false) const;
    void setHideStatusbarFullscreen(const bool value) const;
358

359 360
    bool hideTitlebarFullscreen(bool defaultValue = false) const;
    void setHideTitlebarFullscreen(const bool value) const;
361

362 363
    bool hideToolbarFullscreen(bool defaultValue = false) const;
    void setHideToolbarFullscreen(const bool value) const;
364

365 366 367
    bool fullscreenMode(bool defaultValue = false) const;
    void setFullscreenMode(const bool value) const;

368
    QStringList favoriteCompositeOps(bool defaultValue = false) const;
369
    void setFavoriteCompositeOps(const QStringList& compositeOps) const;
370

371 372
    QString exportConfigurationXML(const QString &filterId, bool defaultValue = false) const;
    KisPropertiesConfigurationSP exportConfiguration(const QString &filterId, bool defaultValue = false) const;
373
    void setExportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
374 375 376

    QString importConfiguration(const QString &filterId, bool defaultValue = false) const;
    void setImportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const;
377

378
    bool useOcio(bool defaultValue = false) const;
379
    void setUseOcio(bool useOCIO) const;
380

381
    int favoritePresets(bool defaultValue = false) const;
382 383
    void setFavoritePresets(const int value);

384 385
    bool levelOfDetailEnabled(bool defaultValue = false) const;
    void setLevelOfDetailEnabled(bool value);
386

387 388 389
    KisOcioConfiguration ocioConfiguration(bool defaultValue = false) const;
    void setOcioConfiguration(const KisOcioConfiguration &cfg);

390 391 392 393 394 395
    enum OcioColorManagementMode {
        INTERNAL = 0,
        OCIO_CONFIG,
        OCIO_ENVIRONMENT
    };

396
    OcioColorManagementMode ocioColorManagementMode(bool defaultValue = false) const;
397
    void setOcioColorManagementMode(OcioColorManagementMode mode) const;
398

399
    int ocioLutEdgeSize(bool defaultValue = false) const;
400 401
    void setOcioLutEdgeSize(int value);

402
    bool ocioLockColorVisualRepresentation(bool defaultValue = false) const;
403 404
    void setOcioLockColorVisualRepresentation(bool value);

405
    bool useSystemMonitorProfile(bool defaultValue = false) const;
406
    void setUseSystemMonitorProfile(bool _useSystemMonitorProfile) const;
407

408
    QString defaultPalette(bool defaultValue = false) const;
409
    void setDefaultPalette(const QString& name) const;
410

411
    QString toolbarSlider(int sliderNumber, bool defaultValue = false) const;
412 413
    void setToolbarSlider(int sliderNumber, const QString &slider);

414 415 416 417 418

    int layerThumbnailSize(bool defaultValue = false) const;
    void setLayerThumbnailSize(int size);


419
    bool sliderLabels(bool defaultValue = false) const;
420 421
    void setSliderLabels(bool enabled);

422
    QString currentInputProfile(bool defaultValue = false) const;
423 424
    void setCurrentInputProfile(const QString& name);

425
    bool presetStripVisible(bool defaultValue = false) const;
426 427
    void setPresetStripVisible(bool visible);

428
    bool scratchpadVisible(bool defaultValue = false) const;
429
    void setScratchpadVisible(bool visible);
430

431
    bool showSingleChannelAsColor(bool defaultValue = false) const;
432 433
    void setShowSingleChannelAsColor(bool asColor);

434
    bool hidePopups(bool defaultValue = false) const;
435 436
    void setHidePopups(bool hidepopups);

437
    int numDefaultLayers(bool defaultValue = false) const;
438 439
    void setNumDefaultLayers(int num);

440
    quint8 defaultBackgroundOpacity(bool defaultValue = false) const;
441 442
    void setDefaultBackgroundOpacity(quint8 value);

443
    QColor defaultBackgroundColor(bool defaultValue = false) const;
444
    void setDefaultBackgroundColor(const QColor &value);
445 446

    enum BackgroundStyle {
447 448 449
        RASTER_LAYER = 0,
        CANVAS_COLOR = 1,
        FILL_LAYER = 2
450 451
    };

452
    BackgroundStyle defaultBackgroundStyle(bool defaultValue = false) const;
453
    void setDefaultBackgroundStyle(BackgroundStyle value);
454

455
    int lineSmoothingType(bool defaultValue = false) const;
456 457
    void setLineSmoothingType(int value);

458
    qreal lineSmoothingDistance(bool defaultValue = false) const;
459 460
    void setLineSmoothingDistance(qreal value);

461
    qreal lineSmoothingTailAggressiveness(bool defaultValue = false) const;
462 463
    void setLineSmoothingTailAggressiveness(qreal value);

464
    bool lineSmoothingSmoothPressure(bool defaultValue = false) const;
465 466
    void setLineSmoothingSmoothPressure(bool value);

467
    bool lineSmoothingScalableDistance(bool defaultValue = false) const;
468 469
    void setLineSmoothingScalableDistance(bool value);

470
    qreal lineSmoothingDelayDistance(bool defaultValue = false) const;
471 472
    void setLineSmoothingDelayDistance(qreal value);

473
    bool lineSmoothingUseDelayDistance(bool defaultValue = false) const;
474 475
    void setLineSmoothingUseDelayDistance(bool value);

476
    bool lineSmoothingFinishStabilizedCurve(bool defaultValue = false) const;
477 478
    void setLineSmoothingFinishStabilizedCurve(bool value);

479
    bool lineSmoothingStabilizeSensors(bool defaultValue = false) const;
480 481
    void setLineSmoothingStabilizeSensors(bool value);

482
    int tabletEventsDelay(bool defaultValue = false) const;
483 484
    void setTabletEventsDelay(int value);

485 486 487
    bool trackTabletEventLatency(bool defaultValue = false) const;
    void setTrackTabletEventLatency(bool value);

488
    bool testingAcceptCompressedTabletEvents(bool defaultValue = false) const;
489 490
    void setTestingAcceptCompressedTabletEvents(bool value);

491 492
    bool shouldEatDriverShortcuts(bool defaultValue = false) const;

493
    bool testingCompressBrushEvents(bool defaultValue = false) const;
494 495
    void setTestingCompressBrushEvents(bool value);

496
    const KoColorSpace* customColorSelectorColorSpace(bool defaultValue = false) const;
497 498
    void setCustomColorSelectorColorSpace(const KoColorSpace *cs);

499
    bool useDirtyPresets(bool defaultValue = false) const;
500 501
    void setUseDirtyPresets(bool value);

502
    bool useEraserBrushSize(bool defaultValue = false) const;
503
    void setUseEraserBrushSize(bool value);
504

505 506
    bool useEraserBrushOpacity(bool defaultValue = false) const;
    void setUseEraserBrushOpacity(bool value);
507

508 509
    QString getMDIBackgroundColor(bool defaultValue = false) const;
    void setMDIBackgroundColor(const QString & v) const;
510

511
    QString getMDIBackgroundImage(bool defaultValue = false) const;
512 513
    void setMDIBackgroundImage(const QString & fileName) const;

514
    int workaroundX11SmoothPressureSteps(bool defaultValue = false) const;
515

516
    bool showCanvasMessages(bool defaultValue = false) const;
517 518
    void setShowCanvasMessages(bool show);

519
    bool compressKra(bool defaultValue = false) const;
520 521
    void setCompressKra(bool compress);

522 523 524
    bool toolOptionsInDocker(bool defaultValue = false) const;
    void setToolOptionsInDocker(bool inDocker);

Eoin O'Neill's avatar
Eoin O'Neill committed
525 526 527
    bool kineticScrollingEnabled(bool defaultValue = false) const;
    void setKineticScrollingEnabled(bool enabled);

528 529 530 531 532 533
    int kineticScrollingGesture(bool defaultValue = false) const;
    void setKineticScrollingGesture(int kineticScroll);

    int kineticScrollingSensitivity(bool defaultValue = false) const;
    void setKineticScrollingSensitivity(int sensitivity);

Eoin O'Neill's avatar
Eoin O'Neill committed
534 535
    bool kineticScrollingHiddenScrollbars(bool defaultValue = false) const;
    void setKineticScrollingHideScrollbars(bool scrollbar);
536

537 538
    void setEnableOpenGLFramerateLogging(bool value) const;
    bool enableOpenGLFramerateLogging(bool defaultValue = false) const;
539

540 541 542
    void setEnableBrushSpeedLogging(bool value) const;
    bool enableBrushSpeedLogging(bool defaultValue = false) const;

543
    void setEnableAmdVectorizationWorkaround(bool value);
544 545
    bool enableAmdVectorizationWorkaround(bool defaultValue = false) const;

546 547 548
    void setDisableAVXOptimizations(bool value);
    bool disableAVXOptimizations(bool defaultValue = false) const;

549 550 551
    bool animationDropFrames(bool defaultValue = false) const;
    void setAnimationDropFrames(bool value);

552 553
    int scrubbingUpdatesDelay(bool defaultValue = false) const;
    void setScrubbingUpdatesDelay(int value);
554

555 556
    int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
    void setScrubbingAudioUpdatesDelay(int value);
557

558 559 560
    int audioOffsetTolerance(bool defaultValue = false) const;
    void setAudioOffsetTolerance(int value);

561 562 563
    bool switchSelectionCtrlAlt(bool defaultValue = false) const;
    void setSwitchSelectionCtrlAlt(bool value);

564 565 566
    bool convertToImageColorspaceOnImport(bool defaultValue = false) const;
    void setConvertToImageColorspaceOnImport(bool value);

567 568 569
    int stabilizerSampleSize(bool defaultValue = false) const;
    void setStabilizerSampleSize(int value);

Alvin Wong's avatar
Alvin Wong committed
570 571
    bool stabilizerDelayedPaint(bool defaultValue = false) const;
    void setStabilizerDelayedPaint(bool value);
572

573 574 575
    bool showBrushHud(bool defaultValue = false) const;
    void setShowBrushHud(bool value);

576 577 578
    QString brushHudSetting(bool defaultValue = false) const;
    void setBrushHudSetting(const QString &value) const;

579 580 581
    bool calculateAnimationCacheInBackground(bool defaultValue = false) const;
    void setCalculateAnimationCacheInBackground(bool value);

582 583 584
    QColor defaultAssistantsColor(bool defaultValue = false) const;
    void setDefaultAssistantsColor(const QColor &color) const;

585 586
    bool autoSmoothBezierCurves(bool defaultValue = false) const;
    void setAutoSmoothBezierCurves(bool value);
587 588 589 590
    
    bool activateTransformToolAfterPaste(bool defaultValue = false) const;
    void setActivateTransformToolAfterPaste(bool value);
    
591 592 593 594 595 596 597 598 599 600
    enum RootSurfaceFormat {
        BT709_G22 = 0,
        BT709_G10,
        BT2020_PQ
    };
    RootSurfaceFormat rootSurfaceFormat(bool defaultValue = false) const;
    void setRootSurfaceFormat(RootSurfaceFormat value);

    static RootSurfaceFormat rootSurfaceFormat(QSettings *displayrc, bool defaultValue = false);
    static void setRootSurfaceFormat(QSettings *displayrc, RootSurfaceFormat value);
601

602 603
    bool useZip64(bool defaultValue = false) const;
    void setUseZip64(bool value);
604

605 606 607 608
    template<class T>
    void writeEntry(const QString& name, const T& value) {
        m_cfg.writeEntry(name, value);
    }
609

610 611 612 613
    template<class T>
    void writeList(const QString& name, const QList<T>& value) {
        m_cfg.writeEntry(name, value);
    }
614

615 616 617 618
    template<class T>
    T readEntry(const QString& name, const T& defaultValue=T()) {
        return m_cfg.readEntry(name, defaultValue);
    }
619

620 621 622 623
    template<class T>
    QList<T> readList(const QString& name, const QList<T>& defaultValue=QList<T>()) {
        return m_cfg.readEntry(name, defaultValue);
    }
624

625

luz paz's avatar
luz paz committed
626
    /// get the profile the color management system has stored for the given screen
627
    static const KoColorProfile* getScreenProfile(int screen);
628

629
private:
630
    KisConfig(const KisConfig&);
631
    KisConfig& operator=(const KisConfig&) const;
632

633

634
private:
Adrian Page's avatar
Adrian Page committed
635
    mutable KConfigGroup m_cfg;
636
    bool m_readOnly;
637 638
};

Patrick Julien's avatar
Patrick Julien committed
639
#endif // KIS_CONFIG_H_