fix: ignore stale coordinate data for panels + convert wavyline to use new qt 6.12 canvas painter api

This commit is contained in:
2026-10-12 15:54:32 +02:00
parent 3883917228
commit 255db9e533
16 changed files with 222 additions and 185 deletions
+11 -9
View File
@@ -1,11 +1,14 @@
#pragma once
#include <qqmlintegration.h>
#include <qquickpainteditem.h>
#include <QCanvasPainterItem>
#include <QColor>
namespace ZShell::controls {
class WavyLine : public QQuickPaintedItem {
class WavyLineRenderer;
class WavyLine : public QCanvasPainterItem {
Q_OBJECT
QML_ELEMENT
@@ -82,9 +85,7 @@ class WavyLine : public QQuickPaintedItem {
[[nodiscard]] qreal value() const;
void setValue(qreal value);
void paint(QPainter* painter) override;
signals:
signals:
void lineWidthChanged();
void amplitudeMultiplierChanged();
void frequencyChanged();
@@ -98,9 +99,12 @@ class WavyLine : public QQuickPaintedItem {
void radiusChanged();
void valueChanged();
protected:
[[nodiscard]] QCanvasPainterItemRenderer* createItemRenderer()
const override;
private:
void paintLinear(QPainter* painter);
void paintArc(QPainter* painter);
friend class WavyLineRenderer;
int m_lineWidth;
qreal m_amplitudeMultiplier;
@@ -114,8 +118,6 @@ class WavyLine : public QQuickPaintedItem {
qreal m_fullAngle;
qreal m_radius;
qreal m_value;
qreal m_startAngleRad;
qreal m_fullAngleRad;
};
} // namespace ZShell::controls