QmlMaterial 0.1.0
Loading...
Searching...
No Matches
squiggly_progress_geometry.hpp
1#pragma once
2
3#include <QPainterPath>
4#include <QSizeF>
5#include <QVector2D>
6#include "qml_material/export.hpp"
7
8namespace qml_material
9{
10struct SquigglyProgressState {
11 qreal progress = 0;
12 qreal phase = 0;
13 qreal amplitudeFraction = 0;
14 qreal waveLength = 20;
15 qreal waveAmplitude = 1.5;
16 bool transitionEnabled = true;
17 QVector2D bufferedRange;
18};
19struct SquigglyProgressPaths {
20 QPainterPath active;
21 QPainterPath inactive;
22 QPointF startCap;
23 bool valid = false;
24 QPainterPath buffered;
25};
26class QML_MATERIAL_API SquigglyProgressGeometry {
27public:
28 static SquigglyProgressPaths render(const SquigglyProgressState&, QSizeF);
29};
30} // namespace qml_material