Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSmudgeRadiusOptionData.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
8
11 KoID("SmudgeRadius", i18n("Smudge Radius")),
12 Checkability::Checkable, std::nullopt,
13 std::make_pair(0.0, 3.0))
14{
16 const int smudgeRadiusVersion = setting->getInt("SmudgeRadiusVersion", 1);
17 if (smudgeRadiusVersion < 2) {
18 data->strengthValue = data->strengthValue / 100.0;
19 }
20
22 lengthData.read(setting);
23
24 data->strengthMaxValue = lengthData.useNewEngine ? 1.0 : 3.0;
25 data->strengthValue = qMin(data->strengthValue, data->strengthMaxValue);
26 };
27
29 setting->setProperty("SmudgeRadiusVersion", 2);
30 };
31}
Definition KoID.h:30
ValueFixUpReadCallback valueFixUpReadCallback
ValueFixUpWriteCallback valueFixUpWriteCallback
bool read(const KisPropertiesConfiguration *setting)