Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
818 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2022 Dmitry Kazakov <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */
#include "KisAirbrushOptionData.h"

#include <kis_paintop_settings.h>
#include <kis_properties_configuration.h>

const qreal DEFAULT_RATE = 20.0;

bool KisAirbrushOptionData::read(const KisPropertiesConfiguration *setting)
{
    isChecked = setting->getBool(AIRBRUSH_ENABLED);
    airbrushRate = setting->getDouble(AIRBRUSH_RATE, DEFAULT_RATE);
    ignoreSpacing = setting->getBool(AIRBRUSH_IGNORE_SPACING, false);

    return true;
}

void KisAirbrushOptionData::write(KisPropertiesConfiguration *setting) const
{
    setting->setProperty(AIRBRUSH_ENABLED, isChecked);
    setting->setProperty(AIRBRUSH_RATE, airbrushRate);
    setting->setProperty(AIRBRUSH_IGNORE_SPACING, ignoreSpacing);
}