mirror of https://github.com/qt/qtgraphs.git
Graphs: remove scaleRole constructor from QItemModelScatterDataProxy
Based on API review: Removed the constructor overload that accepted a scaleRole parameter in QItemModelScatterDataProxy. Pick-to: 6.10 Task-number: QTBUG-137478 Change-Id: Iae85f6321e53189f68da5b15d586c9b52fadfd25 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This commit is contained in:
parent
f1ae92e76c
commit
74ef58cc32
|
|
@ -395,33 +395,6 @@ QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemM
|
||||||
d->connectItemModelHandler();
|
d->connectItemModelHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* Constructs QItemModelScatterDataProxy with \a itemModel and an optional \a
|
|
||||||
* parent. The proxy doesn't take ownership of the \a itemModel, as item models
|
|
||||||
* are typically owned by other controls. The xPosRole property is set to \a
|
|
||||||
* xPosRole, the yPosRole property to \a yPosRole, the zPosRole property to \a
|
|
||||||
* zPosRole, the rotation property to \a rotationRole, and the scale role
|
|
||||||
* property to \a scaleRole.
|
|
||||||
*/
|
|
||||||
QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
|
|
||||||
const QString &xPosRole,
|
|
||||||
const QString &yPosRole,
|
|
||||||
const QString &zPosRole,
|
|
||||||
const QString &rotationRole,
|
|
||||||
const QString &scaleRole,
|
|
||||||
QObject *parent)
|
|
||||||
: QScatterDataProxy(*(new QItemModelScatterDataProxyPrivate(this)), parent)
|
|
||||||
{
|
|
||||||
Q_D(QItemModelScatterDataProxy);
|
|
||||||
d->m_itemModelHandler->setItemModel(itemModel);
|
|
||||||
d->m_xPosRole = xPosRole;
|
|
||||||
d->m_yPosRole = yPosRole;
|
|
||||||
d->m_zPosRole = zPosRole;
|
|
||||||
d->m_rotationRole = rotationRole;
|
|
||||||
d->m_scaleRole = scaleRole;
|
|
||||||
d->connectItemModelHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Destroys QItemModelScatterDataProxy.
|
* Destroys QItemModelScatterDataProxy.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -62,13 +62,7 @@ public:
|
||||||
const QString &zPosRole,
|
const QString &zPosRole,
|
||||||
const QString &rotationRole,
|
const QString &rotationRole,
|
||||||
QObject *parent = nullptr);
|
QObject *parent = nullptr);
|
||||||
explicit QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
|
|
||||||
const QString &xPosRole,
|
|
||||||
const QString &yPosRole,
|
|
||||||
const QString &zPosRole,
|
|
||||||
const QString &rotationRole,
|
|
||||||
const QString &scaleRole,
|
|
||||||
QObject *parent = nullptr);
|
|
||||||
~QItemModelScatterDataProxy() override;
|
~QItemModelScatterDataProxy() override;
|
||||||
|
|
||||||
void setItemModel(QAbstractItemModel *itemModel);
|
void setItemModel(QAbstractItemModel *itemModel);
|
||||||
|
|
|
||||||
|
|
@ -78,18 +78,6 @@ void tst_proxy::construct()
|
||||||
QCOMPARE(proxy->scaleRole(), QString(""));
|
QCOMPARE(proxy->scaleRole(), QString(""));
|
||||||
delete proxy;
|
delete proxy;
|
||||||
delete series;
|
delete series;
|
||||||
|
|
||||||
proxy = new QItemModelScatterDataProxy(table->model(), "x", "y", "z", "rot", "scale");
|
|
||||||
series = new QScatter3DSeries(proxy);
|
|
||||||
QVERIFY(proxy);
|
|
||||||
QVERIFY(series);
|
|
||||||
QCOMPARE(proxy->xPosRole(), QString("x"));
|
|
||||||
QCOMPARE(proxy->yPosRole(), QString("y"));
|
|
||||||
QCOMPARE(proxy->zPosRole(), QString("z"));
|
|
||||||
QCOMPARE(proxy->rotationRole(), QString("rot"));
|
|
||||||
QCOMPARE(proxy->scaleRole(), QString("scale"));
|
|
||||||
delete proxy;
|
|
||||||
delete series;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_proxy::initialProperties()
|
void tst_proxy::initialProperties()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue