98
100
return m_cfg.readEntry("imageResolutionDef", IMAGE_DEFAULT_RESOLUTION) / 72.0;
103
QString KisConfig::defColorModel() const
105
return m_cfg.readEntry("colorModelDef", KoColorSpaceRegistry::instance()->rgb8()->colorModelId().id());
108
void KisConfig::defColorModel(const QString & model)
110
m_cfg.writeEntry("colorModelDef", model);
113
QString KisConfig::defColorDepth() const
115
return m_cfg.readEntry("colorDepthDef", KoColorSpaceRegistry::instance()->rgb8()->colorDepthId().id());
118
void KisConfig::defColorDepth(const QString & depth)
120
m_cfg.writeEntry("colorDepthDef", depth);
123
QString KisConfig::defColorProfile() const
125
return m_cfg.readEntry("colorProfileDef", KoColorSpaceRegistry::instance()->rgb8()->profile()->name());
128
void KisConfig::defColorProfile(const QString & profile)
130
m_cfg.writeEntry("colorProfileDef", profile);
101
133
void KisConfig::defImageWidth(qint32 width)
103
135
m_cfg.writeEntry("imageWidthDef", width);
154
186
QString KisConfig::printerColorSpace() const
156
return m_cfg.readEntry("printerColorSpace", "RGBA");
188
//TODO currently only rgb8 is supported
189
//return m_cfg.readEntry("printerColorSpace", "RGBA");
190
return QString("RGBA");
159
193
void KisConfig::setPrinterColorSpace(const QString & printerColorSpace)
237
271
m_cfg.writeEntry("useOpenGLShaders", useOpenGLShaders);
274
bool KisConfig::useOpenGLToolOutlineWorkaround() const
276
return m_cfg.readEntry("useOpenGLToolOutlineWorkaround", false);
279
void KisConfig::setUseOpenGLToolOutlineWorkaround(bool useWorkaround)
281
m_cfg.writeEntry("useOpenGLToolOutlineWorkaround", useWorkaround);
240
284
qint32 KisConfig::maxNumberOfThreads()
242
286
return m_cfg.readEntry("maxthreads", QThread::idealThreadCount());
411
455
m_cfg.writeEntry("scrollingcheckers", sc);
458
QColor KisConfig::canvasBorderColor()
460
QColor color(Qt::gray);
461
return m_cfg.readEntry("canvasBorderColor", color);
464
void KisConfig::setCanvasBorderColor(const QColor& color)
466
m_cfg.writeEntry("canvasBorderColor", color);
414
470
QColor KisConfig::checkersColor()
416
472
QColor col(220, 220, 220);
492
548
m_cfg.writeEntry("fast_zoom", useNearestNeigbour);
495
bool KisConfig::useMipmapping()
497
return m_cfg.readEntry("useMipmapping", false);
500
void KisConfig::setUseMipmapping(bool useMipmapping)
502
m_cfg.writeEntry("useMipmapping", useMipmapping);
505
551
bool KisConfig::useSampling()
507
553
return m_cfg.readEntry("sampled_scaling", false);
563
609
m_cfg.writeEntry("ShowRootLayer", showRootLayer);
612
bool KisConfig::showOutlineWhilePainting()
614
return m_cfg.readEntry("ShowOutlineWhilePainting", true);
617
void KisConfig::setShowOutlineWhilePainting(bool showOutlineWhilePainting)
619
m_cfg.writeEntry("ShowOutlineWhilePainting", showOutlineWhilePainting);
566
622
int KisConfig::autoSaveInterval() {
567
623
return m_cfg.readEntry("AutoSaveInterval", KoDocument::defaultAutoSave());
571
627
return m_cfg.writeEntry("AutoSaveInterval", seconds);
630
bool KisConfig::backupFile()
632
return m_cfg.readEntry("CreateBackupFile", true);
635
void KisConfig::setBackupFile(bool backupFile)
637
m_cfg.writeEntry("CreateBackupFile", backupFile);
574
640
quint32 KisConfig::maxCachedImageSize()
576
642
// Let's say, 5 megapixels
648
714
m_cfg.writeEntry("PaintopPopupDetached", detached);
717
QString KisConfig::pressureTabletCurve() const
719
return m_cfg.readEntry("tabletPressureCurve","0,0;1,1;");
722
void KisConfig::setPressureTabletCurve(const QString& curveString) const
724
m_cfg.writeEntry("tabletPressureCurve", curveString);
727
bool KisConfig::zoomWithWheel() const
729
return m_cfg.readEntry("ZoomWithWheel", true);
732
void KisConfig::setZoomWithWheel(const bool zoom) const
734
m_cfg.writeEntry("ZoomWithWheel", zoom);
737
qreal KisConfig::vastScrolling() const
739
return m_cfg.readEntry("vastScrolling", 0.9);
742
void KisConfig::setVastScrolling(const qreal factor) const
744
m_cfg.writeEntry("vastScrolling", factor);
747
int KisConfig::presetChooserViewMode() const
749
return m_cfg.readEntry("presetChooserViewMode", 0);
752
void KisConfig::setPresetChooserViewMode(const int mode)
754
m_cfg.writeEntry("presetChooserViewMode", mode);
757
bool KisConfig::firstRun() const
759
return m_cfg.readEntry("firstRun", true);
762
void KisConfig::setFirstRun(const bool first) const
764
m_cfg.writeEntry("firstRun", first);
767
bool KisConfig::clicklessSpacePan() const
769
return m_cfg.readEntry("clicklessSpacePan", true);
772
void KisConfig::setClicklessSpacePan(const bool toggle) const
774
m_cfg.writeEntry("clicklessSpacePan", toggle);