diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/audiolevels/audiolevelsiodevice.cpp | 4 | ||||
-rw-r--r-- | examples/qmlbars/qml/qmlbars/main.qml | 1 | ||||
-rw-r--r-- | examples/qmlcustominput/qml/qmlcustominput/main.qml | 3 | ||||
-rw-r--r-- | examples/qmlscatter/doc/src/qmlscatter.qdoc | 7 | ||||
-rw-r--r-- | examples/qmlscatter/qml/qmlscatter/main.qml | 1 | ||||
-rw-r--r-- | examples/qmlsurface/qml/qmlsurface/main.qml | 1 | ||||
-rw-r--r-- | examples/scatter/doc/src/scatter.qdoc | 2 | ||||
-rw-r--r-- | examples/scatter/scatterdatamodifier.cpp | 1 | ||||
-rw-r--r-- | examples/surface/surfacegraph.cpp | 1 |
9 files changed, 12 insertions, 9 deletions
diff --git a/examples/audiolevels/audiolevelsiodevice.cpp b/examples/audiolevels/audiolevelsiodevice.cpp index 970677c6..e4576638 100644 --- a/examples/audiolevels/audiolevelsiodevice.cpp +++ b/examples/audiolevels/audiolevelsiodevice.cpp @@ -66,7 +66,7 @@ qint64 AudioLevelsIODevice::writeData(const char *data, qint64 maxSize) for (int i = 0; i <= middleRow; i++) { QBarDataItem *srcPos = m_array->at(i)->data(); QBarDataItem *dstPos = srcPos + newDataSize; - memmove(dstPos, srcPos, (rowSize - newDataSize) * sizeof(QBarDataItem)); + memmove((void *)dstPos, (void *)srcPos, (rowSize - newDataSize) * sizeof(QBarDataItem)); } } @@ -90,7 +90,7 @@ qint64 AudioLevelsIODevice::writeData(const char *data, qint64 maxSize) for (int i = rowCount - 1; i > middleRow; i--) { QBarDataItem *srcPos = m_array->at(index++)->data(); QBarDataItem *dstPos = m_array->at(i)->data(); - memcpy(dstPos, srcPos, rowSize * sizeof(QBarDataItem)); + memcpy((void *)dstPos, (void *)srcPos, rowSize * sizeof(QBarDataItem)); } // Reset the proxy array now that data has been updated to trigger a redraw. diff --git a/examples/qmlbars/qml/qmlbars/main.qml b/examples/qmlbars/qml/qmlbars/main.qml index 1f8c1a3d..0581f834 100644 --- a/examples/qmlbars/qml/qmlbars/main.qml +++ b/examples/qmlbars/qml/qmlbars/main.qml @@ -27,7 +27,6 @@ Item { id: mainview width: 1280 height: 1024 - visible: true property int buttonLayoutHeight: 180; state: Screen.width < Screen.height ? "portrait" : "landscape" diff --git a/examples/qmlcustominput/qml/qmlcustominput/main.qml b/examples/qmlcustominput/qml/qmlcustominput/main.qml index f777fd6b..54ec3342 100644 --- a/examples/qmlcustominput/qml/qmlcustominput/main.qml +++ b/examples/qmlcustominput/qml/qmlcustominput/main.qml @@ -25,7 +25,6 @@ Item { id: mainView width: 1280 height: 720 - visible: true Data { id: graphData @@ -182,7 +181,7 @@ Item { id: cameraToggle Layout.fillHeight: true Layout.minimumWidth: parent.width / 3 - text: "Animate Camera" + text: "Pause Camera" onClicked: { cameraAnimationX.paused = !cameraAnimationX.paused; diff --git a/examples/qmlscatter/doc/src/qmlscatter.qdoc b/examples/qmlscatter/doc/src/qmlscatter.qdoc index b0f1fd1f..06719ffc 100644 --- a/examples/qmlscatter/doc/src/qmlscatter.qdoc +++ b/examples/qmlscatter/doc/src/qmlscatter.qdoc @@ -86,10 +86,15 @@ The last \c import just imports all the qml files in the same directory as our \c {main.qml}, because that's where \c newbutton.qml and \c data.qml are. - Then we create our main \c Item, call it \c mainView and set it visible: + Then we create our main \c Item and call it \c mainView: \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 1 + \note The Qt Creator application wizard will set a \c Rectangle item as the main item, which + is opaque white by default. This doesn't work for us, because the graphs are rendered behind the other + QML elements. We change the main item type to \c Item, which is invisible. This way the graph is + not covered by the main item. + Then we'll add another \c Item inside it, and call it \c dataView. This will be the item to hold the Scatter3D graph. We'll anchor it to the parent bottom: diff --git a/examples/qmlscatter/qml/qmlscatter/main.qml b/examples/qmlscatter/qml/qmlscatter/main.qml index 22eab76b..62727f84 100644 --- a/examples/qmlscatter/qml/qmlscatter/main.qml +++ b/examples/qmlscatter/qml/qmlscatter/main.qml @@ -26,7 +26,6 @@ import "." //! [1] Item { id: mainView - visible: true //! [1] //! [4] diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/qmlsurface/qml/qmlsurface/main.qml index 07a07891..9f37a3f5 100644 --- a/examples/qmlsurface/qml/qmlsurface/main.qml +++ b/examples/qmlsurface/qml/qmlsurface/main.qml @@ -25,7 +25,6 @@ Item { id: mainview width: 1280 height: 720 - visible: true property int buttonMaximumWidth: surfaceGridToggle.width property int buttonMinimumHeight: seriesToggle.height diff --git a/examples/scatter/doc/src/scatter.qdoc b/examples/scatter/doc/src/scatter.qdoc index 173ea6e3..9bef441c 100644 --- a/examples/scatter/doc/src/scatter.qdoc +++ b/examples/scatter/doc/src/scatter.qdoc @@ -80,7 +80,7 @@ \snippet ../examples/scatter/scatterdatamodifier.cpp 1 And finally we create a QScatterDataProxy and the associated QScatter3DSeries. We set custom label format - for the series and add it to the graph: + and mesh smoothing for the series and add it to the graph: \snippet ../examples/scatter/scatterdatamodifier.cpp 2 diff --git a/examples/scatter/scatterdatamodifier.cpp b/examples/scatter/scatterdatamodifier.cpp index ade4eb59..6cdb1458 100644 --- a/examples/scatter/scatterdatamodifier.cpp +++ b/examples/scatter/scatterdatamodifier.cpp @@ -57,6 +57,7 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter) QScatterDataProxy *proxy = new QScatterDataProxy; QScatter3DSeries *series = new QScatter3DSeries(proxy); series->setItemLabelFormat("@xTitle: @xLabel @yTitle: @yLabel @zTitle: @zLabel"); + series->setMeshSmooth(m_smooth); m_graph->addSeries(series); //! [2] diff --git a/examples/surface/surfacegraph.cpp b/examples/surface/surfacegraph.cpp index 24ab3715..7ebb6b72 100644 --- a/examples/surface/surfacegraph.cpp +++ b/examples/surface/surfacegraph.cpp @@ -49,6 +49,7 @@ SurfaceGraph::SurfaceGraph(Q3DSurface *surface) QImage heightMapImage(":/maps/mountain"); m_heightMapProxy = new QHeightMapSurfaceDataProxy(heightMapImage); m_heightMapSeries = new QSurface3DSeries(m_heightMapProxy); + m_heightMapSeries->setItemLabelFormat(QStringLiteral("(@xLabel, @zLabel): @yLabel")); m_heightMapProxy->setValueRanges(34.0f, 40.0f, 18.0f, 24.0f); //! [2] m_heightMapWidth = heightMapImage.width(); |