blob: 1544b66b15348d9e9e0a431ef6a8c3d6a6906c40 (
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
34
35
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef DATASOURCE_H
#define DATASOURCE_H
#include <QtDataVisualization/QSurface3DSeries>
#include <QtQml/qqmlregistration.h>
//! [1]
class DataSource : public QObject
{
Q_OBJECT
QML_ELEMENT
//! [1]
public:
explicit DataSource(QObject *parent = 0);
virtual ~DataSource();
//! [0]
Q_INVOKABLE void generateData(int cacheCount, int rowCount, int columnCount,
float xMin, float xMax, float yMin, float yMax,
float zMin, float zMax);
Q_INVOKABLE void update(QSurface3DSeries *series);
//! [0]
private:
void clearData();
QList<QSurfaceDataArray> m_data;
int m_index;
QSurfaceDataArray *m_resetArray;
};
#endif
|