diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-04 02:45:16 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-04 02:45:16 (GMT) |
commit | 240f2732b808d4c23366f8a432136832b6dd86d5 (patch) | |
tree | 49625bf47b11755fc142d6a998ce6499d88729b9 | |
parent | 211791498291d7c8e7d1bbae5ba22863ac421179 (diff) | |
download | Qt-240f2732b808d4c23366f8a432136832b6dd86d5.zip Qt-240f2732b808d4c23366f8a432136832b6dd86d5.tar.gz Qt-240f2732b808d4c23366f8a432136832b6dd86d5.tar.bz2 |
use same name for setter/getter and property
6 files changed, 14 insertions, 14 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index 5083f43..51b8365 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -2667,9 +2667,9 @@ void QmlGraphicsItem::setTransformOrigin(TransformOrigin origin) The default is false. - \sa setSmoothTransform() + \sa setSmooth() */ -bool QmlGraphicsItem::smoothTransform() const +bool QmlGraphicsItem::smooth() const { Q_D(const QmlGraphicsItem); return d->smooth; @@ -2679,9 +2679,9 @@ bool QmlGraphicsItem::smoothTransform() const Sets whether the item should be drawn with antialiasing and smooth pixmap filtering to \a smooth. - \sa smoothTransform() + \sa smooth() */ -void QmlGraphicsItem::setSmoothTransform(bool smooth) +void QmlGraphicsItem::setSmooth(bool smooth) { Q_D(QmlGraphicsItem); if (d->smooth == smooth) diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h index bdfc245..f64964c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.h +++ b/src/declarative/graphicsitems/qmlgraphicsitem.h @@ -91,7 +91,7 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsItem : public QGraphicsObject, public QmlP Q_PROPERTY(bool wantsFocus READ wantsFocus NOTIFY wantsFocusChanged) Q_PROPERTY(QmlList<QGraphicsTransform *>* transform READ transform DESIGNABLE false FINAL) Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin) - Q_PROPERTY(bool smooth READ smoothTransform WRITE setSmoothTransform) + Q_PROPERTY(bool smooth READ smooth WRITE setSmooth) Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect) Q_ENUMS(TransformOrigin) Q_CLASSINFO("DefaultProperty", "data") @@ -144,8 +144,8 @@ public: TransformOrigin transformOrigin() const; void setTransformOrigin(TransformOrigin); - bool smoothTransform() const; - void setSmoothTransform(bool); + bool smooth() const; + void setSmooth(bool); QRectF boundingRect() const; virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp index 13df329..e84f514 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp @@ -946,7 +946,7 @@ void QmlGraphicsTextEditPrivate::init() { Q_Q(QmlGraphicsTextEdit); - q->setSmoothTransform(smooth); + q->setSmooth(smooth); q->setAcceptedMouseButtons(Qt::LeftButton); q->setFlag(QGraphicsItem::ItemHasNoContents, false); q->setFlag(QGraphicsItem::ItemAcceptsInputMethod); diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp index 9a4f627..42de2b6 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp @@ -673,7 +673,7 @@ void QmlGraphicsTextInputPrivate::init() control->setCursorWidth(1); control->setPasswordCharacter(QLatin1Char('*')); control->setLayoutDirection(Qt::LeftToRight); - q->setSmoothTransform(smooth); + q->setSmooth(smooth); q->setAcceptedMouseButtons(Qt::LeftButton); q->setFlag(QGraphicsItem::ItemHasNoContents, false); q->setFlag(QGraphicsItem::ItemAcceptsInputMethod); diff --git a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp index 809d9fd..4174ccf 100644 --- a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp +++ b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp @@ -104,7 +104,7 @@ void tst_qmlgraphicsborderimage::smooth() QVERIFY(obj != 0); QVERIFY(obj->width() == 300); QVERIFY(obj->height() == 300); - QVERIFY(obj->smoothTransform() == true); + QVERIFY(obj->smooth() == true); QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Stretch); QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Stretch); diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp index b9c12ee..1a90575 100644 --- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp +++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp @@ -502,13 +502,13 @@ void tst_qmlgraphicstext::smooth() QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + standard.at(i) + "\" }"; QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); - QCOMPARE(textObject->smoothTransform(), true); + QCOMPARE(textObject->smooth(), true); } { QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }"; QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); - QCOMPARE(textObject->smoothTransform(), false); + QCOMPARE(textObject->smooth(), false); } } for (int i = 0; i < richText.size(); i++) @@ -517,13 +517,13 @@ void tst_qmlgraphicstext::smooth() QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + richText.at(i) + "\" }"; QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); - QCOMPARE(textObject->smoothTransform(), true); + QCOMPARE(textObject->smooth(), true); } { QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }"; QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); - QCOMPARE(textObject->smoothTransform(), false); + QCOMPARE(textObject->smooth(), false); } } } |