Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLodAvailabilityData.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 */
7
10
12{
13 const QString paintopId = setting->getString("paintop");
14 if (paintopId.isEmpty()) {
15 return false;
16 }
17
18 KisPaintOpFactory *factory = KisPaintOpRegistry::instance()->get(paintopId);
19 if (!factory) {
20 return false;
21 }
22
24 isLodUserAllowed = setting->getBool("lodUserAllowed", true);
25 lodSizeThreshold = setting->getDouble("lodSizeThreshold", 100.0);
26
27 return true;
28}
29
31{
32 setting->setProperty("lodUserAllowed", isLodUserAllowed);
33 setting->setProperty("lodSizeThreshold", lodSizeThreshold);
34}
bool read(const KisPropertiesConfiguration *setting)
void write(KisPropertiesConfiguration *setting) const
virtual bool lodSizeThresholdSupported() const =0
static KisPaintOpRegistry * instance()
T get(const QString &id) const
QString getString(const QString &name, const QString &def=QString()) const
virtual void setProperty(const QString &name, const QVariant &value)
bool getBool(const QString &name, bool def=false) const
double getDouble(const QString &name, double def=0.0) const