diff options
Diffstat (limited to 'src/qml/qml/qqmlvaluetype.cpp')
-rw-r--r-- | src/qml/qml/qqmlvaluetype.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlvaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp index e996717051..9f19f21664 100644 --- a/src/qml/qml/qqmlvaluetype.cpp +++ b/src/qml/qml/qqmlvaluetype.cpp @@ -348,6 +348,11 @@ void QQmlPointFValueType::setY(qreal y) } +QString QQmlPointValueType::toString() const +{ + return QString::asprintf("QPoint(%d, %d)", v.x(), v.y()); +} + int QQmlPointValueType::x() const { return v.x(); @@ -395,6 +400,11 @@ void QQmlSizeFValueType::setHeight(qreal h) } +QString QQmlSizeValueType::toString() const +{ + return QString::asprintf("QSize(%d, %d)", v.width(), v.height()); +} + int QQmlSizeValueType::width() const { return v.width(); @@ -480,6 +490,12 @@ qreal QQmlRectFValueType::bottom() const return v.bottom(); } + +QString QQmlRectValueType::toString() const +{ + return QString::asprintf("QRect(%d, %d, %d, %d)", v.x(), v.y(), v.width(), v.height()); +} + int QQmlRectValueType::x() const { return v.x(); |