diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-09 04:55:16 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-09 04:55:16 (GMT) |
commit | b6556899e387186da045610cf8ffedcb0644acec (patch) | |
tree | ff30d22b661b6f1a668d78a3fa30e58d9a9b93ea /src/declarative/graphicsitems | |
parent | 1d7308de4858d6243e62af9a0a7704c50216cdff (diff) | |
parent | ad169129f29f9e8f70158e45341687b5f1de1b3b (diff) | |
download | Qt-b6556899e387186da045610cf8ffedcb0644acec.zip Qt-b6556899e387186da045610cf8ffedcb0644acec.tar.gz Qt-b6556899e387186da045610cf8ffedcb0644acec.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/graphicsitems')
4 files changed, 42 insertions, 49 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp index 37929fa..862f414 100644 --- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp @@ -69,36 +69,27 @@ public: Flipable allows you to specify a front and a back and then flip between those sides. \qml - Flipable { - id: flipable - width: 40 - height: 40 - axis: Axis { - startX: 20 - startY: 0 - endX: 20 - endY: 40 +Flipable { + width: 40; height: 40 + + transform: Rotation { + id: rotation + origin.x: 20; origin.y: 120 + axis.x: 0; axis.y: 1; axis.z: 0 + angle: 0 } + front: Image { source: "front.png" } back: Image { source: "back.png" } - states: [ - State { - name: "back" - SetProperty { - target: flipable - property: "rotation" - value: 180 - } - } - ] - transitions: [ - Transition { - NumberAnimation { - easing: "easeInOutQuad" - properties: "rotation" - } - } - ] + + states: State { + name: "back" + SetProperties { target: rotation; angle: 180 } + } + + transitions: Transition { + NumberAnimation { easing: "easeInOutQuad"; matchProperties: "rotation" } + } } \endqml diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp index e2b1725..cd7377e 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp @@ -252,10 +252,29 @@ void QmlGraphicsTextInput::setMaxLength(int ml) /*! \qmlproperty bool TextInput::cursorVisible - If true the text edit shows a cursor. + Set to true when the TextInput shows a cursor. - This property is set and unset when the line edit gets focus, but it can also - be set directly (useful, for example, if a KeyProxy might forward keys to it). + This property is set and unset when the TextInput gets focus, so that other + properties can be bound to whether the cursor is currently showing. As it + gets set and unset automatically, when you set the value yourself you must + keep in mind that your value may be overwritten. + + It can be set directly in script, for example if a KeyProxy might + forward keys to it and you desire it to look active when this happens + (but without actually giving it the focus). + + It should not be set directly on the element, like in the below QML, + as the specified value will be overridden an lost on focus changes. + + \code + TextInput { + text: "Text" + cursorVisible: false + } + \endcode + + In the above snippet the cursor will still become visible when the + TextInput gains focus. */ bool QmlGraphicsTextInput::isCursorVisible() const { diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp index 5ce0ee8..214117f 100644 --- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp @@ -464,7 +464,8 @@ void QmlGraphicsWebView::setPreferredWidth(int iw) /*! \qmlproperty int WebView::webPageWidth - This property holds the page width suggested to the web engine. + This property holds the page width suggested to the web engine. The zoomFactor + will be changed to fit this with in preferredWidth. */ int QmlGraphicsWebView::webPageWidth() const { @@ -906,20 +907,6 @@ QPixmap QmlGraphicsWebView::icon() const /*! - \qmlproperty real WebView::textSizeMultiplier - This property holds the multiplier used to scale the text in a Web page -*/ -void QmlGraphicsWebView::setTextSizeMultiplier(qreal factor) -{ - page()->mainFrame()->setTextSizeMultiplier(factor); -} - -qreal QmlGraphicsWebView::textSizeMultiplier() const -{ - return page()->mainFrame()->textSizeMultiplier(); -} - -/*! \qmlproperty real WebView::zoomFactor This property holds the multiplier used to scale the contents of a Web page. */ diff --git a/src/declarative/graphicsitems/qmlgraphicswebview_p.h b/src/declarative/graphicsitems/qmlgraphicswebview_p.h index 6852bb0..d574c59 100644 --- a/src/declarative/graphicsitems/qmlgraphicswebview_p.h +++ b/src/declarative/graphicsitems/qmlgraphicswebview_p.h @@ -88,7 +88,6 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsWebView : public QmlGraphicsPaintedItem Q_PROPERTY(QString title READ title NOTIFY titleChanged) Q_PROPERTY(QPixmap icon READ icon NOTIFY iconChanged) - Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false) Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor NOTIFY zoomFactorChanged) Q_PROPERTY(QString statusText READ statusText NOTIFY statusTextChanged) @@ -126,9 +125,6 @@ public: QPixmap icon() const; - qreal textSizeMultiplier() const; - void setTextSizeMultiplier(qreal); - qreal zoomFactor() const; void setZoomFactor(qreal); |