summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-13 03:30:27 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-13 03:30:27 (GMT)
commitd70f057db1b5765764257530c88f5c0350cf9146 (patch)
tree7a7799ff739857de6b716cd39d49238e424cf9b1 /src/declarative/graphicsitems
parente9076e2f4a3819f1540e00923535fc512495f0d8 (diff)
downloadQt-d70f057db1b5765764257530c88f5c0350cf9146.zip
Qt-d70f057db1b5765764257530c88f5c0350cf9146.tar.gz
Qt-d70f057db1b5765764257530c88f5c0350cf9146.tar.bz2
doc
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp64
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview.cpp20
3 files changed, 58 insertions, 28 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
index 634215e..04e79f9 100644
--- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
@@ -55,7 +55,7 @@ QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage)
\brief The BorderImage element provides an image that can be used as a border.
\inherits Item
- \snippet examples/declarative/border-image/example.qml 0
+ \snippet snippets/declarative/border-image.qml 0
\image BorderImage.png
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index 69564c4..ca45f62 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -1325,6 +1325,24 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject
}
\endqml
+ \section1 Identity
+
+ Each item has an "id" - the identifier of the Item.
+
+ The identifier can be used in bindings and other expressions to
+ refer to the item. For example:
+
+ \qml
+ Text { id: myText; ... }
+ Text { text: myText.text }
+ \endqml
+
+ The identifier is available throughout to the \l {components}{component}
+ where it is declared. The identifier must be unique in the component.
+
+ The id should not be thought of as a "property" - it makes no sense
+ to write \c myText.id, for example.
+
\section1 Key Handling
Key handling is available to all Item-based visual elements via the \l {Keys}{Keys}
@@ -1510,6 +1528,14 @@ void QmlGraphicsItem::setParentItem(QmlGraphicsItem *parent)
}
/*!
+ \fn void QmlGraphicsItem::setParent(QmlGraphicsItem *parent)
+ \overload
+ Sets both the parent object and parent item to \a parent. This
+ function avoids the programming error of calling setParent()
+ when you mean setParentItem().
+*/
+
+/*!
Returns the QmlGraphicsItem parent of this item.
*/
QmlGraphicsItem *QmlGraphicsItem::parentItem() const
@@ -1994,22 +2020,6 @@ QVariant QmlGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const
}
/*!
- \qmlproperty string Item::id
- This property holds the identifier for the item.
-
- The identifier can be used in bindings and other expressions to
- refer to the item. For example:
-
- \qml
- Text { id: myText; ... }
- Text { text: myText.text }
- \endqml
-
- The identifier is available throughout to the \l {components}{component}
- where it is declared. The identifier must be unique in thecomponent.
-*/
-
-/*!
\internal
*/
QmlGraphicsAnchorLine QmlGraphicsItem::left() const
@@ -2357,7 +2367,7 @@ bool QmlGraphicsItem::keepMouseGrab() const
to steal a mouse grab if it detects that the user has begun to
move the viewport.
- \sa keepMouseGrab
+ \sa keepMouseGrab()
*/
void QmlGraphicsItem::setKeepMouseGrab(bool keep)
{
@@ -2801,12 +2811,19 @@ void QmlGraphicsItem::resetWidth()
setImplicitWidth(implicitWidth());
}
+/*!
+ Returns the width of the item that is implied by other properties that determine the content.
+*/
qreal QmlGraphicsItem::implicitWidth() const
{
Q_D(const QmlGraphicsItem);
return d->implicitWidth;
}
+/*!
+ Sets the implied width of the item to \a w.
+ This is the width implied by other properties that determine the content.
+*/
void QmlGraphicsItem::setImplicitWidth(qreal w)
{
Q_D(QmlGraphicsItem);
@@ -2824,6 +2841,9 @@ void QmlGraphicsItem::setImplicitWidth(qreal w)
QRectF(x(), y(), oldWidth, height()));
}
+/*!
+ Returns whether the width property has been set explicitly.
+*/
bool QmlGraphicsItem::widthValid() const
{
Q_D(const QmlGraphicsItem);
@@ -2860,12 +2880,19 @@ void QmlGraphicsItem::resetHeight()
setImplicitHeight(implicitHeight());
}
+/*!
+ Returns the height of the item that is implied by other properties that determine the content.
+*/
qreal QmlGraphicsItem::implicitHeight() const
{
Q_D(const QmlGraphicsItem);
return d->implicitHeight;
}
+/*!
+ Sets the implied height of the item to \a h.
+ This is the height implied by other properties that determine the content.
+*/
void QmlGraphicsItem::setImplicitHeight(qreal h)
{
Q_D(QmlGraphicsItem);
@@ -2883,6 +2910,9 @@ void QmlGraphicsItem::setImplicitHeight(qreal h)
QRectF(x(), y(), width(), oldHeight));
}
+/*!
+ Returns whether the height property has been set explicitly.
+*/
bool QmlGraphicsItem::heightValid() const
{
Q_D(const QmlGraphicsItem);
diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
index 14c4352..6dbf053 100644
--- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
@@ -309,7 +309,8 @@ QmlGraphicsWebView::Status QmlGraphicsWebView::status() const
\qmlproperty real WebView::progress
This property holds the progress of loading the current URL, from 0 to 1.
- \sa onLoadFinished() onLoadFailed()
+ If you just want to know when progress gets to 1, use
+ WebView::onLoadFinished() or WebView::onLoadFailed() instead.
*/
qreal QmlGraphicsWebView::progress() const
{
@@ -1057,27 +1058,26 @@ void QmlGraphicsWebView::setPage(QWebPage *page)
\qmlsignal WebView::onLoadStarted()
This handler is called when the web engine begins loading
- a page.
-
- \sa progress onLoadFinished() onLoadFailed()
+ a page. Later, WebView::onLoadFinished() or WebView::onLoadFailed()
+ will be emitted.
*/
/*!
\qmlsignal WebView::onLoadFinished()
- This handler is called when the web engine finishes loading
- a page, including any component content.
+ This handler is called when the web engine \e successfully
+ finishes loading a page, including any component content
+ (WebView::onLoadFailed() will be emitted otherwise).
- \sa progress onLoadFailed()
+ \sa progress
*/
/*!
\qmlsignal WebView::onLoadFailed()
This handler is called when the web engine fails loading
- a page or any component content.
-
- \sa progress onLoadFinished()
+ a page or any component content
+ (WebView::onLoadFinished() will be emitted on success).
*/
void QmlGraphicsWebView::load(const QNetworkRequest &request,