File indexing completed on 2024-12-22 04:12:59

0001 /*
0002  *  SPDX-FileCopyrightText: 2012 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KIS_SMOOTHING_OPTIONS_H
0007 #define KIS_SMOOTHING_OPTIONS_H
0008 
0009 #include <qglobal.h>
0010 #include <QObject>
0011 #include <QSharedPointer>
0012 #include <QScopedPointer>
0013 #include <kritaui_export.h>
0014 
0015 
0016 class KRITAUI_EXPORT KisSmoothingOptions : public QObject
0017 {
0018     Q_OBJECT
0019 public:
0020     enum SmoothingType {
0021         NO_SMOOTHING = 0,
0022         SIMPLE_SMOOTHING,
0023         WEIGHTED_SMOOTHING,
0024         STABILIZER
0025     };
0026 
0027 public:
0028 
0029     KisSmoothingOptions(bool useSavedSmoothing = true);
0030     ~KisSmoothingOptions() override;
0031 
0032     SmoothingType smoothingType() const;
0033     void setSmoothingType(SmoothingType value);
0034 
0035     qreal smoothnessDistance() const;
0036     void setSmoothnessDistance(qreal value);
0037 
0038     qreal tailAggressiveness() const;
0039     void setTailAggressiveness(qreal value);
0040 
0041     bool smoothPressure() const;
0042     void setSmoothPressure(bool value);
0043 
0044     bool useScalableDistance() const;
0045     void setUseScalableDistance(bool value);
0046 
0047     qreal delayDistance() const;
0048     void setDelayDistance(qreal value);
0049 
0050     void setUseDelayDistance(bool value);
0051     bool useDelayDistance() const;
0052 
0053     void setFinishStabilizedCurve(bool value);
0054     bool finishStabilizedCurve() const;
0055 
0056     void setStabilizeSensors(bool value);
0057     bool stabilizeSensors() const;
0058 
0059 Q_SIGNALS:
0060     void sigSmoothingTypeChanged();
0061 
0062 private Q_SLOTS:
0063     void slotWriteConfig();
0064 
0065 private:
0066     struct Private;
0067     const QScopedPointer<Private> m_d;
0068 };
0069 
0070 typedef QSharedPointer<KisSmoothingOptions> KisSmoothingOptionsSP;
0071 
0072 #endif // KIS_SMOOTHING_OPTIONS_H