fix: ignore stale coordinate data for panels + convert wavyline to use new qt 6.12 canvas painter api
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user