3#include <QtQuick/private/qquickpath_p.h>
5#include "qml_material/export.hpp"
15class QML_MATERIAL_API PathWave :
public QQuickCurve {
17 Q_PROPERTY(qreal amplitude READ amplitude WRITE set_amplitude NOTIFY amplitudeChanged FINAL)
19 qreal waveLength READ wave_length WRITE set_wave_length NOTIFY waveLengthChanged FINAL)
20 Q_PROPERTY(qreal phase READ phase WRITE set_phase NOTIFY phaseChanged FINAL)
22 qreal smoothness READ smoothness WRITE set_smoothness NOTIFY smoothnessChanged FINAL)
23 QML_NAMED_ELEMENT(PathWave)
24 QML_ADDED_IN_VERSION(2, 0)
27 explicit PathWave(QObject* parent =
nullptr);
30 auto amplitude() const noexcept -> qreal;
31 auto wave_length() const noexcept -> qreal;
32 auto phase() const noexcept -> qreal;
33 auto smoothness() const noexcept -> qreal;
35 void set_amplitude(qreal);
36 void set_wave_length(qreal);
37 void set_phase(qreal);
38 void set_smoothness(qreal);
40 void addToPath(QPainterPath& path, const QQuickPathData& data) override;
43 void amplitudeChanged();
44 void waveLengthChanged();
46 void smoothnessChanged();
49 qreal m_amplitude { 4.0 };
50 qreal m_wave_length { 30.0 };
51 qreal m_phase { 0.0 };
52 qreal m_smoothness { 0.48 };