Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_smoothing_options.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2012 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
7
8#include "kis_config.h"
10
43
45 : m_d(new Private(useSavedSmoothing))
46{
47
48 connect(&m_d->writeCompressor, SIGNAL(timeout()), this, SLOT(slotWriteConfig()));
49}
50
54
59
61{
62 m_d->smoothingType = value;
64 m_d->writeCompressor.start();
65}
66
68{
69 return m_d->smoothnessDistanceMin;
70}
71
72
74{
75 m_d->smoothnessDistanceMin = value;
76 m_d->writeCompressor.start();
77}
78
80{
81 return m_d->smoothnessDistanceMax;
82}
83
85{
86 m_d->smoothnessDistanceMax = value;
87 m_d->writeCompressor.start();
88}
89
91{
92 return m_d->smoothnessDistanceKeepAspectRatio;
93}
94
96{
97 m_d->smoothnessDistanceKeepAspectRatio = value;
98 m_d->writeCompressor.start();
99}
100
102{
103 return m_d->tailAggressiveness;
104}
105
107{
108 m_d->tailAggressiveness = value;
109 m_d->writeCompressor.start();
110}
111
113{
114 return m_d->smoothPressure;
115}
116
118{
119 m_d->smoothPressure = value;
120 m_d->writeCompressor.start();
121}
122
124{
125 return m_d->smoothingType != STABILIZER ? m_d->useScalableDistance : true;
126}
127
129{
130 // stabilizer mush always have scalable distance on
131 // see bug 421314
133
134 m_d->useScalableDistance = value;
135 m_d->writeCompressor.start();
136}
137
139{
140 return m_d->delayDistance;
141}
142
144{
145 m_d->delayDistance = value;
146 m_d->writeCompressor.start();
147}
148
150{
151 return m_d->useDelayDistance;
152}
153
155{
156 m_d->useDelayDistance = value;
157 m_d->writeCompressor.start();
158}
159
161{
162 m_d->finishStabilizedCurve = value;
163 m_d->writeCompressor.start();
164}
165
167{
168 return m_d->finishStabilizedCurve;
169}
170
172{
173 m_d->stabilizeSensors = value;
174 m_d->writeCompressor.start();
175}
176
178{
179 return m_d->stabilizeSensors;
180}
181
183{
184 KisConfig cfg(false);
185 cfg.setLineSmoothingType(m_d->smoothingType);
186 cfg.setLineSmoothingDistanceMin(m_d->smoothnessDistanceMin);
187 cfg.setLineSmoothingDistanceMax(m_d->smoothnessDistanceMax);
188 cfg.setLineSmoothingDistanceKeepAspectRatio(m_d->smoothnessDistanceKeepAspectRatio);
189 cfg.setLineSmoothingTailAggressiveness(m_d->tailAggressiveness);
190 cfg.setLineSmoothingSmoothPressure(m_d->smoothPressure);
191 cfg.setLineSmoothingScalableDistance(m_d->useScalableDistance);
192 cfg.setLineSmoothingDelayDistance(m_d->delayDistance);
193 cfg.setLineSmoothingUseDelayDistance(m_d->useDelayDistance);
194 cfg.setLineSmoothingFinishStabilizedCurve(m_d->finishStabilizedCurve);
195 cfg.setLineSmoothingStabilizeSensors(m_d->stabilizeSensors);
196}
float value(const T *src, size_t ch)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
qreal lineSmoothingDistanceMin(bool defaultValue=false) const
qreal lineSmoothingTailAggressiveness(bool defaultValue=false) const
void setLineSmoothingTailAggressiveness(qreal value)
int lineSmoothingType(bool defaultValue=false) const
void setLineSmoothingUseDelayDistance(bool value)
void setLineSmoothingDistanceKeepAspectRatio(bool value)
bool lineSmoothingScalableDistance(bool defaultValue=false) const
bool lineSmoothingFinishStabilizedCurve(bool defaultValue=false) const
void setLineSmoothingFinishStabilizedCurve(bool value)
void setLineSmoothingDistanceMin(qreal value)
void setLineSmoothingDelayDistance(qreal value)
bool lineSmoothingDistanceKeepAspectRatio(bool defaultValue=false) const
void setLineSmoothingSmoothPressure(bool value)
void setLineSmoothingType(int value)
void setLineSmoothingStabilizeSensors(bool value)
qreal lineSmoothingDelayDistance(bool defaultValue=false) const
bool lineSmoothingSmoothPressure(bool defaultValue=false) const
qreal lineSmoothingDistanceMax(bool defaultValue=false) const
bool lineSmoothingUseDelayDistance(bool defaultValue=false) const
void setLineSmoothingScalableDistance(bool value)
void setLineSmoothingDistanceMax(qreal value)
bool lineSmoothingStabilizeSensors(bool defaultValue=false) const
void setSmoothPressure(bool value)
void sigSmoothingTypeChanged()
void setSmoothnessDistanceKeepAspectRatio(bool value)
void setSmoothingType(SmoothingType value)
const QScopedPointer< Private > m_d
void setTailAggressiveness(qreal value)
void setUseDelayDistance(bool value)
void setDelayDistance(qreal value)
KisSmoothingOptions(bool useSavedSmoothing=true)
void setFinishStabilizedCurve(bool value)
void setStabilizeSensors(bool value)
void setSmoothnessDistanceMax(qreal value)
SmoothingType smoothingType() const
bool smoothnessDistanceKeepAspectRatio() const
void setUseScalableDistance(bool value)
void setSmoothnessDistanceMin(qreal value)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128