File indexing completed on 2025-01-26 04:11:25
0001 /* 0002 * SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #include "KisAirbrushOptionData.h" 0007 0008 #include <kis_paintop_settings.h> 0009 #include <kis_properties_configuration.h> 0010 0011 const qreal DEFAULT_RATE = 20.0; 0012 0013 bool KisAirbrushOptionData::read(const KisPropertiesConfiguration *setting) 0014 { 0015 isChecked = setting->getBool(AIRBRUSH_ENABLED); 0016 airbrushRate = setting->getDouble(AIRBRUSH_RATE, DEFAULT_RATE); 0017 ignoreSpacing = setting->getBool(AIRBRUSH_IGNORE_SPACING, false); 0018 0019 return true; 0020 } 0021 0022 void KisAirbrushOptionData::write(KisPropertiesConfiguration *setting) const 0023 { 0024 setting->setProperty(AIRBRUSH_ENABLED, isChecked); 0025 setting->setProperty(AIRBRUSH_RATE, airbrushRate); 0026 setting->setProperty(AIRBRUSH_IGNORE_SPACING, ignoreSpacing); 0027 }