summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2022-02-10 07:02:44 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-10 10:49:23 +0000
commit3ad36d9ca74fa7b440309ca12205122625b88862 (patch)
treebcdae5bf9554a59c4b6063427c1f198433757169
parent96abf29fa465199904f18ae55e276e86cb9796a7 (diff)
Fix API review finding
Rename wireFrameColor to wireframeColor to be consistent with other usage of wirfeframe in QtDataVisualization. Change-Id: I1ae6cd7372e46efa2a5d83856126d45355fcff60 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e82f53b35010dbeae6a5e7d87e007518a4eb0cbb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml12
-rw-r--r--src/datavisualization/data/qsurface3dseries.cpp22
-rw-r--r--src/datavisualization/data/qsurface3dseries.h8
-rw-r--r--src/datavisualization/data/qsurface3dseries_p.h4
-rw-r--r--src/datavisualization/engine/drawer.cpp2
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache.cpp2
-rw-r--r--src/datavisualization/utils/surfaceobject_p.h6
-rw-r--r--tests/auto/cpptest/q3dsurface-series/tst_series.cpp6
-rw-r--r--tests/auto/qmltest/surface3d/tst_surfaceseries.qml10
9 files changed, 36 insertions, 36 deletions
diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
index f128ac45..0be0999f 100644
--- a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
@@ -160,15 +160,15 @@ Rectangle {
Layout.fillHeight: true
text: "Red surface grid color"
onClicked: {
- if (Qt.colorEqual(surfaceSeries.wireFrameColor, "#000000")
- && Qt.colorEqual(heightSeries.wireFrameColor, "#000000")) {
- surfaceSeries.wireFrameColor = "red"
- heightSeries.wireFrameColor = "red"
+ if (Qt.colorEqual(surfaceSeries.wireframeColor, "#000000")
+ && Qt.colorEqual(heightSeries.wireframeColor, "#000000")) {
+ surfaceSeries.wireframeColor = "red"
+ heightSeries.wireframeColor = "red"
text = "Black surface grid color"
}
else {
- surfaceSeries.wireFrameColor = "black"
- heightSeries.wireFrameColor = "black"
+ surfaceSeries.wireframeColor = "black"
+ heightSeries.wireframeColor = "black"
text = "Red surface grid color"
}
}
diff --git a/src/datavisualization/data/qsurface3dseries.cpp b/src/datavisualization/data/qsurface3dseries.cpp
index f3e8e1fa..492d572e 100644
--- a/src/datavisualization/data/qsurface3dseries.cpp
+++ b/src/datavisualization/data/qsurface3dseries.cpp
@@ -166,7 +166,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- * \qmlproperty color Surface3DSeries::wireFrameColor
+ * \qmlproperty color Surface3DSeries::wireframeColor
* \since 6.3
*
* The color used to draw the gridlines of the surface wireframe.
@@ -405,22 +405,22 @@ QString QSurface3DSeries::textureFile() const
}
/*!
- * \property QSurface3DSeries::wireFrameColor
+ * \property QSurface3DSeries::wireframeColor
* \since 6.3
*
* \brief The color for the surface wireframe.
*/
-void QSurface3DSeries::setWireFrameColor(const QColor &color)
+void QSurface3DSeries::setWireframeColor(const QColor &color)
{
- if (dptr()->m_wireFrameColor != color) {
- dptr()->setWireFrameColor(color);
- emit wireFrameColorChanged(color);
+ if (dptr()->m_wireframeColor != color) {
+ dptr()->setWireframeColor(color);
+ emit wireframeColorChanged(color);
}
}
-QColor QSurface3DSeries::wireFrameColor() const
+QColor QSurface3DSeries::wireframeColor() const
{
- return dptrc()->m_wireFrameColor;
+ return dptrc()->m_wireframeColor;
}
/*!
* \internal
@@ -445,7 +445,7 @@ QSurface3DSeriesPrivate::QSurface3DSeriesPrivate(QSurface3DSeries *q)
m_selectedPoint(Surface3DController::invalidSelectionPosition()),
m_flatShadingEnabled(true),
m_drawMode(QSurface3DSeries::DrawSurfaceAndWireframe),
- m_wireFrameColor(Qt::black)
+ m_wireframeColor(Qt::black)
{
m_itemLabelFormat = QStringLiteral("@xLabel, @yLabel, @zLabel");
m_mesh = QAbstract3DSeries::MeshSphere;
@@ -578,9 +578,9 @@ void QSurface3DSeriesPrivate::setTexture(const QImage &texture)
static_cast<Surface3DController *>(m_controller)->updateSurfaceTexture(qptr());
}
-void QSurface3DSeriesPrivate::setWireFrameColor(const QColor &color)
+void QSurface3DSeriesPrivate::setWireframeColor(const QColor &color)
{
- m_wireFrameColor = color;
+ m_wireframeColor = color;
if (m_controller)
m_controller->markSeriesVisualsDirty();
}
diff --git a/src/datavisualization/data/qsurface3dseries.h b/src/datavisualization/data/qsurface3dseries.h
index 508cbba0..59c61dad 100644
--- a/src/datavisualization/data/qsurface3dseries.h
+++ b/src/datavisualization/data/qsurface3dseries.h
@@ -48,7 +48,7 @@ class Q_DATAVISUALIZATION_EXPORT QSurface3DSeries : public QAbstract3DSeries
Q_PROPERTY(DrawFlags drawMode READ drawMode WRITE setDrawMode NOTIFY drawModeChanged)
Q_PROPERTY(QImage texture READ texture WRITE setTexture NOTIFY textureChanged)
Q_PROPERTY(QString textureFile READ textureFile WRITE setTextureFile NOTIFY textureFileChanged)
- Q_PROPERTY(QColor wireFrameColor READ wireFrameColor WRITE setWireFrameColor NOTIFY wireFrameColorChanged REVISION(6, 3))
+ Q_PROPERTY(QColor wireframeColor READ wireframeColor WRITE setWireframeColor NOTIFY wireframeColorChanged REVISION(6, 3))
public:
enum DrawFlag {
@@ -82,8 +82,8 @@ public:
void setTextureFile(const QString &filename);
QString textureFile() const;
- void setWireFrameColor(const QColor &color);
- QColor wireFrameColor() const;
+ void setWireframeColor(const QColor &color);
+ QColor wireframeColor() const;
Q_SIGNALS:
void dataProxyChanged(QSurfaceDataProxy *proxy);
@@ -93,7 +93,7 @@ Q_SIGNALS:
void drawModeChanged(QSurface3DSeries::DrawFlags mode);
void textureChanged(const QImage &image);
void textureFileChanged(const QString &filename);
- Q_REVISION(6, 3) void wireFrameColorChanged(const QColor &color);
+ Q_REVISION(6, 3) void wireframeColorChanged(const QColor &color);
protected:
explicit QSurface3DSeries(QSurface3DSeriesPrivate *d, QObject *parent = nullptr);
diff --git a/src/datavisualization/data/qsurface3dseries_p.h b/src/datavisualization/data/qsurface3dseries_p.h
index 3b35cd22..b1b1a4cb 100644
--- a/src/datavisualization/data/qsurface3dseries_p.h
+++ b/src/datavisualization/data/qsurface3dseries_p.h
@@ -60,7 +60,7 @@ public:
void setFlatShadingEnabled(bool enabled);
void setDrawMode(QSurface3DSeries::DrawFlags mode);
void setTexture(const QImage &texture);
- void setWireFrameColor(const QColor &color);
+ void setWireframeColor(const QColor &color);
private:
QSurface3DSeries *qptr();
@@ -70,7 +70,7 @@ private:
QSurface3DSeries::DrawFlags m_drawMode;
QImage m_texture;
QString m_textureFile;
- QColor m_wireFrameColor;
+ QColor m_wireframeColor;
private:
friend class QSurface3DSeries;
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index 853e800b..8b2dcc15 100644
--- a/src/datavisualization/engine/drawer.cpp
+++ b/src/datavisualization/engine/drawer.cpp
@@ -198,7 +198,7 @@ void Drawer::drawSelectionObject(ShaderHelper *shader, AbstractObjectHelper *obj
void Drawer::drawSurfaceGrid(ShaderHelper *shader, SurfaceObject *object)
{
// Get grid line color
- QVector4D lineColor = Utils::vectorFromColor(object->wireFrameColor());
+ QVector4D lineColor = Utils::vectorFromColor(object->wireframeColor());
shader->setUniformValue(shader->color(), lineColor);
// 1st attribute buffer : vertices
diff --git a/src/datavisualization/engine/surfaceseriesrendercache.cpp b/src/datavisualization/engine/surfaceseriesrendercache.cpp
index 545cee7e..11c573fa 100644
--- a/src/datavisualization/engine/surfaceseriesrendercache.cpp
+++ b/src/datavisualization/engine/surfaceseriesrendercache.cpp
@@ -66,7 +66,7 @@ void SurfaceSeriesRenderCache::populate(bool newSeries)
QSurface3DSeries::DrawFlags drawMode = series()->drawMode();
m_surfaceVisible = drawMode.testFlag(QSurface3DSeries::DrawSurface);
m_surfaceGridVisible = drawMode.testFlag(QSurface3DSeries::DrawWireframe);
- QColor lineColor = series()->wireFrameColor();
+ QColor lineColor = series()->wireframeColor();
m_surfaceObj->setLineColor(lineColor);
m_sliceSurfaceObj->setLineColor(lineColor);
diff --git a/src/datavisualization/utils/surfaceobject_p.h b/src/datavisualization/utils/surfaceobject_p.h
index 9e317bb2..dd9db348 100644
--- a/src/datavisualization/utils/surfaceobject_p.h
+++ b/src/datavisualization/utils/surfaceobject_p.h
@@ -96,8 +96,8 @@ public:
float minYValue() const { return m_minY; }
float maxYValue() const { return m_maxY; }
inline void activateSurfaceTexture(bool value) { m_returnTextureBuffer = value; }
- inline void setLineColor(const QColor &color) { m_wireFrameColor = color; }
- inline const QColor &wireFrameColor() const { return m_wireFrameColor; }
+ inline void setLineColor(const QColor &color) { m_wireframeColor = color; }
+ inline const QColor &wireframeColor() const { return m_wireframeColor; }
private:
void createCoarseIndices(GLint *indices, int &p, int row, int upperRow, int j);
@@ -132,7 +132,7 @@ private:
bool m_returnTextureBuffer = false;
SurfaceObject::DataDimensions m_dataDimension;
SurfaceObject::DataDimensions m_oldDataDimension = DataDimensions(-1);
- QColor m_wireFrameColor;
+ QColor m_wireframeColor;
};
QT_END_NAMESPACE
diff --git a/tests/auto/cpptest/q3dsurface-series/tst_series.cpp b/tests/auto/cpptest/q3dsurface-series/tst_series.cpp
index 9a097d6e..3e87db6e 100644
--- a/tests/auto/cpptest/q3dsurface-series/tst_series.cpp
+++ b/tests/auto/cpptest/q3dsurface-series/tst_series.cpp
@@ -92,7 +92,7 @@ void tst_series::initialProperties()
QCOMPARE(m_series->isFlatShadingEnabled(), true);
QCOMPARE(m_series->isFlatShadingSupported(), true);
QCOMPARE(m_series->selectedPoint(), m_series->invalidSelectionPosition());
- QCOMPARE(m_series->wireFrameColor(), QColor(Qt::black));
+ QCOMPARE(m_series->wireframeColor(), QColor(Qt::black));
// Common properties. The ones identical between different series are tested in QBar3DSeries tests
QCOMPARE(m_series->itemLabelFormat(), QString("@xLabel, @yLabel, @zLabel"));
QCOMPARE(m_series->mesh(), QAbstract3DSeries::MeshSphere);
@@ -107,12 +107,12 @@ void tst_series::initializeProperties()
m_series->setDrawMode(QSurface3DSeries::DrawWireframe);
m_series->setFlatShadingEnabled(false);
m_series->setSelectedPoint(QPoint(0, 0));
- m_series->setWireFrameColor(QColor(Qt::red));
+ m_series->setWireframeColor(QColor(Qt::red));
QCOMPARE(m_series->drawMode(), QSurface3DSeries::DrawWireframe);
QCOMPARE(m_series->isFlatShadingEnabled(), false);
QCOMPARE(m_series->selectedPoint(), QPoint(0, 0));
- QCOMPARE(m_series->wireFrameColor(), QColor(Qt::red));
+ QCOMPARE(m_series->wireframeColor(), QColor(Qt::red));
// Common properties. The ones identical between different series are tested in QBar3DSeries tests
m_series->setMesh(QAbstract3DSeries::MeshPyramid);
diff --git a/tests/auto/qmltest/surface3d/tst_surfaceseries.qml b/tests/auto/qmltest/surface3d/tst_surfaceseries.qml
index e4707f60..f8e9ac7d 100644
--- a/tests/auto/qmltest/surface3d/tst_surfaceseries.qml
+++ b/tests/auto/qmltest/surface3d/tst_surfaceseries.qml
@@ -79,7 +79,7 @@ Item {
flatShadingEnabled: false
selectedPoint: Qt.point(0, 0)
textureFile: ":\customtexture.jpg"
- wireFrameColor: "red"
+ wireframeColor: "red"
baseColor: "blue"
baseGradient: gradient1
@@ -124,7 +124,7 @@ Item {
compare(initial.flatShadingEnabled, true)
compare(initial.flatShadingSupported, true)
compare(initial.selectedPoint, Qt.point(-1, -1))
- compare(initial.wireFrameColor, "#000000")
+ compare(initial.wireframeColor, "#000000")
}
function test_2_initial_common() {
@@ -158,7 +158,7 @@ Item {
compare(initialized.flatShadingEnabled, false)
compare(initialized.selectedPoint, Qt.point(0, 0))
compare(initialized.textureFile, ":\customtexture.jpg")
- compare(initialized.wireFrameColor, "#ff0000")
+ compare(initialized.wireframeColor, "#ff0000")
}
function test_2_initialized_common() {
@@ -190,7 +190,7 @@ Item {
change.flatShadingEnabled = false
change.selectedPoint = Qt.point(0, 0)
change.textureFile = ":\customtexture.jpg"
- change.wireFrameColor = "green"
+ change.wireframeColor = "green"
}
function test_2_test_change() {
@@ -200,7 +200,7 @@ Item {
compare(change.flatShadingEnabled, false)
compare(change.selectedPoint, Qt.point(0, 0))
compare(change.textureFile, ":\customtexture.jpg")
- compare(change.wireFrameColor, "#008000")
+ compare(change.wireframeColor, "#008000")
}
function test_3_change_common() {