2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2013-06-11 18:47:54 +00:00
|
|
|
|
|
|
|
#ifndef GRAPH_H
|
|
|
|
#define GRAPH_H
|
|
|
|
|
|
|
|
#include <QQuickItem>
|
|
|
|
|
|
|
|
class Graph : public QQuickItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2019-08-21 16:34:21 +00:00
|
|
|
QML_ELEMENT
|
2013-06-11 18:47:54 +00:00
|
|
|
public:
|
|
|
|
Graph();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
|
2020-03-23 15:07:09 +00:00
|
|
|
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry);
|
2013-06-11 18:47:54 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void appendSample(qreal value);
|
|
|
|
void removeFirstSample();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QList<qreal> m_samples;
|
|
|
|
|
|
|
|
bool m_samplesChanged;
|
|
|
|
bool m_geometryChanged;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GRAPH_H
|