10#include <QApplication>
15#include <QStandardPaths>
38#include <config-ocio.h>
44#include <QSurfaceFormat>
46#if defined Q_OS_WIN && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
47# include <QtGui/private/qguiapplication_p.h>
48# include <QtGui/qpa/qplatformintegration.h>
56 : m_cfg( KSharedConfig::openConfig()->group(
""))
57 , m_readOnly(readOnly)
68 if (qApp && qApp->thread() != QThread::currentThread()) {
69 dbgKrita.noquote() <<
"WARNING: KisConfig: requested config synchronization from nonGUI thread! Called from:" <<
kisBacktrace();
94 switch(
m_cfg.readEntry(
"backupfilelocation", 0)) {
96 backupDir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
99 backupDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
103 backupDir =
"Same Folder as the File";
117#if defined Q_OS_WIN && QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
119 auto tabletAPIName = [] (
bool useWinTab) {
120 return useWinTab ?
"WinTab" :
"WinInk";
123 QString actualTabletProtocol =
"<unknown>";
125 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
126 if (
auto nativeWindowsApp =
dynamic_cast<QWindowsApplication *
>(QGuiApplicationPrivate::platformIntegration())) {
127 actualTabletProtocol = tabletAPIName(nativeWindowsApp->isWinTabEnabled());
129 KisUsageLogger::log(
"WARNING: Failed to fetch WinTab protocol status: QWindowsApplication is not available");
153 m_cfg.writeEntry(
"touchPainting",
int(
value));
174 return (defaultValue ?
true :
m_cfg.readEntry(
"useProjections",
true));
179 m_cfg.writeEntry(
"useProjections", useProj);
184 return (defaultValue ?
true :
m_cfg.readEntry(
"undoEnabled",
true));
189 m_cfg.writeEntry(
"undoEnabled", undo);
194 return (defaultValue ? 200 :
m_cfg.readEntry(
"undoStackLimit", 200));
199 m_cfg.writeEntry(
"undoStackLimit", limit);
204 return (defaultValue ?
false :
m_cfg.readEntry(
"useCumulativeUndoRedo",
false));
209 m_cfg.writeEntry(
"useCumulativeUndoRedo",
value);
230 return (defaultValue ? 2480 :
m_cfg.readEntry(
"imageWidthDef", 2480));
235 return (defaultValue ? 3508 :
m_cfg.readEntry(
"imageHeightDef", 3508));
240 return (defaultValue ? 300.0 :
m_cfg.readEntry(
"imageResolutionDef", 300.0)) / 72.0;
251 m_cfg.writeEntry(
"colorModelDef", model);
262 m_cfg.writeEntry(
"colorDepthDef", depth);
268 m_cfg.readEntry(
"colorProfileDef",
274 m_cfg.writeEntry(
"colorProfileDef", profile);
279 m_cfg.writeEntry(
"imageWidthDef", width);
284 m_cfg.writeEntry(
"imageHeightDef", height);
289 m_cfg.writeEntry(
"imageResolutionDef", res*72.0);
294 return defaultValue ? 100.0 :
m_cfg.readEntry(
"preferredVectorImportResolution", 100.0);
299 m_cfg.writeEntry(
"preferredVectorImportResolution",
value);
304 return (defaultvalue?
false:
m_cfg.readEntry(
"useDefaultColorSpace",
false));
309 m_cfg.writeEntry(
"useDefaultColorSpace",
value);
316 if (cfg.hasKey(
"newCursorStyle") &&
317 cfg.hasKey(
"newOutlineStyle")) {
319 cfg.deleteEntry(
"cursorStyleDef");
330 int style =
m_cfg.readEntry(
"newCursorStyle",
int(-1));
380 m_cfg.writeEntry(
"newCursorStyle", (
int)style);
386 col.setRgbF(1.0, 0.0, 1.0);
387 return (defaultValue ? col :
m_cfg.readEntry(
"cursorMaincColor", col));
392 m_cfg.writeEntry(
"cursorMaincColor",
v);
401 int style =
m_cfg.readEntry(
"newOutlineStyle",
int(-1));
441 m_cfg.writeEntry(
"newOutlineStyle", (
int)style);
450 int style =
m_cfg.readEntry(
"lastUsedOutlineStyle",
int(-1));
457 m_cfg.writeEntry(
"lastUsedOutlineStyle", (
int)style);
464 return (defaultValue ?
false :
m_cfg.readEntry(
"separateEraserCursor",
false));
469 m_cfg.writeEntry(
"separateEraserCursor",
value);
478 int style =
m_cfg.readEntry(
"eraserCursorStyle",
int(-1));
490 m_cfg.writeEntry(
"eraserCursorStyle", (
int)style);
496 col.setRgbF(0.501961, 1.0, 0.501961);
497 return (defaultValue ? col :
m_cfg.readEntry(
"eraserCursorMaincColor", col));
502 m_cfg.writeEntry(
"eraserCursorMaincColor",
v);
511 int style =
m_cfg.readEntry(
"eraserOutlineStyle",
int(-1));
523 m_cfg.writeEntry(
"eraserOutlineStyle", (
int)style);
539 m_cfg.writeEntry(
"colorSamplerPreviewStyle",
int(style));
547 return m_cfg.readEntry(
"colorSamplerPreviewCircleDiameter", def);
554 m_cfg.writeEntry(
"colorSamplerPreviewCircleDiameter", diameter);
561 return m_cfg.readEntry(
"colorSamplerPreviewCircleThickness", def);
568 m_cfg.writeEntry(
"colorSamplerPreviewCircleThickness", thickness);
575 return m_cfg.readEntry(
"colorSamplerPreviewCircleOutlineEnabled", def);
582 m_cfg.writeEntry(
"colorSamplerPreviewCircleOutlineEnabled", enabled);
589 return m_cfg.readEntry(
"colorSamplerPreviewCircleExtraCirclesEnabled", def);
596 m_cfg.writeEntry(
"colorSamplerPreviewCircleExtraCirclesEnabled", enabled);
602 return m_cfg.readEntry(
"colorSamplerZoomPreviewEnabled", def);
607 m_cfg.writeEntry(
"colorSamplerZoomPreviewEnabled", enabled);
613 return m_cfg.readEntry(
"colorSamplerZoomPreviewScale", def);
619 m_cfg.writeEntry(
"colorSamplerZoomPreviewScale", scale);
633 m_cfg.writeEntry(
"colorSamplerPreviewCirclePosition",
int(position));
638 return (defaultValue ?
false :
m_cfg.readEntry(
"useDirtyPresets",
true));
648 return (defaultValue ?
false :
m_cfg.readEntry(
"useEraserBrushSize",
false));
659 return (defaultValue ?
false :
m_cfg.readEntry(
"useEraserBrushOpacity",
false));
664 m_cfg.writeEntry(
"useEraserBrushOpacity",
value);
670 return (defaultValue ? QPoint(16, 16) :
m_cfg.readEntry(
"defaultGridSpacing", QPoint(16, 16)));
675 m_cfg.writeEntry(
"defaultGridSpacing", gridSpacing);
680 QColor col(77, 77, 77);
683 QString xml = kol.
toXML();
684 return (defaultValue ? xml :
m_cfg.readEntry(
"mdiBackgroundColorXML", xml));
689 m_cfg.writeEntry(
"mdiBackgroundColorXML",
v);
694 return (defaultValue ?
"" :
m_cfg.readEntry(
"mdiBackgroundImage",
""));
699 m_cfg.writeEntry(
"mdiBackgroundImage", filename);
704 return (defaultValue ?
true :
m_cfg.readEntry(
"enableCanvasSurfaceColorSpaceManagement",
true));
709 m_cfg.writeEntry(
"enableCanvasSurfaceColorSpaceManagement",
value);
715 if (qEnvironmentVariableIsSet(
"KRITA_USE_NATIVE_CANVAS_SURFACE")) {
716 useNativeSurfaceForCanvas = qEnvironmentVariableIntValue(
"KRITA_USE_NATIVE_CANVAS_SURFACE");
717 qDebug() <<
"FPS-DEBUG: Krita canvas mode is overridden:" << (useNativeSurfaceForCanvas ?
"native surface" :
"legacy mode") << useNativeSurfaceForCanvas << qEnvironmentVariableIsSet(
"KRITA_USE_NATIVE_CANVAS_SURFACE");
719 return useNativeSurfaceForCanvas;
723 QString modeStr = defaultValue ?
"preferred" :
m_cfg.readEntry(
"canvasSurfaceColorSpaceManagementMode",
"preferred");
725 if (modeStr ==
"preferred") {
727 }
else if (modeStr ==
"rec709g22") {
729 }
else if (modeStr ==
"rec709g10") {
731 }
else if (modeStr ==
"rec2020pq") {
733 }
else if (modeStr ==
"unmanaged") {
745 modeStr =
"preferred";
748 modeStr =
"rec709g22";
751 modeStr =
"rec709g10";
754 modeStr =
"rec2020pq";
757 modeStr =
"unmanaged";
761 m_cfg.writeEntry(
"canvasSurfaceColorSpaceManagementMode", modeStr);
767 QString modeStr = defaultValue ?
"auto" : settings->value(
"canvasSurfaceBitDepthMode",
"auto").toString();
769 if (modeStr ==
"auto") {
771 }
else if (modeStr ==
"8bit") {
773 }
else if (modeStr ==
"10bit") {
796 settings->setValue(
"canvasSurfaceBitDepthMode", modeStr);
801 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
802 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
808 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
809 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
818 if (format.redBufferSize() == 10 &&
819 format.greenBufferSize() == 10 &&
820 format.blueBufferSize() == 10) {
835 const QString defaultProfile =
"sRGB-elle-V2-srgbtrc.icc";
839 const QString screenIdentifierKey =
"monitorProfile" + screenIdentifier;
846 if (!screenIdentifier.isEmpty() &&
m_cfg.hasKey(screenIdentifierKey)) {
847 profile =
m_cfg.readEntry(screenIdentifierKey, defaultProfile);
849 profile =
m_cfg.readEntry(
"monitorProfile" + QString(screen == 0 ?
"": QString(
"_%1").arg(screen)), defaultProfile);
858 m_cfg.writeEntry(
"monitorProfile" + QString(screen == 0 ?
"": QString(
"_%1").arg(screen)),
monitorProfile);
866 if (screen < 0)
return 0;
874 if (!monitorProfileName.isEmpty()) {
902 if (screenNo < 0 || screenNo >= QGuiApplication::screens().
length()) {
905 QScreen* screen = QGuiApplication::screens()[screenNo];
907 QString manufacturer = screen->manufacturer();
908 QString model = screen->model();
909 QString serialNumber = screen->serialNumber();
911 if (manufacturer ==
"" && model ==
"" && serialNumber ==
"") {
915 QString identifier =
QStringList({manufacturer, model, serialNumber}).join(
"_");
921 return (defaultValue ?
"RGBA" :
m_cfg.readEntry(
"workingColorSpace",
"RGBA"));
933 return QString(
"RGBA");
944 return (defaultValue ?
"" :
m_cfg.readEntry(
"printerProfile",
""));
955 return (defaultValue ?
true :
m_cfg.readEntry(
"useBlackPointCompensation",
true));
965 return (defaultValue ?
true :
m_cfg.readEntry(
"allowLCMSOptimization",
true));
975 return (defaultValue ?
false :
m_cfg.readEntry(
"colorsettings/forcepalettecolors",
false));
985 KConfigGroup cfg = KSharedConfig::openConfig()->group(
"advancedColorSelector");
986 return (defaultValue ?
false : cfg.readEntry(
"lastUsedColorsPerDocument",
false));
991 return (defaultValue ?
false :
m_cfg.readEntry(
"showrulers",
false));
996 m_cfg.writeEntry(
"showrulers", rulers);
1001 return (defaultValue ?
false :
m_cfg.readEntry(
"forceShowSaveMessages",
false));
1006 m_cfg.writeEntry(
"forceShowSaveMessages",
value);
1011 return (defaultValue ?
false :
m_cfg.readEntry(
"forceShowAutosaveMessages",
false));
1016 m_cfg.writeEntry(
"forceShowAutosaveMessages",
value);
1021 return (defaultValue ?
true :
m_cfg.readEntry(
"rulersTrackMouse",
true));
1031 return (defaultValue ? 2 :
m_cfg.readEntry(
"pasteBehaviour", 2));
1036 m_cfg.writeEntry(
"pasteBehaviour", renderIntent);
1041 return defaultValue ? 0 :
m_cfg.readEntry(
"pasteFormat", 0);
1046 m_cfg.writeEntry(
"pasteFormat", format);
1052 if (intent > 3) intent = 3;
1053 if (intent < 0) intent = 0;
1059 if (renderIntent > 3) renderIntent = 3;
1060 if (renderIntent < 0) renderIntent = 0;
1061 m_cfg.writeEntry(
"renderIntent", renderIntent);
1070 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1071 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1073 return kritarc.value(
"OpenGLRenderer",
"auto").toString() !=
"none";
1078 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1079 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1081 kritarc.setValue(
"OpenGLRenderer",
"none");
1086 return (defaultValue ? 3 :
m_cfg.readEntry(
"OpenGLFilterMode", 3));
1091 m_cfg.writeEntry(
"OpenGLFilterMode", filteringMode);
1096 m_cfg.writeEntry(
"widgetStyle", name);
1101 return (defaultValue ?
"" :
m_cfg.readEntry(
"widgetStyle",
""));
1106 return (defaultValue ?
true :
m_cfg.readEntry(
"useOpenGLTextureBuffer",
true));
1111 m_cfg.writeEntry(
"useOpenGLTextureBuffer", useBuffer);
1116 return (defaultValue ?
false : settings->value(
"preferXcbEglProvider",
false).toBool());
1121 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1122 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1128 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1129 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1130 kritarc.setValue(
"preferXcbEglProvider",
value);
1135 return (defaultValue ? 256 :
m_cfg.readEntry(
"textureSize", 256));
1140 return (defaultValue ?
false :
m_cfg.readEntry(
"forceOpenGLFenceWorkaround",
false));
1145 return (defaultValue ? 4 :
m_cfg.readEntry(
"numMipmapLevels", 4));
1155 int v =
m_cfg.readEntry(
"gridmainstyle", 0);
1156 v = qBound(0,
v, 2);
1157 return (defaultValue ? 0 :
v);
1162 m_cfg.writeEntry(
"gridmainstyle",
v);
1167 quint32
v =
m_cfg.readEntry(
"gridsubdivisionstyle", 1);
1169 return (defaultValue ? 1 :
v);
1174 m_cfg.writeEntry(
"gridsubdivisionstyle",
v);
1179 int v =
m_cfg.readEntry(
"gridisoverticalstyle", 0);
1180 v = qBound(0,
v, 3);
1181 return (defaultValue ? 0 :
v);
1186 m_cfg.writeEntry(
"gridisoverticalstyle",
v);
1191 QColor col(99, 99, 99);
1192 return (defaultValue ? col :
m_cfg.readEntry(
"gridmaincolor", col));
1197 m_cfg.writeEntry(
"gridmaincolor",
v);
1202 QColor col(150, 150, 150);
1203 return (defaultValue ? col :
m_cfg.readEntry(
"gridsubdivisioncolor", col));
1208 m_cfg.writeEntry(
"gridsubdivisioncolor",
v);
1213 QColor col(150, 150, 150);
1214 return (defaultValue ? col :
m_cfg.readEntry(
"gridisoverticalcolor", col));
1219 m_cfg.writeEntry(
"gridisoverticalcolor",
v);
1224 QColor col(255, 255, 255);
1225 return (defaultValue ? col :
m_cfg.readEntry(
"pixelGridColor", col));
1230 m_cfg.writeEntry(
"pixelGridColor",
v);
1235 qreal border = 24.0f;
1236 return (defaultValue ? border :
m_cfg.readEntry(
"pixelGridDrawingThreshold", border));
1241 m_cfg.writeEntry(
"pixelGridDrawingThreshold",
v);
1246 bool enabled =
true;
1247 return (defaultValue ? enabled :
m_cfg.readEntry(
"pixelGridEnabled", enabled));
1252 m_cfg.writeEntry(
"pixelGridEnabled",
v);
1257 int v =
m_cfg.readEntry(
"guidesLineStyle", 0);
1258 v = qBound(0,
v, 2);
1259 return (defaultValue ? 0 :
v);
1264 m_cfg.writeEntry(
"guidesLineStyle",
v);
1269 QColor col(99, 99, 99);
1270 return (defaultValue ? col :
m_cfg.readEntry(
"guidesColor", col));
1275 m_cfg.writeEntry(
"guidesColor",
v);
1283 *config = defaultConfig;
1300 m_cfg.writeEntry(
"globalSnapNode", config.
node());
1306 m_cfg.writeEntry(
"globalSnapToPixel", config.
toPixel());
1311 qint32 size = (defaultValue ? 32 :
m_cfg.readEntry(
"checksize", 32));
1312 if (size == 0) size = 32;
1318 if (checksize == 0) {
1321 m_cfg.writeEntry(
"checksize", checksize);
1326 return (defaultValue ?
false :
m_cfg.readEntry(
"scrollingcheckers",
false));
1331 m_cfg.writeEntry(
"scrollingcheckers", sc);
1336 QColor color(QColor(128,128,128));
1337 return (defaultValue ? color :
m_cfg.readEntry(
"canvasBorderColor", color));
1342 m_cfg.writeEntry(
"canvasBorderColor", color);
1347 return (defaultValue ?
false :
m_cfg.readEntry(
"hideScrollbars",
false));
1357 return (defaultValue ?
true :
m_cfg.readEntry(
"scrollbarZoomEnabled",
true));
1362 m_cfg.writeEntry(
"scrollbarZoomEnabled", enabled);
1367 QColor col(220, 220, 220);
1368 return (defaultValue ? col :
m_cfg.readEntry(
"checkerscolor", col));
1373 m_cfg.writeEntry(
"checkerscolor",
v);
1378 return (defaultValue ? QColor(Qt::white) :
m_cfg.readEntry(
"checkerscolor2", QColor(Qt::white)));
1383 m_cfg.writeEntry(
"checkerscolor2",
v);
1388 return (defaultValue ?
true :
m_cfg.readEntry(
"antialiascurves",
true));
1393 m_cfg.writeEntry(
"antialiascurves",
v);
1398 return (defaultValue ?
false :
m_cfg.readEntry(
"AntialiasSelectionOutline",
false));
1403 m_cfg.writeEntry(
"AntialiasSelectionOutline",
v);
1408 return (defaultValue ?
false :
m_cfg.readEntry(
"ShowRootLayer",
false));
1418 return (defaultValue ?
false :
m_cfg.readEntry(
"ShowGlobalSelection",
false));
1430 return (defaultValue ?
true :
m_cfg.readEntry(
"ShowOutlineWhilePainting",
true));
1440 return (defaultValue ?
false :
m_cfg.readEntry(
"forceAlwaysFullSizedOutline",
false));
1445 m_cfg.writeEntry(
"forceAlwaysFullSizedOutline",
value);
1452 return (defaultValue ?
true :
m_cfg.readEntry(
"ShowEraserOutlineWhilePainting",
true));
1462 return (defaultValue ?
false :
m_cfg.readEntry(
"forceAlwaysFullSizedEraserOutline",
false));
1467 m_cfg.writeEntry(
"forceAlwaysFullSizedEraserOutline",
value);
1477 m_cfg.writeEntry(
"sessionOnStartup", (
int)
value);
1492 return defaultValue ? false :
m_cfg.readEntry(
"saveSessionOnQuit",
false);
1496 m_cfg.writeEntry(
"saveSessionOnQuit",
value);
1501 return defaultValue ? false :
m_cfg.readEntry(
"hideDevFundBanner",
false);
1506 m_cfg.writeEntry(
"hideDevFundBanner",
value);
1511 return (defaultValue ? 1.0 :
m_cfg.readEntry(
"OutlineSizeMinimum", 1.0));
1521 return (defaultValue ? 5.0 :
m_cfg.readEntry(
"SelectionViewSizeMinimum", 5.0));
1532 return (defaultValue ? def :
m_cfg.readEntry(
"AutoSaveInterval", def));
1537 return m_cfg.writeEntry(
"AutoSaveInterval", seconds);
1542 return (defaultValue ?
true :
m_cfg.readEntry(
"CreateBackupFile",
true));
1552 return (defaultValue ?
false :
m_cfg.readEntry(
"showFilterGallery",
false));
1562 return (defaultValue ?
true :
m_cfg.readEntry(
"showFilterGalleryLayerMaskDialog",
true));
1572 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1573 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1574 return (defaultValue ?
"OPENGL_NOT_TRIED" : kritarc.value(
"canvasState",
"OPENGL_NOT_TRIED").toString());
1580 if (acceptableStates.isEmpty()) {
1581 acceptableStates <<
"OPENGL_SUCCESS" <<
"TRY_OPENGL" <<
"OPENGL_NOT_TRIED" <<
"OPENGL_FAILED";
1583 if (acceptableStates.contains(state)) {
1584 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1585 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1586 kritarc.setValue(
"canvasState", state);
1592 return (defaultValue ?
false :
m_cfg.readEntry(
"ToolOptionsPopupDetached",
false));
1597 m_cfg.writeEntry(
"ToolOptionsPopupDetached", detached);
1603 return (defaultValue ?
true :
m_cfg.readEntry(
"PaintopPopupDetached",
true));
1608 m_cfg.writeEntry(
"PaintopPopupDetached", detached);
1622 fallback = QStringLiteral(
"0,0;0.7,1;");
1625 return (defaultValue ? fallback :
m_cfg.readEntry(
"tabletPressureCurve", fallback));
1630 m_cfg.writeEntry(
"tabletPressureCurve", curveString);
1636 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1637 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1641 Q_UNUSED(defaultValue);
1653 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
1654 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
1665 return defaultValue ? false : settings->value(
"useWin8PointerInput",
false).toBool();
1670 settings->setValue(
"useWin8PointerInput",
value);
1675 return (defaultValue ?
false :
m_cfg.readEntry(
"useRightMiddleTabletButtonWorkaround",
false));
1680 m_cfg.writeEntry(
"useRightMiddleTabletButtonWorkaround",
value);
1684bool KisConfig::usePageUpDownMouseButtonEmulationWorkaround(
bool defaultValue)
const
1690 return m_cfg.readEntry(
"usePageUpDownMouseButtonEmulationWorkaround", fallback);
1694void KisConfig::setUsePageUpDownMouseButtonEmulationWorkaround(
bool value)
1696 m_cfg.writeEntry(
"usePageUpDownMouseButtonEmulationWorkaround",
value);
1700bool KisConfig::useHighFunctionKeyMouseButtonEmulationWorkaround(
bool defaultValue)
const
1709 return m_cfg.readEntry(
"useHighFunctionKeyMouseButtonEmulationWorkaround",
true);
1713void KisConfig::setUseHighFunctionKeyMouseButtonEmulationWorkaround(
bool value)
1715 m_cfg.writeEntry(
"useHighFunctionKeyMouseButtonEmulationWorkaround",
value);
1719bool KisConfig::useIgnoreHistoricTabletEventsWorkaround(
bool defaultValue)
const
1725 return m_cfg.readEntry(
"useIgnoreHistoricTabletEventsWorkaround", fallback);
1729void KisConfig::setUseIgnoreHistoricTabletEventsWorkaround(
bool value)
1731 m_cfg.writeEntry(
"useIgnoreHistoricTabletEventsWorkaround",
value);
1735bool KisConfig::hideTouchAndStylusCursorsWorkaround(
bool defaultValue)
const
1741 return m_cfg.readEntry(
"hideTouchAndStylusCursorsWorkaround", fallback);
1745void KisConfig::setHideTouchAndStylusCursorsWorkaround(
bool value)
1747 m_cfg.writeEntry(
"hideTouchAndStylusCursorsWorkaround",
value);
1751qreal KisConfig::androidScalingLastInitialScale(
bool defaultValue)
const
1756 return m_cfg.readEntry(
"androidScalingLastInitialScale", 0.0);
1760void KisConfig::setAndroidScalingLastInitialScale(qreal
value)
1762 m_cfg.writeEntry(
"androidScalingLastInitialScale",
value);
1765qreal KisConfig::androidScalingTargetScale(
bool defaultValue)
const
1770 return m_cfg.readEntry(
"androidScalingTargetScale", 0.0);
1774void KisConfig::setAndroidScalingTargetScale(qreal
value)
1776 m_cfg.writeEntry(
"androidScalingTargetScale",
value);
1779bool KisConfig::androidScalingAskOnStartup(
bool defaultValue)
const
1784 return m_cfg.readEntry(
"androidScalingAskOnStartup",
true);
1788void KisConfig::setAndroidScalingAskOnStartup(
bool value)
1790 m_cfg.writeEntry(
"androidScalingAskOnStartup",
value);
1796 return (defaultValue ? 0.9 :
m_cfg.readEntry(
"vastScrolling", 0.9));
1801 m_cfg.writeEntry(
"vastScrolling", factor);
1807 return std::min(2, (defaultValue ? 1 :
m_cfg.readEntry(
"presetChooserViewMode", 1)));
1812 m_cfg.writeEntry(
"presetChooserViewMode", mode);
1817 return (defaultValue ? 60 :
m_cfg.readEntry(
"presetIconSize", 60));
1827 return (defaultValue ?
true :
m_cfg.readEntry(
"firstRun",
true));
1832 m_cfg.writeEntry(
"firstRun", first);
1840 return m_cfg.readEntry(QStringLiteral(
"splashScreenImage"), QString());
1846 m_cfg.writeEntry(QStringLiteral(
"splashScreenImage"),
value);
1851 return (defaultValue ? 1 :
m_cfg.readEntry(
"horizontalSplitLines", 1));
1855 m_cfg.writeEntry(
"horizontalSplitLines", numberLines);
1860 return (defaultValue ? 1 :
m_cfg.readEntry(
"verticalSplitLines", 1));
1865 m_cfg.writeEntry(
"verticalSplitLines", numberLines);
1870 return (defaultValue ?
true :
m_cfg.readEntry(
"clicklessSpacePan",
true));
1875 m_cfg.writeEntry(
"clicklessSpacePan", toggle);
1881 return (defaultValue ?
true :
m_cfg.readEntry(
"hideDockersFullScreen",
true));
1886 m_cfg.writeEntry(
"hideDockersFullScreen",
value);
1891 return (defaultValue ?
true :
m_cfg.readEntry(
"showDockerTitleBars",
true));
1896 m_cfg.writeEntry(
"showDockerTitleBars",
value);
1901 return (defaultValue ?
true :
m_cfg.readEntry(
"showDockers",
true));
1911 return (defaultValue ?
true :
m_cfg.readEntry(
"showStatusBar",
true));
1921 return (defaultValue ?
true:
m_cfg.readEntry(
"hideMenuFullScreen",
true));
1926 m_cfg.writeEntry(
"hideMenuFullScreen",
value);
1931 return (defaultValue ?
true :
m_cfg.readEntry(
"hideScrollbarsFullScreen",
true));
1936 m_cfg.writeEntry(
"hideScrollbarsFullScreen",
value);
1941 return (defaultValue ?
true:
m_cfg.readEntry(
"hideStatusbarFullScreen",
true));
1946 m_cfg.writeEntry(
"hideStatusbarFullScreen",
value);
1951 return (defaultValue ?
true :
m_cfg.readEntry(
"hideTitleBarFullscreen",
true));
1956 m_cfg.writeEntry(
"hideTitleBarFullscreen",
value);
1961 return (defaultValue ?
true :
m_cfg.readEntry(
"hideToolbarFullscreen",
true));
1966 m_cfg.writeEntry(
"hideToolbarFullscreen",
value);
1971 return (defaultValue ?
true :
m_cfg.readEntry(
"fullscreenMode",
false));
1982 m_cfg.readEntry(
"favoriteCompositeOps",
1983 QString(
"normal,erase,multiply,burn,darken,add,dodge,screen,overlay,soft_light_svg,luminize,lighten,saturation,color,divide").split(
',')));
1988 m_cfg.writeEntry(
"favoriteCompositeOps", compositeOps);
1993 return (defaultValue ? QString() :
m_cfg.readEntry(
"ExportConfiguration-" + filterId, QString()));
2000 cfg->fromXML(xmlData);
2006 QString exportConfig = properties->toXML();
2007 m_cfg.writeEntry(
"ExportConfiguration-" + filterId, exportConfig);
2012 return (defaultValue ? QString() :
m_cfg.readEntry(
"ImportConfiguration-" + filterId, QString()));
2017 QString importConfig = properties->toXML();
2018 m_cfg.writeEntry(
"ImportConfiguration-" + filterId, importConfig);
2024 return (defaultValue ?
false :
m_cfg.readEntry(
"Krita/Ocio/UseOcio",
false));
2026 Q_UNUSED(defaultValue);
2033 m_cfg.writeEntry(
"Krita/Ocio/UseOcio", useOCIO);
2038 return (defaultValue ? 10:
m_cfg.readEntry(
"numFavoritePresets", 10));
2043 m_cfg.writeEntry(
"numFavoritePresets",
value);
2048 return (defaultValue ?
false :
m_cfg.readEntry(
"levelOfDetailEnabled",
false));
2053 m_cfg.writeEntry(
"levelOfDetailEnabled",
value);
2060 if (!defaultValue) {
2063 cfg.
lutPath =
m_cfg.readEntry(
"Krita/Ocio/OcioLutPath", QString());
2073 m_cfg.writeEntry(
"Krita/Ocio/OcioColorManagementMode", (
int) cfg.
mode);
2075 m_cfg.writeEntry(
"Krita/Ocio/OcioLutPath", cfg.
lutPath);
2085 :
m_cfg.readEntry(
"Krita/Ocio/OcioColorManagementMode", (
int)
INTERNAL));
2091 m_cfg.writeEntry(
"Krita/Ocio/OcioColorManagementMode", (
int) mode);
2096 return (defaultValue ? 64 :
m_cfg.readEntry(
"Krita/Ocio/LutEdgeSize", 64));
2101 m_cfg.writeEntry(
"Krita/Ocio/LutEdgeSize",
value);
2106 return (defaultValue ?
false :
m_cfg.readEntry(
"Krita/Ocio/OcioLockColorVisualRepresentation",
false));
2111 m_cfg.writeEntry(
"Krita/Ocio/OcioLockColorVisualRepresentation",
value);
2116 return (defaultValue ? QString() :
m_cfg.readEntry(
"defaultPalette",
"Default"));
2121 m_cfg.writeEntry(
"defaultPalette", name);
2126 QString def =
"flow";
2127 if (sliderNumber == 1) {
2130 if (sliderNumber == 2) {
2133 return (defaultValue ? def :
m_cfg.readEntry(QString(
"toolbarslider_%1").arg(sliderNumber), def));
2138 m_cfg.writeEntry(QString(
"toolbarslider_%1").arg(sliderNumber), slider);
2143 return (defaultValue ? 20 :
m_cfg.readEntry(
"layerThumbnailSize", 20));
2148 m_cfg.writeEntry(
"layerThumbnailSize", size);
2153 return (defaultValue ? 50 :
m_cfg.readEntry(
"layerTreeIndentation", 50));
2158 m_cfg.writeEntry(
"layerTreeIndentation", percentage);
2163 return (defaultValue ?
true :
m_cfg.readEntry(
"sliderLabels",
true));
2168 m_cfg.writeEntry(
"sliderLabels", enabled);
2173 return (defaultValue ? QString() :
m_cfg.readEntry(
"currentInputProfile", QString()));
2178 m_cfg.writeEntry(
"currentInputProfile", name);
2183 return (defaultValue ?
true :
m_cfg.readEntry(
"presetStripVisible",
true));
2188 m_cfg.writeEntry(
"presetStripVisible", visible);
2193 return (defaultValue ?
true :
m_cfg.readEntry(
"scratchpadVisible",
true));
2198 m_cfg.writeEntry(
"scratchpadVisible", visible);
2203 return (defaultValue ?
false :
m_cfg.readEntry(
"showSingleChannelAsColor",
false));
2208 m_cfg.writeEntry(
"showSingleChannelAsColor", asColor);
2213 return (defaultValue ?
false :
m_cfg.readEntry(
"hidePopups",
false));
2223 return (defaultValue ? 2 :
m_cfg.readEntry(dialogType +
"NumberOfLayersForNewImage", 2));
2228 m_cfg.writeEntry(dialogType +
"NumberOfLayersForNewImage", num);
2238 m_cfg.writeEntry(dialogType +
"BackgroundOpacityForNewImage", (
int)
value);
2243 return (defaultValue ? QColor(Qt::white) :
m_cfg.readEntry(dialogType +
"BackgroundColorForNewImage", QColor(Qt::white)));
2248 m_cfg.writeEntry(dialogType +
"BackgroundColorForNewImage",
value);
2258 m_cfg.writeEntry(dialogType +
"BackgroundStyleForNewImage", (
int)
value);
2263 return (defaultValue ? 1 :
m_cfg.readEntry(
"LineSmoothingType", 1));
2268 m_cfg.writeEntry(
"LineSmoothingType",
value);
2273 return (defaultValue ? 50.0 :
m_cfg.readEntry(
"LineSmoothingDistanceMin", 50.0));
2278 m_cfg.writeEntry(
"LineSmoothingDistanceMin",
value);
2283 return (defaultValue ? 50.0 :
m_cfg.readEntry(
"LineSmoothingDistanceMax", 50.0));
2288 m_cfg.writeEntry(
"LineSmoothingDistanceMax",
value);
2293 return (defaultValue ?
true :
m_cfg.readEntry(
"LineSmoothingDistanceKeepAspectRatio",
true));
2298 m_cfg.writeEntry(
"LineSmoothingDistanceKeepAspectRatio",
value);
2303 return (defaultValue ? 0.15 :
m_cfg.readEntry(
"LineSmoothingTailAggressiveness", 0.15));
2308 m_cfg.writeEntry(
"LineSmoothingTailAggressiveness",
value);
2313 return (defaultValue ?
false :
m_cfg.readEntry(
"LineSmoothingSmoothPressure",
false));
2318 m_cfg.writeEntry(
"LineSmoothingSmoothPressure",
value);
2323 return (defaultValue ?
true :
m_cfg.readEntry(
"LineSmoothingScalableDistance",
true));
2328 m_cfg.writeEntry(
"LineSmoothingScalableDistance",
value);
2333 return (defaultValue ? 50.0 :
m_cfg.readEntry(
"LineSmoothingDelayDistance", 50.0));
2338 m_cfg.writeEntry(
"LineSmoothingDelayDistance",
value);
2343 return (defaultValue ?
true :
m_cfg.readEntry(
"LineSmoothingUseDelayDistance",
true));
2348 m_cfg.writeEntry(
"LineSmoothingUseDelayDistance",
value);
2353 return (defaultValue ?
true :
m_cfg.readEntry(
"LineSmoothingFinishStabilizedCurve",
true));
2358 m_cfg.writeEntry(
"LineSmoothingFinishStabilizedCurve",
value);
2363 return (defaultValue ?
true :
m_cfg.readEntry(
"LineSmoothingStabilizeSensors",
true));
2368 m_cfg.writeEntry(
"LineSmoothingStabilizeSensors",
value);
2373 return (defaultValue ? 10 :
m_cfg.readEntry(
"tabletEventsDelay", 10));
2378 m_cfg.writeEntry(
"tabletEventsDelay",
value);
2383 return (defaultValue ?
false :
m_cfg.readEntry(
"trackTabletEventLatency",
false));
2388 m_cfg.writeEntry(
"trackTabletEventLatency",
value);
2393 return (defaultValue ?
true :
m_cfg.readEntry(
"ignoreHighFunctionKeys",
true));
2398 m_cfg.writeEntry(
"ignoreHighFunctionKeys",
value);
2403 return (defaultValue ?
false :
m_cfg.readEntry(
"testingAcceptCompressedTabletEvents",
false));
2408 m_cfg.writeEntry(
"testingAcceptCompressedTabletEvents",
value);
2413 return (defaultValue ?
false :
m_cfg.readEntry(
"shouldEatDriverShortcuts",
false));
2418 return (defaultValue ?
false :
m_cfg.readEntry(
"testingCompressBrushEvents",
false));
2423 m_cfg.writeEntry(
"testingCompressBrushEvents",
value);
2428 return (defaultValue ? 0 :
m_cfg.readEntry(
"workaroundX11SmoothPressureSteps", 0));
2433 return (defaultValue ?
true :
m_cfg.readEntry(
"showOnCanvasMessages",
true));
2438 m_cfg.writeEntry(
"showOnCanvasMessages", show);
2443 return (defaultValue ?
false :
m_cfg.readEntry(
"compressLayersInKra",
false));
2448 m_cfg.writeEntry(
"compressLayersInKra", compress);
2453 return (defaultValue ?
false :
m_cfg.readEntry(
"TrimKra",
false));
2458 m_cfg.writeEntry(
"TrimKra", trim);
2463 return (defaultValue ?
false :
m_cfg.readEntry(
"TrimFramesImport",
false));
2467 m_cfg.writeEntry(
"TrimFramesImport", trim);
2472 return (defaultValue ? 0 :
m_cfg.readEntry(
"defaultExportMimeType", QString()));
2477 m_cfg.writeEntry(
"defaultExportMimeType", defaultExportMimeType);
2482 return (defaultValue ?
true :
m_cfg.readEntry(
"ToolOptionsInDocker",
true));
2487 m_cfg.writeEntry(
"ToolOptionsInDocker", inDocker);
2492 return (defaultValue ?
true :
m_cfg.readEntry(
"KineticScrollingEnabled",
true));
2497 m_cfg.writeEntry(
"KineticScrollingEnabled",
value);
2503 int defaultGesture = 1;
2505 int defaultGesture = 2;
2508 return (defaultValue ? defaultGesture :
m_cfg.readEntry(
"KineticScrollingGesture", defaultGesture));
2513 m_cfg.writeEntry(
"KineticScrollingGesture", gesture);
2518 return (defaultValue ? 75 :
m_cfg.readEntry(
"KineticScrollingSensitivity", 75));
2523 m_cfg.writeEntry(
"KineticScrollingSensitivity", sensitivity);
2528 return (defaultValue ?
false :
m_cfg.readEntry(
"KineticScrollingHideScrollbar",
false));
2533 m_cfg.writeEntry(
"KineticScrollingHideScrollbar", scrollbar);
2538 return (defaultValue ? 2 :
m_cfg.readEntry(
"zoomSteps", 2));
2543 m_cfg.writeEntry(
"zoomSteps", steps);
2548 return (defaultValue ? 0 :
m_cfg.readEntry(
"zoomMarginSize", 0));
2560 KConfigGroup cfg = KSharedConfig::openConfig()->group(
"advancedColorSelector");
2561 if (defaultValue || cfg.readEntry(
"useCustomColorSpace",
true)) {
2563 QString modelID = cfg.readEntry(
"customColorSpaceModel",
"RGBA");
2564 QString depthID = cfg.readEntry(
"customColorSpaceDepthID",
"U8");
2565 QString profile = cfg.readEntry(
"customColorSpaceProfile",
"sRGB built-in - (lcms internal)");
2566 if (profile ==
"default") {
2568 profile =
"sRGB built-in - (lcms internal)";
2570 cs = csr->
colorSpace(modelID, depthID, profile);
2578 KConfigGroup cfg = KSharedConfig::openConfig()->group(
"advancedColorSelector");
2579 cfg.writeEntry(
"useCustomColorSpace",
bool(cs));
2581 cfg.writeEntry(
"customColorSpaceModel", cs->
colorModelId().
id());
2582 cfg.writeEntry(
"customColorSpaceDepthID", cs->
colorDepthId().
id());
2583 cfg.writeEntry(
"customColorSpaceProfile", cs->
profile()->
name());
2589 return (defaultValue ?
false :
m_cfg.readEntry(
"enableOpenGLFramerateLogging",
false));
2594 m_cfg.writeEntry(
"enableOpenGLFramerateLogging",
value);
2599 return (defaultValue ?
false :
m_cfg.readEntry(
"enableBrushSpeedLogging",
false));
2604 m_cfg.writeEntry(
"enableBrushSpeedLogging",
value);
2610 m_cfg.writeEntry(
"amdDisableVectorWorkaround",
value);
2616 return (defaultValue ?
false :
m_cfg.readEntry(
"amdDisableVectorWorkaround",
false));
2621 m_cfg.writeEntry(
"disableAVXOptimizations",
value);
2626 return (defaultValue ?
false :
m_cfg.readEntry(
"disableAVXOptimizations",
false));
2631 m_cfg.writeEntry(
"animationPlaybackBackend",
value);
2636 return (defaultValue ? 1 :
m_cfg.readEntry(
"animationPlaybackBackend", 1));
2643 if (
value == oldValue)
return;
2645 m_cfg.writeEntry(
"animationDropFrames",
value);
2651 return (defaultValue ?
true :
m_cfg.readEntry(
"autoPinLayers",
true));
2661 return (defaultValue ?
true :
m_cfg.readEntry(
"adaptivePlaybackRange",
true));
2666 m_cfg.writeEntry(
"adaptivePlaybackRange",
value);
2671 return (defaultValue ?
true :
m_cfg.readEntry(
"autoZoomTimelineToPlaybackRange",
true));
2676 m_cfg.writeEntry(
"autoZoomTimelineToPlaybackRange",
value);
2680 return (defaultValue ?
"" :
m_cfg.readEntry(
"ffmpegLocation",
""));
2689 return (defaultValue ? 1.0f :
m_cfg.readEntry(
"timelineZoom", 1.0f));
2699 return (defaultValue ?
true :
m_cfg.readEntry(
"animationDropFrames",
true));
2704 return (defaultValue ? 30 :
m_cfg.readEntry(
"scrubbingUpdatesDelay", 30));
2709 m_cfg.writeEntry(
"scrubbingUpdatesDelay",
value);
2714 return (defaultValue ? -1 :
m_cfg.readEntry(
"scrubbingAudioUpdatesDelay", -1));
2719 m_cfg.writeEntry(
"scrubbingAudioUpdatesDelay",
value);
2724 return (defaultValue ? -1 :
m_cfg.readEntry(
"audioOffsetTolerance", -1));
2729 m_cfg.writeEntry(
"audioOffsetTolerance",
value);
2734 return defaultValue ? false :
m_cfg.readEntry(
"switchSelectionCtrlAlt",
false);
2739 m_cfg.writeEntry(
"switchSelectionCtrlAlt",
value);
2744 return defaultValue ? false :
m_cfg.readEntry(
"ConvertToImageColorSpaceOnImport",
false);
2749 m_cfg.writeEntry(
"ConvertToImageColorSpaceOnImport",
value);
2755 const int defaultSampleSize = 50;
2757 const int defaultSampleSize = 15;
2760 return defaultValue ?
2761 defaultSampleSize :
m_cfg.readEntry(
"stabilizerSampleSize", defaultSampleSize);
2766 m_cfg.writeEntry(
"stabilizerSampleSize",
value);
2771 const bool defaultEnabled =
true;
2773 return defaultValue ?
2774 defaultEnabled :
m_cfg.readEntry(
"stabilizerDelayedPaint", defaultEnabled);
2779 m_cfg.writeEntry(
"stabilizerDelayedPaint",
value);
2784 return defaultValue ? false :
m_cfg.readEntry(
"showBrushHud",
false);
2794 return defaultValue ? true :
m_cfg.readEntry(
"showPaletteBottomBar",
true);
2799 m_cfg.writeEntry(
"showPaletteBottomBar",
value);
2804 QString defaultDoc =
"<!DOCTYPE hud_properties>\n<hud_properties>\n <version value=\"1\" type=\"value\"/>\n <paintbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"angle\" type=\"value\"/>\n </properties_list>\n </paintbrush>\n <colorsmudge>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"smudge_mode\" type=\"value\"/>\n <item_3 value=\"smudge_length\" type=\"value\"/>\n <item_4 value=\"smudge_color_rate\" type=\"value\"/>\n </properties_list>\n </colorsmudge>\n <sketchbrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"size\" type=\"value\"/>\n </properties_list>\n </sketchbrush>\n <hairybrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n </properties_list>\n </hairybrush>\n <experimentbrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"shape_windingfill\" type=\"value\"/>\n </properties_list>\n </experimentbrush>\n <spraybrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"spray_particlecount\" type=\"value\"/>\n <item_3 value=\"spray_density\" type=\"value\"/>\n </properties_list>\n </spraybrush>\n <hatchingbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"hatching_angle\" type=\"value\"/>\n <item_3 value=\"hatching_thickness\" type=\"value\"/>\n <item_4 value=\"hatching_separation\" type=\"value\"/>\n </properties_list>\n </hatchingbrush>\n <gridbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"grid_divisionlevel\" type=\"value\"/>\n </properties_list>\n </gridbrush>\n <curvebrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"curve_historysize\" type=\"value\"/>\n <item_2 value=\"curve_linewidth\" type=\"value\"/>\n <item_3 value=\"curve_lineopacity\" type=\"value\"/>\n <item_4 value=\"curve_connectionline\" type=\"value\"/>\n </properties_list>\n </curvebrush>\n <dynabrush>\n <properties_list type=\"array\">\n <item_0 value=\"dyna_diameter\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"dyna_mass\" type=\"value\"/>\n <item_3 value=\"dyna_drag\" type=\"value\"/>\n </properties_list>\n </dynabrush>\n <particlebrush>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"particle_particles\" type=\"value\"/>\n <item_2 value=\"particle_opecityweight\" type=\"value\"/>\n <item_3 value=\"particle_iterations\" type=\"value\"/>\n </properties_list>\n </particlebrush>\n <duplicate>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"clone_healing\" type=\"value\"/>\n <item_3 value=\"clone_movesource\" type=\"value\"/>\n </properties_list>\n </duplicate>\n <deformbrush>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n <item_2 value=\"deform_amount\" type=\"value\"/>\n <item_3 value=\"deform_mode\" type=\"value\"/>\n </properties_list>\n </deformbrush>\n <tangentnormal>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n </properties_list>\n </tangentnormal>\n <filter>\n <properties_list type=\"array\">\n <item_0 value=\"size\" type=\"value\"/>\n <item_1 value=\"opacity\" type=\"value\"/>\n </properties_list>\n </filter>\n <roundmarker>\n <properties_list type=\"array\">\n <item_0 value=\"opacity\" type=\"value\"/>\n <item_1 value=\"size\" type=\"value\"/>\n </properties_list>\n </roundmarker>\n</hud_properties>\n";
2805 return defaultValue ? defaultDoc :
m_cfg.readEntry(
"brushHudSettings", defaultDoc);
2815 return defaultValue ? true :
m_cfg.readEntry(
"calculateAnimationCacheInBackground",
true);
2820 m_cfg.writeEntry(
"calculateAnimationCacheInBackground",
value);
2825 static const QColor defaultColor = QColor(176, 176, 176, 255);
2826 return defaultValue ? defaultColor :
m_cfg.readEntry(
"defaultAssistantsColor", defaultColor);
2831 m_cfg.writeEntry(
"defaultAssistantsColor", color);
2836 return defaultValue ? false :
m_cfg.readEntry(
"autoSmoothBezierCurves",
false);
2841 m_cfg.writeEntry(
"autoSmoothBezierCurves",
value);
2846 return defaultValue ? false :
m_cfg.readEntry(
"activateTransformToolAfterPaste",
false);
2851 m_cfg.writeEntry(
"activateTransformToolAfterPaste",
value);
2856 return defaultValue ? false :
m_cfg.readEntry(
"zoomHorizontal",
false);
2866 return defaultValue ? true :
m_cfg.readEntry(
"selectionActionBar",
true);
2871 m_cfg.writeEntry(
"selectionActionBar",
value);
2881 m_cfg.writeEntry(
"selectionActionBarBehavior", (
int)
value);
2891 m_cfg.writeEntry(
"selectionActionBarPosition", (
int)
value);
2901 m_cfg.writeEntry(
"selectionActionBarOrientation", (
int)
value);
2906 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2907 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
2914 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2915 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
2922 QString textValue =
"bt709-g22";
2924 if (!defaultValue) {
2925 textValue = displayrc->value(
"rootSurfaceFormat", textValue).toString();
2928 return textValue ==
"bt709-g10" ?
BT709_G10 :
2935 const QString textValue =
2940 displayrc->setValue(
"rootSurfaceFormat", textValue);
2945 return defaultValue ? false :
m_cfg.readEntry(
"UseZip64",
false);
2955 return defaultValue ? true :
m_cfg.readEntry(
"convertLayerColorSpaceInProperties",
true);
2960 m_cfg.writeEntry(
"convertLayerColorSpaceInProperties",
value);
2965 return defaultValue ? true :
m_cfg.readEntry(
"renamePastedLayers",
true);
2970 m_cfg.writeEntry(
"renamePastedLayers",
value);
2980 m_cfg.writeEntry(
"layerInfoTextStyle", (
int)
value);
2985 return defaultValue ? 55 :
m_cfg.readEntry(
"layerInfoTextOpacity", 55);
2990 m_cfg.writeEntry(
"layerInfoTextOpacity",
value);
2995 return defaultValue ? false :
m_cfg.readEntry(
"useInlineLayerInfoText",
false);
3000 m_cfg.writeEntry(
"useInlineLayerInfoText",
value);
3005 return defaultValue ? false :
m_cfg.readEntry(
"useLayerSelectionCheckbox",
true);
3010 m_cfg.writeEntry(
"useLayerSelectionCheckbox",
value);
3025 m_cfg.writeEntry(
"assistantsDrawMode",
static_cast<int>(
value));
3031 bool defaultEnabled =
true;
3033 bool defaultEnabled =
false;
3036 return defaultEnabled;
3038 return m_cfg.readEntry(
"longPressEnabled", defaultEnabled);
3050 return defaultValue ? 40 :
m_cfg.readEntry(
"layerThumbnailGenerationTimeout", 40);
3055 m_cfg.writeEntry(
"layerThumbnailGenerationTimeout",
value);
3060 return m_cfg.readEntry(QStringLiteral(
"newsCheckEnabled"),
true);
3065 m_cfg.writeEntry(QStringLiteral(
"newsCheckEnabled"),
value);
3070 return m_cfg.readEntry(QStringLiteral(
"newsFirstStartup"),
true);
3075 m_cfg.writeEntry(QStringLiteral(
"newsFirstStartup"),
value);
3078#include <QDomDocument>
3079#include <QDomElement>
3083 QDomDocument doc = QDomDocument(name);
3084 QDomElement el = doc.createElement(name);
3085 doc.appendChild(el);
3086 color.
toXML(doc, el);
3087 m_cfg.writeEntry(name, doc.toString());
3097 if (!
m_cfg.readEntry(name).isNull()) {
3098 doc.setContent(
m_cfg.readEntry(name));
3099 QDomElement e = doc.documentElement().firstChild().toElement();
3103 QString blackColor =
"<!DOCTYPE Color>\n<Color>\n <RGB r=\"0\" space=\"sRGB-elle-V2-srgbtrc.icc\" b=\"0\" g=\"0\"/>\n</Color>\n";
3104 doc.setContent(blackColor);
3105 QDomElement e = doc.documentElement().firstChild().toElement();
3113 QDomDocument doc = QDomDocument(name);
3114 QDomElement colorsElement = doc.createElement(
"colors");
3115 doc.appendChild(colorsElement);
3118 Q_FOREACH(
const KoColor & color, colors) {
3119 color.
toXML(doc, colorsElement);
3121 m_cfg.writeEntry(name, doc.toString());
3127 QString colorListXML =
m_cfg.readEntry(name);
3129 if (!colorListXML.isNull()) {
3131 doc.setContent(colorListXML);
3132 QDomElement colorsElement = doc.firstChildElement();
3133 if (!colorsElement.isNull()) {
3134 QDomNodeList colorNodes = colorsElement.childNodes();
3135 colors.reserve(colorNodes.size());
3137 for (
int k = 0; k < colorNodes.size(); k++) {
3138 QDomElement colorElement = colorNodes.at(k).toElement();
3140 colors.push_back(color);
3150 QDebugStateSaver saver(debug);
3151 debug.nospace() <<
"CanvasSurfaceMode(";
3155 debug.nospace() <<
"Preferred";
3158 debug.nospace() <<
"Rec709g22";
3161 debug.nospace() <<
"Rec709g10";
3164 debug.nospace() <<
"Rec2020pq";
3167 debug.nospace() <<
"Unmanaged";
3170 debug.nospace() <<
"unknown(" <<
static_cast<int>(mode) <<
")";
3174 debug.nospace() <<
")";
3176 return debug.space();
3182 QDebugStateSaver saver(debug);
3183 debug.nospace() <<
"CanvasSurfaceBitDepthMode(";
3187 debug.nospace() <<
"DepthAuto";
3190 debug.nospace() <<
"Depth8Bit";
3193 debug.nospace() <<
"Depth10Bit";
3196 debug.nospace() <<
"unknown(" <<
static_cast<int>(mode) <<
")";
3200 debug.nospace() <<
")";
3202 return debug.space();
qreal length(const QPointF &vec)
float value(const T *src, size_t ch)
QList< QString > QStringList
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
const quint8 OPACITY_OPAQUE_U8
void notifyLongPressChanged(bool enabled)
static KisConfigNotifier * instance()
void notifyDropFramesModeChanged()
void notifyTouchPaintingChanged()
void notifyColorSamplerPreviewStyleChanged()
void notifyConfigChanged(void)
QString widgetStyle(bool defaultValue=false)
void setCumulativeUndoData(KisCumulativeUndoData value)
qreal lineSmoothingDistanceMin(bool defaultValue=false) const
bool testingAcceptCompressedTabletEvents(bool defaultValue=false) const
void setForceShowSaveMessages(bool value) const
QString importConfiguration(const QString &filterId, bool defaultValue=false) const
void setPreferredVectorImportResolutionPPI(int value) const
ColorSamplerPreviewCirclePosition colorSamplerPreviewCirclePosition(bool defaultValue=false) const
bool backupFile(bool defaultValue=false) const
void setAntialiasCurves(bool v) const
bool useOcio(bool defaultValue=false) const
void setDefaultBackgroundOpacity(const QLatin1String &dialogType, quint8 value)
void setSwitchSelectionCtrlAlt(bool value)
qint32 defImageHeight(bool defaultValue=false) const
bool antialiasSelectionOutline(bool defaultValue=false) const
void setColorSamplerZoomPreviewScale(qreal scale)
void setZoomSteps(int steps)
@ ASSISTANTS_DRAW_MODE_DIRECT
int zoomSteps(bool defaultValue=false) const
qreal lineSmoothingTailAggressiveness(bool defaultValue=false) const
OcioColorManagementMode ocioColorManagementMode(bool defaultValue=false) const
void setHideDockersFullscreen(const bool value) const
void setUseEraserBrushOpacity(bool value)
LayerInfoTextStyle layerInfoTextStyle(bool defaultValue=false) const
static CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(QSettings *settings, bool defaultValue=false)
void setCurrentInputProfile(const QString &name)
int preferredVectorImportResolutionPPI(bool defaultValue=false) const
void setAdaptivePlaybackRange(bool value)
void setEnableCanvasSurfaceColorSpaceManagement(bool value)
void setLineSmoothingTailAggressiveness(qreal value)
void loadSnapConfig(KisSnapConfig *config, bool defaultValue=false) const
bool colorSamplerPreviewCircleOutlineEnabled(bool defaultValue=false) const
void setPasteFormat(qint32 format)
QColor checkersColor2(bool defaultValue=false) const
void setColorSamplerPreviewCircleOutlineEnabled(bool enabled)
void setGridSubdivisionColor(const QColor &v) const
void setUseRightMiddleTabletButtonWorkaround(bool value)
int lineSmoothingType(bool defaultValue=false) const
void setDefaultBackgroundStyle(const QLatin1String &dialogType, BackgroundStyle value)
void setCheckersColor1(const QColor &v) const
QString toolbarSlider(int sliderNumber, bool defaultValue=false) const
int stabilizerSampleSize(bool defaultValue=false) const
quint32 guidesLineStyle(bool defaultValue=false) const
void setHidePopups(bool hidePopups)
void setFullscreenMode(const bool value) const
void setLineSmoothingUseDelayDistance(bool value)
void setMDIBackgroundColor(const QString &v) const
QString pressureTabletCurve(bool defaultValue=false) const
void setUndoStackLimit(int limit) const
qint32 defImageWidth(bool defaultValue=false) const
bool showGlobalSelection(bool defaultValue=false) const
bool hideScrollbars(bool defaultValue=false) const
int verticalSplitLines(bool defaultValue=false) const
int openGLFilteringMode(bool defaultValue=false) const
void setUseZip64(bool value)
bool showSingleChannelAsColor(bool defaultValue=false) const
void setWidgetStyle(QString name)
void setHideToolbarFullscreen(const bool value) const
BackgroundStyle defaultBackgroundStyle(const QLatin1String &dialogType, bool defaultValue=false) const
void setCanvasState(const QString &state) const
void setLineSmoothingDistanceKeepAspectRatio(bool value)
int kineticScrollingSensitivity(bool defaultValue=false) const
bool convertToImageColorspaceOnImport(bool defaultValue=false) const
QString exportConfigurationXML(const QString &filterId, bool defaultValue=false) const
int zoomMarginSize(bool defaultValue=false) const
void setFFMpegLocation(const QString &value)
void setAutoZoomTimelineToPlaybackRange(bool value)
bool showRootLayer(bool defaultValue=false) const
void setTestingAcceptCompressedTabletEvents(bool value)
qint32 pasteFormat(bool defaultValue) const
void setEnableBrushSpeedLogging(bool value) const
QColor defaultBackgroundColor(const QLatin1String &dialogType, bool defaultValue=false) const
void setShowDockers(const bool value) const
void setExportMimeType(const QString &defaultExportMimeType)
bool forceShowSaveMessages(bool defaultValue=true) const
bool useInlineLayerInfoText(bool defaultValue=false) const
void setUseWin8PointerInput(bool value)
QPoint getDefaultGridSpacing(bool defaultValue=false) const
void setShowBrushHud(bool value)
void enablePixelGrid(bool v) const
void setShowStatusBar(const bool value) const
bool useDirtyPresets(bool defaultValue=false) const
void setOcioLutEdgeSize(int value)
void setDefaultBackgroundColor(const QLatin1String &dialogType, const QColor &value)
void setDefaultPalette(const QString &name) const
qreal getPixelGridDrawingThreshold(bool defaultValue=false) const
bool switchSelectionCtrlAlt(bool defaultValue=false) const
void setRenamePastedLayers(bool value)
bool shouldEatDriverShortcuts(bool defaultValue=false) const
QColor checkersColor1(bool defaultValue=false) const
void setHideScrollbars(bool value) const
void writeKoColors(const QString &name, const QList< KoColor > &colors) const
bool allowLCMSOptimization(bool defaultValue=false) const
KisConfig(bool readOnly)
KisConfig create a kisconfig object.
int animationPlaybackBackend(bool defaultValue=false) const
void setShowPaletteBottomBar(bool value)
CanvasSurfaceBitDepthMode effectiveCanvasSurfaceBitDepthMode(const QSurfaceFormat &format) const
static void setCanvasSurfaceBitDepthMode(QSettings *settings, CanvasSurfaceBitDepthMode value)
int numMipmapLevels(bool defaultValue=false) const
void setIgnoreHighFunctionKeys(bool value)
const KoColorSpace * customColorSelectorColorSpace(bool defaultValue=false) const
bool showFilterGalleryLayerMaskDialog(bool defaultValue=false) const
bool activateTransformToolAfterPaste(bool defaultValue=false) const
void setNewCursorStyle(CursorStyle style)
bool hideDockersFullscreen(bool defaultValue=false) const
static void setUseWin8PointerInputNoApp(QSettings *settings, bool value)
void setUseInlineLayerInfoText(bool value)
void disableOpenGL() const
void setGridSubdivisionStyle(quint32 v) const
void setEraserCursorStyle(CursorStyle style)
bool compressKra(bool defaultValue=false) const
void setTrackTabletEventLatency(bool value)
static bool preferXcbEglProvider(const QSettings *settings, bool defaultValue=false)
int textureOverlapBorder() const
bool disableVectorOptimizations(bool defaultValue=false) const
void setCursorMainColor(const QColor &v) const
void setColorSamplerPreviewCircleThickness(qreal thickness)
SelectionActionsBarOrientation selectionActionBarOrientation(bool defaultValue=false) const
void setCanvasSurfaceColorSpaceManagementMode(CanvasSurfaceMode value)
void setUndoEnabled(bool undo) const
bool levelOfDetailEnabled(bool defaultValue=false) const
void setCumulativeUndoRedo(bool value)
void setConvertToImageColorspaceOnImport(bool value)
void setPixelGridColor(const QColor &v) const
void setToolOptionsInDocker(bool inDocker)
void setForceAlwaysFullSizedOutline(bool value) const
void setLongPressEnabled(bool value)
SessionOnStartup sessionOnStartup(bool defaultValue=false) const
bool lineSmoothingScalableDistance(bool defaultValue=false) const
bool newsFirstStartup() const
bool forceOpenGLFenceWorkaround(bool defaultValue=false) const
void setForcePaletteColors(bool forcePaletteColors)
void setHideTitlebarFullscreen(const bool value) const
void setScrubbingAudioUpdatesDelay(int value)
int layerThumbnailSize(bool defaultValue=false) const
bool enableOpenGLFramerateLogging(bool defaultValue=false) const
QColor getPixelGridColor(bool defaultValue=false) const
void setGridIsoVerticalStyle(quint32 v) const
qreal vastScrolling(bool defaultValue=false) const
void setSelectionViewSizeMinimum(qreal outlineSizeMinimum) const
bool fullscreenMode(bool defaultValue=false) const
bool useDefaultColorSpace(bool defaultvalue=false) const
bool toolOptionsPopupDetached(bool defaultValue=false) const
bool autoSmoothBezierCurves(bool defaultValue=false) const
bool pixelGridEnabled(bool defaultValue=false) const
void setRulersTrackMouse(bool value) const
QColor defaultAssistantsColor(bool defaultValue=false) const
quint8 defaultBackgroundOpacity(const QLatin1String &dialogType, bool defaultValue=false) const
bool hideMenuFullscreen(bool defaultValue=false) const
QString getMDIBackgroundColor(bool defaultValue=false) const
bool showPaletteBottomBar(bool defaultValue=false) const
bool lineSmoothingFinishStabilizedCurve(bool defaultValue=false) const
void setLineSmoothingFinishStabilizedCurve(bool value)
void setUseDefaultColorSpace(bool value) const
void setDefaultColorDepth(const QString &depth) const
bool hideScrollbarsFullscreen(bool defaultValue=false) const
QString printerProfile(bool defaultValue=false) const
void setStabilizerDelayedPaint(bool value)
TouchPainting touchPainting(bool defaultValue=false) const
void setSeparateEraserCursor(bool value) const
qint32 monitorRenderIntent(bool defaultValue=false) const
bool showFilterGallery(bool defaultValue=false) const
void setActivateTransformToolAfterPaste(bool value)
void setShowFilterGallery(bool showFilterGallery) const
int kineticScrollingGesture(bool defaultValue=false) const
bool useZip64(bool defaultValue=false) const
bool calculateAnimationCacheInBackground(bool defaultValue=false) const
void setLineSmoothingDistanceMin(qreal value)
void setSelectionActionBarBehavior(SelectionActionsBarBehavior value)
int favoritePresets(bool defaultValue=false) const
bool zoomHorizontal(bool defaultValue=false) const
SelectionActionsBarPosition
QString getMDIBackgroundImage(bool defaultValue=false) const
KisPropertiesConfigurationSP exportConfiguration(const QString &filterId, bool defaultValue=false) const
void setAssistantsDrawMode(AssistantsDrawMode value)
void setShowGlobalSelection(bool showGlobalSelection) const
quint32 getGridMainStyle(bool defaultValue=false) const
SelectionActionsBarBehavior
void setScrubbingUpdatesDelay(int value)
CanvasSurfaceMode canvasSurfaceColorSpaceManagementMode(bool defaultValue=false) const
bool hideToolbarFullscreen(bool defaultValue=false) const
void setScratchpadVisible(bool visible)
qreal outlineSizeMinimum(bool defaultValue=false) const
bool showCanvasMessages(bool defaultValue=false) const
QList< KoColor > readKoColors(const QString &name) const
QColor getGridMainColor(bool defaultValue=false) const
bool hideDevFundBanner(bool defaultValue=false) const
void setAnimationDropFrames(bool value)
int openGLTextureSize(bool defaultValue=false) const
qreal timelineZoom(bool defaultValue=false) const
void setDefaultGridSpacing(QPoint gridSpacing)
bool useWin8PointerInput(bool defaultValue=false) const
void setPrinterColorSpace(const QString &printerColorSpace) const
bool useOpenGLTextureBuffer(bool defaultValue=false) const
void setToolOptionsPopupDetached(bool detached) const
void setLineSmoothingDelayDistance(qreal value)
OutlineStyle lastUsedOutlineStyle(bool defaultValue=false) const
void setCalculateAnimationCacheInBackground(bool value)
void setGridMainStyle(quint32 v) const
void setColorSamplerPreviewCircleExtraCirclesEnabled(bool enabled)
void setAutoSaveInterval(int seconds) const
void setShowSingleChannelAsColor(bool asColor)
void setTrimFramesImport(bool trim)
bool forcePaletteColors(bool defaultValue=false) const
void setClicklessSpacePan(const bool toggle) const
bool convertLayerColorSpaceInProperties(bool defaultValue=false) const
bool colorSamplerZoomPreviewEnabled(bool defaultValue=false) const
bool showDockerTitleBars(bool defaultValue=false) const
qreal defImageResolution(bool defaultValue=false) const
void setTimelineZoom(qreal value)
void setAllowLCMSOptimization(bool allowLCMSOptimization)
void setPrinterProfile(const QString &printerProfile) const
void setUseLayerSelectionCheckbox(bool value)
void setVerticalSplitLines(const int numberLines) const
KisOcioConfiguration ocioConfiguration(bool defaultValue=false) const
void setColorSamplerPreviewCircleDiameter(int style)
void setSliderLabels(bool enabled)
void setRenderIntent(qint32 monitorRenderIntent) const
void setBrushHudSetting(const QString &value) const
void setFavoritePresets(const int value)
void setEraserOutlineStyle(OutlineStyle style)
bool effectiveShouldUseNativeSurfaceForCanvas(bool osManagedSurfacePresent) const
void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const
bool lineSmoothingDistanceKeepAspectRatio(bool defaultValue=false) const
RootSurfaceFormat rootSurfaceFormat(bool defaultValue=false) const
QColor canvasBorderColor(bool defaultValue=false) const
void setPresetStripVisible(bool visible)
int colorSamplerPreviewCircleDiameter(bool defaultValue=false) const
int tabletEventsDelay(bool defaultValue=false) const
QString exportMimeType(bool defaultValue) const
void setScrollingCheckers(bool scrollCheckers) const
const QString getScreenStringIdentfier(int screenNo) const
bool firstRun(bool defaultValue=false) const
void setBackupFile(bool backupFile) const
void setTabletEventsDelay(int value)
KoColor readKoColor(const QString &name, const KoColor &color=KoColor()) const
void logImportantSettings() const
Log the most interesting settings to the usage log.
IconsInMenu iconsInMenu(bool defaultValue=false) const
QString ffmpegLocation(bool defaultValue=false) const
void setImportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const
bool useLayerSelectionCheckbox(bool defaultValue=false) const
int numDefaultLayers(const QLatin1String &dialogType, bool defaultValue=false) const
QColor guidesColor(bool defaultValue=false) const
void setNumDefaultLayers(const QLatin1String &dialogType, int num)
CursorStyle newCursorStyle(bool defaultValue=false) const
bool useCumulativeUndoRedo(bool defaultValue=false) const
void setCheckSize(qint32 checkSize) const
void setLevelOfDetailEnabled(bool value)
bool paintopPopupDetached(bool defaultValue=false) const
void setToolbarSlider(int sliderNumber, const QString &slider)
CursorStyle eraserCursorStyle(bool defaultValue=false) const
void setNewsCheckEnabled(bool value)
void setKineticScrollingGesture(int kineticScroll)
QString defColorProfile(bool defaultValue=false) const
void setLineSmoothingSmoothPressure(bool value)
void setPreferXcbEglProvider(bool value)
void setPixelGridDrawingThreshold(qreal v) const
void setStabilizerSampleSize(int value)
QString currentInputProfile(bool defaultValue=false) const
void setCanvasBorderColor(const QColor &color) const
QString monitorProfile(int screen) const
get the profile the user has selected for the given screen
void setGridIsoVerticalColor(const QColor &v) const
void setVastScrolling(const qreal factor) const
@ TOUCH_PAINTING_DISABLED
void setShowCanvasMessages(bool show)
void setDefaultAssistantsColor(const QColor &color) const
qint32 checkSize(bool defaultValue=false) const
void setConvertLayerColorSpaceInProperties(bool value)
void setWorkingColorSpace(const QString &workingColorSpace) const
void setColorSamplerPreviewCirclePosition(ColorSamplerPreviewCirclePosition position)
KisCumulativeUndoData cumulativeUndoData(bool defaultValue=false) const
QString splashScreenImage(bool defaultValue=false) const
void setMonitorProfile(int screen, const QString &monitorProfile) const
bool scratchpadVisible(bool defaultValue=false) const
OutlineStyle newOutlineStyle(bool defaultValue=false) const
int layerThumbnailGenerationTimeout(bool defaultValue=false) const
bool forceAlwaysFullSizedOutline(bool defaultValue=false) const
void setCustomColorSelectorColorSpace(const KoColorSpace *cs)
void setLineSmoothingType(int value)
void setPressureTabletCurve(const QString &curveString) const
qreal colorSamplerPreviewCircleThickness(bool defaultValue=false) const
SelectionActionsBarBehavior selectionActionBarBehavior(bool defaultValue=false) const
bool clicklessSpacePan(bool defaultValue=false) const
QString workingColorSpace(bool defaultValue=false) const
void setEnableOpenGLFramerateLogging(bool value) const
bool trackTabletEventLatency(bool defaultValue=false) const
bool renamePastedLayers(bool defaultValue=false) const
int horizontalSplitLines(bool defaultValue=false) const
void setShowDockerTitleBars(const bool value) const
void setFirstRun(const bool firstRun) const
void setNewOutlineStyle(OutlineStyle style)
void setCheckersColor2(const QColor &v) const
void setShowRootLayer(bool showRootLayer) const
void setColorSamplerZoomPreviewEnabled(bool enabled)
void setAutoSmoothBezierCurves(bool value)
void setSelectionActionBarOrientation(SelectionActionsBarOrientation value)
OutlineStyle eraserOutlineStyle(bool defaultValue=false) const
void saveSnapConfig(const KisSnapConfig &config)
void setScrollbarZoomEnabled(bool enabled) const
int presetChooserViewMode(bool defaultValue=false) const
void setUseBlackPointCompensation(bool useBlackPointCompensation) const
bool kineticScrollingEnabled(bool defaultValue=false) const
bool animationDropFrames(bool defaultValue=false) const
void setLineSmoothingStabilizeSensors(bool value)
void setNewsFirstStartup(bool value)
void setSplashScreenImage(const QString &value)
SelectionActionsBarOrientation
bool disableTouchOnCanvas() const
int ocioLutEdgeSize(bool defaultValue=false) const
void setAudioOffsetTolerance(int value)
void setUseOpenGLTextureBuffer(bool useBuffer)
void setTrimKra(bool trim)
void setOcioConfiguration(const KisOcioConfiguration &cfg)
void setIconsInMenu(IconsInMenu value)
ColorSamplerPreviewCirclePosition
void setPresetIconSize(const int value) const
bool hideTitlebarFullscreen(bool defaultValue=false) const
QString defaultPalette(bool defaultValue=false) const
bool useRightMiddleTabletButtonWorkaround(bool defaultValue=false) const
bool longPressEnabled(bool defaultValue=false) const
QStringList favoriteCompositeOps(bool defaultValue=false) const
bool useEraserBrushOpacity(bool defaultValue=false) const
void setColorSamplerPreviewStyle(ColorSamplerPreviewStyle style)
bool sliderLabels(bool defaultValue=false) const
bool hidePopups(bool defaultValue=false) const
bool enableCanvasSurfaceColorSpaceManagement(bool defaultValue=false) const
void setGuidesLineStyle(quint32 v) const
QString printerColorSpace(bool defaultValue=false) const
bool showBrushHud(bool defaultValue=false) const
void setRootSurfaceFormat(RootSurfaceFormat value)
bool autoPinLayersToTimeline(bool defaultValue=false) const
bool scrollbarZoomEnabled(bool defaultValue=false) const
bool toolOptionsInDocker(bool defaultValue=false) const
void setPresetChooserViewMode(const int mode) const
void setOpenGLFilteringMode(int filteringMode)
void setKineticScrollingHideScrollbars(bool scrollbar)
void setAntialiasSelectionOutline(bool v) const
bool trimKra(bool defaultValue=false) const
static bool useWin8PointerInputNoApp(QSettings *settings, bool defaultValue=false)
bool forceShowAutosaveMessages(bool defaultValue=true) const
SelectionActionsBarPosition selectionActionBarPosition(bool defaultValue=false) const
int layerTreeIndentation(bool defaultValue=false) const
void setFavoriteCompositeOps(const QStringList &compositeOps) const
void setOcioColorManagementMode(OcioColorManagementMode mode) const
bool enableBrushSpeedLogging(bool defaultValue=false) const
bool forceAlwaysFullSizedEraserOutline(bool defaultValue=false) const
int autoSaveInterval(bool defaultValue=false) const
int workaroundX11SmoothPressureSteps(bool defaultValue=false) const
QString defColorModel(bool defaultValue=false) const
void setPaintopPopupDetached(bool detached) const
void setDisableVectorOptimizations(bool value)
void setHideStatusbarFullscreen(const bool value) const
void setCompressKra(bool compress)
void setTouchPainting(TouchPainting value) const
int audioOffsetTolerance(bool defaultValue=false) const
bool showOutlineWhilePainting(bool defaultValue=false) const
qreal lineSmoothingDelayDistance(bool defaultValue=false) const
void setUseEraserBrushSize(bool value)
quint32 getGridIsoVerticalStyle(bool defaultValue=false) const
void setShowEraserOutlineWhilePainting(bool showEraserOutlineWhilePainting) const
bool lineSmoothingSmoothPressure(bool defaultValue=false) const
QString canvasState(bool defaultValue=false) const
void setHideMenuFullscreen(const bool value) const
int scrubbingUpdatesDelay(bool defaultValue=false) const
bool autoZoomTimelineToPlaybackRange(bool defaultValue=false) const
bool scrollCheckers(bool defaultValue=false) const
void setForceShowAutosaveMessages(bool ShowAutosaveMessages) const
QColor getGridIsoVerticalColor(bool defaultValue=false) const
bool colorHistoryPerDocument(bool defaultValue=false) const
bool stabilizerDelayedPaint(bool defaultValue=false) const
void setOutlineSizeMinimum(qreal outlineSizeMinimum) const
CanvasSurfaceBitDepthMode
bool useEraserBrushSize(bool defaultValue=false) const
void setLayerThumbnailSize(int size)
void setZoomMarginSize(int zoomMarginSize)
void setShowRulers(bool rulers) const
void setLayerInfoTextOpacity(int value)
bool hideStatusbarFullscreen(bool defaultValue=false) const
void setGridMainColor(const QColor &v) const
qreal lineSmoothingDistanceMax(bool defaultValue=false) const
bool presetStripVisible(bool defaultValue=false) const
bool lineSmoothingUseDelayDistance(bool defaultValue=false) const
bool colorSamplerPreviewCircleExtraCirclesEnabled(bool defaultValue=false) const
void setZoomHorizontal(bool value)
void setLineSmoothingScalableDistance(bool value)
void setHideDevFundBanner(bool value=true)
bool kineticScrollingHiddenScrollbars(bool defaultValue=false) const
bool newsCheckEnabled() const
bool showDockers(bool defaultValue=false) const
void setExportConfiguration(const QString &filterId, KisPropertiesConfigurationSP properties) const
const KoColorProfile * displayProfile(int screen) const
void setLineSmoothingDistanceMax(qreal value)
bool useOpenGL(bool defaultValue=false) const
void setTestingCompressBrushEvents(bool value)
bool trimFramesImport(bool defaultValue=false) const
int presetIconSize(bool defaultValue=false) const
bool testingCompressBrushEvents(bool defaultValue=false) const
void setForceAlwaysFullSizedEraserOutline(bool value) const
bool selectionActionBar(bool defaultValue=false) const
QString defaultColorDepth(bool defaultValue=false) const
void setSelectionActionBarPosition(SelectionActionsBarPosition value)
int undoStackLimit(bool defaultValue=false) const
bool useBlackPointCompensation(bool defaultValue=false) const
bool saveSessionOnQuit(bool defaultValue) const
ColorSamplerPreviewStyle colorSamplerPreviewStyle(bool defaultValue=false) const
void setMDIBackgroundImage(const QString &fileName) const
QColor getCursorMainColor(bool defaultValue=false) const
void setLayerThumbnailGenerationTimeout(int value)
void setUseProjections(bool useProj) const
void setSelectionActionBar(bool value)
qint32 pasteBehaviour(bool defaultValue=false) const
AssistantsDrawMode assistantsDrawMode(bool defaultValue=false) const
bool rulersTrackMouse(bool defaultValue=false) const
void setUseDirtyPresets(bool value)
quint32 getGridSubdivisionStyle(bool defaultValue=false) const
bool separateEraserCursor(bool defaultValue=false) const
void setGuidesColor(const QColor &v) const
void setEraserCursorMainColor(const QColor &v) const
void setSaveSessionOnQuit(bool value)
bool disableAVXOptimizations(bool defaultValue=false) const
bool showEraserOutlineWhilePainting(bool defaultValue=false) const
bool showStatusBar(bool defaultValue=false) const
bool showRulers(bool defaultValue=false) const
void setPasteBehaviour(qint32 behaviour) const
void setLayerInfoTextStyle(LayerInfoTextStyle value)
void setSessionOnStartup(SessionOnStartup value)
void setLayerTreeIndentation(int percentage)
int scrubbingAudioUpdatesDelay(bool defaultValue=false) const
void setHideScrollbarsFullscreen(const bool value) const
int layerInfoTextOpacity(bool defaultValue=false) const
QColor getGridSubdivisionColor(bool defaultValue=false) const
void setAnimationPlaybackBackend(int value)
void setAutoPinLayersToTimeline(bool value)
QColor getEraserCursorMainColor(bool defaultValue=false) const
void setUseOcio(bool useOCIO) const
void setLastUsedOutlineStyle(OutlineStyle style)
qreal colorSamplerZoomPreviewScale(bool defaultValue=false) const
bool lineSmoothingStabilizeSensors(bool defaultValue=false) const
bool antialiasCurves(bool defaultValue=false) const
void setKineticScrollingSensitivity(int sensitivity)
QString brushHudSetting(bool defaultValue=false) const
bool ignoreHighFunctionKeys(bool defaultValue=false) const
bool useProjections(bool defaultValue=false) const
void setDisableAVXOptimizations(bool value)
qreal selectionViewSizeMinimum(bool defaultValue=false) const
bool adaptivePlaybackRange(bool defaultValue=false) const
void writeKoColor(const QString &name, const KoColor &color) const
void setOcioLockColorVisualRepresentation(bool value)
void setShowFilterGalleryLayerMaskDialog(bool showFilterGallery) const
void setHorizontalSplitLines(const int numberLines) const
bool undoEnabled(bool defaultValue=false) const
void setKineticScrollingEnabled(bool enabled)
bool ocioLockColorVisualRepresentation(bool defaultValue=false) const
QString configurationPath
static const QString resourceLocationKey
void setImageCenter(bool value)
void setIntersection(bool value)
void setOrthogonal(bool value)
void setExtension(bool value)
void setToPixel(bool value)
void setBoundingBox(bool value)
bool intersection() const
void setImageBounds(bool value)
static void log(const QString &message)
Logs with date/time.
static void writeSysInfo(const QString &message)
Writes to the system information file and Krita log.
virtual KoID colorModelId() const =0
virtual KoID colorDepthId() const =0
virtual const KoColorProfile * profile() const =0
static KoColor fromXML(const QDomElement &elt, const QString &channelDepthId)
void toXML(QDomDocument &doc, QDomElement &colorElt) const
void fromQColor(const QColor &c)
Convenient function for converting from a QColor.
static bool tabletInputReceived()
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
void cleanOldCursorStyleKeys(KConfigGroup &cfg)
QDebug operator<<(QDebug debug, const KisConfig::CanvasSurfaceMode &mode)
const QString DEFAULT_CURVE_STRING
@ OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_RIGHTHANDED
@ OLD_CURSOR_STYLE_OUTLINE
@ OLD_CURSOR_STYLE_OUTLINE_CENTER_CROSS
@ OLD_CURSOR_STYLE_CROSSHAIR
@ OLD_CURSOR_STYLE_NO_CURSOR
@ OLD_CURSOR_STYLE_TOOLICON
@ OLD_CURSOR_STYLE_TRIANGLE_LEFTHANDED
@ OLD_CURSOR_STYLE_POINTER
@ OLD_CURSOR_STYLE_OUTLINE_CENTER_DOT
@ OLD_CURSOR_STYLE_OUTLINE_TRIANGLE_LEFTHANDED
@ OLD_CURSOR_STYLE_TRIANGLE_RIGHTHANDED
@ OLD_CURSOR_STYLE_SMALL_ROUND
#define INTENT_RELATIVE_COLORIMETRIC
@ CURSOR_STYLE_SMALL_ROUND
@ CURSOR_STYLE_TRIANGLE_RIGHTHANDED
@ CURSOR_STYLE_TRIANGLE_LEFTHANDED
bool looksLikeBrokenCursorDevice()
bool looksLikeXiaomiDevice()
static const KisCumulativeUndoData defaultValue
bool read(const KConfigGroup *config)
void write(KConfigGroup *config) const
virtual bool isSuitableForDisplay() const =0
const KoColorProfile * profileByName(const QString &name) const
const KoColorSpace * colorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile)
static KoColorSpaceRegistry * instance()