summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/qmloscilloscope/datasource.cpp7
-rw-r--r--examples/qmloscilloscope/datasource.h3
-rw-r--r--examples/qmloscilloscope/main.cpp2
3 files changed, 3 insertions, 9 deletions
diff --git a/examples/qmloscilloscope/datasource.cpp b/examples/qmloscilloscope/datasource.cpp
index 3d2f908d..922ed576 100644
--- a/examples/qmloscilloscope/datasource.cpp
+++ b/examples/qmloscilloscope/datasource.cpp
@@ -17,18 +17,14 @@
****************************************************************************/
#include "datasource.h"
-#include <QtQuick/QQuickView>
-#include <QtQuick/QQuickItem>
-#include <QDebug>
#include <qmath.h>
using namespace QtDataVisualization;
Q_DECLARE_METATYPE(QSurface3DSeries *)
-DataSource::DataSource(QQuickView *appViewer, QObject *parent) :
+DataSource::DataSource(QObject *parent) :
QObject(parent),
- m_appViewer(appViewer),
m_index(-1),
m_resetArray(0)
{
@@ -46,7 +42,6 @@ void DataSource::generateData(int cacheCount, int rowCount, int columnCount,
float zMin, float zMax)
{
clearData();
-
// Re-create the cache array
m_data.resize(cacheCount);
for (int i(0); i < cacheCount; i++) {
diff --git a/examples/qmloscilloscope/datasource.h b/examples/qmloscilloscope/datasource.h
index 6ef0cacb..51d3e8e0 100644
--- a/examples/qmloscilloscope/datasource.h
+++ b/examples/qmloscilloscope/datasource.h
@@ -30,7 +30,7 @@ class DataSource : public QObject
{
Q_OBJECT
public:
- explicit DataSource(QQuickView *appViewer, QObject *parent = 0);
+ explicit DataSource(QObject *parent = 0);
virtual ~DataSource();
//! [0]
@@ -46,7 +46,6 @@ public slots:
private:
void clearData();
- QQuickView *m_appViewer;
QVector<QSurfaceDataArray> m_data;
int m_index;
QSurfaceDataArray *m_resetArray;
diff --git a/examples/qmloscilloscope/main.cpp b/examples/qmloscilloscope/main.cpp
index c4e2430a..8cbaba71 100644
--- a/examples/qmloscilloscope/main.cpp
+++ b/examples/qmloscilloscope/main.cpp
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
viewer.setTitle(QStringLiteral("Oscilloscope example"));
//! [0]
- DataSource dataSource(&viewer);
+ DataSource dataSource;
viewer.rootContext()->setContextProperty("dataSource", &dataSource);
//! [0]