more unfinished changes, process tab for dashboard

This commit is contained in:
2026-09-30 14:26:50 +02:00
parent 0bfda04e91
commit 359f832609
98 changed files with 8633 additions and 2983 deletions
@@ -15,6 +15,9 @@ class CircularBuffer : public QObject {
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QList<qreal> values READ values NOTIFY valuesChanged)
Q_PROPERTY(qreal maximum READ maximum NOTIFY valuesChanged)
Q_PROPERTY(
int smoothingRadius READ smoothingRadius WRITE setSmoothingRadius NOTIFY
smoothingRadiusChanged)
public:
explicit CircularBuffer(QObject* parent = nullptr);
@@ -26,20 +29,34 @@ class CircularBuffer : public QObject {
[[nodiscard]] QList<qreal> values() const;
[[nodiscard]] qreal maximum() const;
[[nodiscard]] int smoothingRadius() const;
void setSmoothingRadius(int radius);
Q_INVOKABLE void push(qreal value);
Q_INVOKABLE void clear();
Q_INVOKABLE [[nodiscard]] qreal at(int index) const;
Q_INVOKABLE [[nodiscard]] qreal smoothedAt(int index) const;
signals:
void capacityChanged();
void countChanged();
void valuesChanged();
void smoothingRadiusChanged();
private:
void writeSmoothedAt(int logicalIndex);
void updateSmoothedTail();
void recomputeAllSmoothed();
QVector<qreal> m_data;
QVector<qreal> m_smoothed;
int m_head = 0;
int m_count = 0;
int m_capacity = 0;
int m_smoothingRadius = 0;
};
} // namespace ZShell::internal