diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-09 03:49:00 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-09 03:49:00 (GMT) |
commit | 879887e5f1e1636f6accc837154dfa3d211d7ca8 (patch) | |
tree | 2474d9dfb7c77266af5c78a181a171859d66ef18 /src/declarative/graphicsitems | |
parent | 2f055c0140cce1b258316b0ec5dadda6e9e10228 (diff) | |
parent | 604bcebbb3b37f5958b97c5178e4d2cb7cdef675 (diff) | |
download | Qt-879887e5f1e1636f6accc837154dfa3d211d7ca8.zip Qt-879887e5f1e1636f6accc837154dfa3d211d7ca8.tar.gz Qt-879887e5f1e1636f6accc837154dfa3d211d7ca8.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicstextinput.cpp | 25 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicswebview.cpp | 17 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicswebview_p.h | 4 |
3 files changed, 24 insertions, 22 deletions
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); |