Krita Source Code Documentation
Loading...
Searching...
No Matches
KisPaintingModeOptionData.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
9
10
12{
13 hasPaintingModeProperty = setting->hasProperty("PaintOpAction");
14
15 switch (setting->getInt("PaintOpAction", 2)) {
16 case 1:
18 break;
19 case 3:
21 break;
22 default:
24 break;
25 }
26
27 return true;
28}
29
31{
32 int value;
33 switch (paintingMode) {
35 value = 1;
36 break;
38 value = 3;
39 break;
40 default:
41 value = 2;
42 break;
43 }
44
45 setting->setProperty("PaintOpAction", value);
46}
float value(const T *src, size_t ch)
bool read(const KisPropertiesConfiguration *setting)
void write(KisPropertiesConfiguration *setting) const
virtual bool hasProperty(const QString &name) const
virtual void setProperty(const QString &name, const QVariant &value)
int getInt(const QString &name, int def=0) const