diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-04 00:07:46 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-04 00:07:46 (GMT) |
commit | e1c72879ed2c25819537bc5bbb12569b705ba79f (patch) | |
tree | a27f9d00b88cfbc186ab3fa81da4185f7da1ed6e /src | |
parent | efdcf95ded79ea5d745800ae86850e8c0605e9c8 (diff) | |
parent | 0a10f00d1ca93e30982b662e2d35841dab5d7bbb (diff) | |
download | Qt-e1c72879ed2c25819537bc5bbb12569b705ba79f.zip Qt-e1c72879ed2c25819537bc5bbb12569b705ba79f.tar.gz Qt-e1c72879ed2c25819537bc5bbb12569b705ba79f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsitem.cpp | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicstextedit.cpp | 11 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicstextinput.cpp | 10 | ||||
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 2 |
4 files changed, 21 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index f26496e..b03f359 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -2161,6 +2161,7 @@ QmlGraphicsAnchorLine QmlGraphicsItem::baseline() const \qmlproperty Item Item::anchors.fill \qmlproperty Item Item::anchors.centerIn + \qmlproperty real Item::anchors.margins \qmlproperty real Item::anchors.topMargin \qmlproperty real Item::anchors.bottomMargin \qmlproperty real Item::anchors.leftMargin @@ -2173,6 +2174,7 @@ QmlGraphicsAnchorLine QmlGraphicsItem::baseline() const relationship with other items. Margins apply to top, bottom, left, right, and fill anchors. + The margins property can be used to set all of the various margins at once, to the same value. Offsets apply for horizontal center, vertical center, and baseline anchors. diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp index 6e14d3a..c3495b3 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp @@ -784,8 +784,17 @@ Handles the given mouse \a event. void QmlGraphicsTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QmlGraphicsTextEdit); - if (d->focusOnPress) + if (d->focusOnPress){ + QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? + while(p) { + if(p->flags() & QGraphicsItem::ItemIsFocusScope){ + p->setFocus(); + break; + } + p = p->parentItem(); + } setFocus(true); + } d->control->processEvent(event, QPointF(0, 0)); if (!event->isAccepted()) QmlGraphicsPaintedItem::mousePressEvent(event); diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp index 6068e93..cfb93f6 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp @@ -647,9 +647,15 @@ void QmlGraphicsTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QmlGraphicsTextInput); if(d->focusOnPress){ + QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? + while(p) { + if(p->flags() & QGraphicsItem::ItemIsFocusScope){ + p->setFocus(); + break; + } + p = p->parentItem(); + } setFocus(true); - setCursorVisible(true); - d->focused = true; } d->control->processEvent(event); } diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 63044bc..74f5b3a 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -1762,7 +1762,7 @@ void QmlPropertyAnimation::setTo(const QVariant &t) \table \row - \o \c easeNone + \o \c easeLinear \o Easing curve for a linear (t) function: velocity is constant. \o \inlineimage qeasingcurve-linear.png \row |