summaryrefslogtreecommitdiffstats
path: root/tests/manual/qmlbenchmark2d/datasource.h
blob: 08b4459d004ba797e54522feb38ff79006223206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef DATASOURCE_H
#define DATASOURCE_H

#include <QList>
#include <QObject>
#include <QPointF>

QT_FORWARD_DECLARE_CLASS(QQuickView)

class DataSource : public QObject
{
    Q_OBJECT

public:
    explicit DataSource(QObject *parent = nullptr);

public slots:
    void generateData();
    void reset(int dataScale);
    void update(QObject *series);

private:
    QList<QList<QList<QPointF>>> m_data;
    int m_index = -1;
    int m_testIndex = 0;
    qint64 m_timer = 0;
    int m_dataScale = 1000;
};

#endif