Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSmoothingOptions Class Reference

#include <kis_smoothing_options.h>

+ Inheritance diagram for KisSmoothingOptions:

Classes

struct  Private
 

Public Types

enum  SmoothingType {
  NO_SMOOTHING = 0 , SIMPLE_SMOOTHING , WEIGHTED_SMOOTHING , STABILIZER ,
  PIXEL_PERFECT
}
 

Signals

void sigSmoothingTypeChanged ()
 

Public Member Functions

qreal delayDistance () const
 
bool finishStabilizedCurve () const
 
 KisSmoothingOptions (bool useSavedSmoothing=true)
 
void setDelayDistance (qreal value)
 
void setFinishStabilizedCurve (bool value)
 
void setSmoothingType (SmoothingType value)
 
void setSmoothnessDistanceKeepAspectRatio (bool value)
 
void setSmoothnessDistanceMax (qreal value)
 
void setSmoothnessDistanceMin (qreal value)
 
void setSmoothPressure (bool value)
 
void setStabilizeSensors (bool value)
 
void setTailAggressiveness (qreal value)
 
void setUseDelayDistance (bool value)
 
void setUseScalableDistance (bool value)
 
SmoothingType smoothingType () const
 
bool smoothnessDistanceKeepAspectRatio () const
 
qreal smoothnessDistanceMax () const
 
qreal smoothnessDistanceMin () const
 
bool smoothPressure () const
 
bool stabilizeSensors () const
 
qreal tailAggressiveness () const
 
bool useDelayDistance () const
 
bool useScalableDistance () const
 
 ~KisSmoothingOptions () override
 

Private Slots

void slotWriteConfig ()
 

Private Attributes

const QScopedPointer< Privatem_d
 

Detailed Description

Definition at line 16 of file kis_smoothing_options.h.

Member Enumeration Documentation

◆ SmoothingType

Enumerator
NO_SMOOTHING 
SIMPLE_SMOOTHING 
WEIGHTED_SMOOTHING 
STABILIZER 
PIXEL_PERFECT 

Definition at line 20 of file kis_smoothing_options.h.

Constructor & Destructor Documentation

◆ KisSmoothingOptions()

KisSmoothingOptions::KisSmoothingOptions ( bool useSavedSmoothing = true)

Definition at line 44 of file kis_smoothing_options.cpp.

45 : m_d(new Private(useSavedSmoothing))
46{
47
48 connect(&m_d->writeCompressor, SIGNAL(timeout()), this, SLOT(slotWriteConfig()));
49}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
const QScopedPointer< Private > m_d

References connect(), m_d, and slotWriteConfig().

◆ ~KisSmoothingOptions()

KisSmoothingOptions::~KisSmoothingOptions ( )
override

Definition at line 51 of file kis_smoothing_options.cpp.

52{
53}

Member Function Documentation

◆ delayDistance()

qreal KisSmoothingOptions::delayDistance ( ) const

Definition at line 138 of file kis_smoothing_options.cpp.

139{
140 return m_d->delayDistance;
141}

References m_d.

◆ finishStabilizedCurve()

bool KisSmoothingOptions::finishStabilizedCurve ( ) const

Definition at line 166 of file kis_smoothing_options.cpp.

167{
168 return m_d->finishStabilizedCurve;
169}

References m_d.

◆ setDelayDistance()

void KisSmoothingOptions::setDelayDistance ( qreal value)

Definition at line 143 of file kis_smoothing_options.cpp.

144{
145 m_d->delayDistance = value;
146 m_d->writeCompressor.start();
147}
float value(const T *src, size_t ch)

References m_d, and value().

◆ setFinishStabilizedCurve()

void KisSmoothingOptions::setFinishStabilizedCurve ( bool value)

Definition at line 160 of file kis_smoothing_options.cpp.

161{
162 m_d->finishStabilizedCurve = value;
163 m_d->writeCompressor.start();
164}

References m_d, and value().

◆ setSmoothingType()

void KisSmoothingOptions::setSmoothingType ( KisSmoothingOptions::SmoothingType value)

Definition at line 60 of file kis_smoothing_options.cpp.

61{
62 m_d->smoothingType = value;
64 m_d->writeCompressor.start();
65}
void sigSmoothingTypeChanged()

References m_d, sigSmoothingTypeChanged(), and value().

◆ setSmoothnessDistanceKeepAspectRatio()

void KisSmoothingOptions::setSmoothnessDistanceKeepAspectRatio ( bool value)

Definition at line 95 of file kis_smoothing_options.cpp.

96{
97 m_d->smoothnessDistanceKeepAspectRatio = value;
98 m_d->writeCompressor.start();
99}

References m_d, and value().

◆ setSmoothnessDistanceMax()

void KisSmoothingOptions::setSmoothnessDistanceMax ( qreal value)

Definition at line 84 of file kis_smoothing_options.cpp.

85{
86 m_d->smoothnessDistanceMax = value;
87 m_d->writeCompressor.start();
88}

References m_d, and value().

◆ setSmoothnessDistanceMin()

void KisSmoothingOptions::setSmoothnessDistanceMin ( qreal value)

Definition at line 73 of file kis_smoothing_options.cpp.

74{
75 m_d->smoothnessDistanceMin = value;
76 m_d->writeCompressor.start();
77}

References m_d, and value().

◆ setSmoothPressure()

void KisSmoothingOptions::setSmoothPressure ( bool value)

Definition at line 117 of file kis_smoothing_options.cpp.

118{
119 m_d->smoothPressure = value;
120 m_d->writeCompressor.start();
121}

References m_d, and value().

◆ setStabilizeSensors()

void KisSmoothingOptions::setStabilizeSensors ( bool value)

Definition at line 171 of file kis_smoothing_options.cpp.

172{
173 m_d->stabilizeSensors = value;
174 m_d->writeCompressor.start();
175}

References m_d, and value().

◆ setTailAggressiveness()

void KisSmoothingOptions::setTailAggressiveness ( qreal value)

Definition at line 106 of file kis_smoothing_options.cpp.

107{
108 m_d->tailAggressiveness = value;
109 m_d->writeCompressor.start();
110}

References m_d, and value().

◆ setUseDelayDistance()

void KisSmoothingOptions::setUseDelayDistance ( bool value)

Definition at line 154 of file kis_smoothing_options.cpp.

155{
156 m_d->useDelayDistance = value;
157 m_d->writeCompressor.start();
158}

References m_d, and value().

◆ setUseScalableDistance()

void KisSmoothingOptions::setUseScalableDistance ( bool value)

Definition at line 128 of file kis_smoothing_options.cpp.

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}
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128

References KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, STABILIZER, and value().

◆ sigSmoothingTypeChanged

void KisSmoothingOptions::sigSmoothingTypeChanged ( )
signal

◆ slotWriteConfig

void KisSmoothingOptions::slotWriteConfig ( )
privateslot

Definition at line 182 of file kis_smoothing_options.cpp.

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}

References m_d, KisConfig::setLineSmoothingDelayDistance(), KisConfig::setLineSmoothingDistanceKeepAspectRatio(), KisConfig::setLineSmoothingDistanceMax(), KisConfig::setLineSmoothingDistanceMin(), KisConfig::setLineSmoothingFinishStabilizedCurve(), KisConfig::setLineSmoothingScalableDistance(), KisConfig::setLineSmoothingSmoothPressure(), KisConfig::setLineSmoothingStabilizeSensors(), KisConfig::setLineSmoothingTailAggressiveness(), KisConfig::setLineSmoothingType(), and KisConfig::setLineSmoothingUseDelayDistance().

◆ smoothingType()

KisSmoothingOptions::SmoothingType KisSmoothingOptions::smoothingType ( ) const

Definition at line 55 of file kis_smoothing_options.cpp.

56{
57 return m_d->smoothingType;
58}

References m_d.

◆ smoothnessDistanceKeepAspectRatio()

bool KisSmoothingOptions::smoothnessDistanceKeepAspectRatio ( ) const

Definition at line 90 of file kis_smoothing_options.cpp.

91{
92 return m_d->smoothnessDistanceKeepAspectRatio;
93}

References m_d.

◆ smoothnessDistanceMax()

qreal KisSmoothingOptions::smoothnessDistanceMax ( ) const

Definition at line 79 of file kis_smoothing_options.cpp.

80{
81 return m_d->smoothnessDistanceMax;
82}

References m_d.

◆ smoothnessDistanceMin()

qreal KisSmoothingOptions::smoothnessDistanceMin ( ) const

Definition at line 67 of file kis_smoothing_options.cpp.

68{
69 return m_d->smoothnessDistanceMin;
70}

References m_d.

◆ smoothPressure()

bool KisSmoothingOptions::smoothPressure ( ) const

Definition at line 112 of file kis_smoothing_options.cpp.

113{
114 return m_d->smoothPressure;
115}

References m_d.

◆ stabilizeSensors()

bool KisSmoothingOptions::stabilizeSensors ( ) const

Definition at line 177 of file kis_smoothing_options.cpp.

178{
179 return m_d->stabilizeSensors;
180}

References m_d.

◆ tailAggressiveness()

qreal KisSmoothingOptions::tailAggressiveness ( ) const

Definition at line 101 of file kis_smoothing_options.cpp.

102{
103 return m_d->tailAggressiveness;
104}

References m_d.

◆ useDelayDistance()

bool KisSmoothingOptions::useDelayDistance ( ) const

Definition at line 149 of file kis_smoothing_options.cpp.

150{
151 return m_d->useDelayDistance;
152}

References m_d.

◆ useScalableDistance()

bool KisSmoothingOptions::useScalableDistance ( ) const

Definition at line 123 of file kis_smoothing_options.cpp.

124{
125 return m_d->smoothingType != STABILIZER ? m_d->useScalableDistance : true;
126}

References m_d, and STABILIZER.

Member Data Documentation

◆ m_d

const QScopedPointer<Private> KisSmoothingOptions::m_d
private

Definition at line 74 of file kis_smoothing_options.h.


The documentation for this class was generated from the following files: