diff options
Diffstat (limited to 'src/declarative')
46 files changed, 292 insertions, 140 deletions
diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp index b950aef..154df51 100644 --- a/src/declarative/debugger/qdeclarativedebug.cpp +++ b/src/declarative/debugger/qdeclarativedebug.cpp @@ -507,7 +507,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << false; + << false << true; d->client->sendMessage(message); } else { query->m_state = QDeclarativeDebugQuery::Error; @@ -530,7 +530,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << true; + << true << true; d->client->sendMessage(message); } else { query->m_state = QDeclarativeDebugQuery::Error; diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index d8527d3..e0a2149 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -62,7 +62,8 @@ QT_BEGIN_NAMESPACE \qmlclass AnimatedImage QDeclarativeAnimatedImage \inherits Image \since 4.7 - + \ingroup basic-visual-elements + The AnimatedImage element provides for playing animations stored as images containing a series of frames, such as GIF files. diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 4881248..e0c7fc2 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE \brief The BorderImage element provides an image that can be used as a border. \inherits Item \since 4.7 + \ingroup qm-basic-visual-elements A BorderImage breaks an image into 9 sections, as shown below: diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp index 81ec6e1..0a35a3f 100644 --- a/src/declarative/graphicsitems/qdeclarativeevents.cpp +++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp @@ -45,6 +45,8 @@ QT_BEGIN_NAMESPACE /*! \qmlclass KeyEvent QDeclarativeKeyEvent \since 4.7 + \ingroup qml-event-elements + \brief The KeyEvent object provides information about a key event. For example, the following changes the Item's state property when the Enter @@ -115,6 +117,8 @@ Item { /*! \qmlclass MouseEvent QDeclarativeMouseEvent \since 4.7 + \ingroup qml-event-elements + \brief The MouseEvent object provides information about a mouse event. The position of the mouse can be found via the x and y properties. diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 9bcadd2..7fee44e 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -345,6 +345,8 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() /*! \qmlclass Flickable QDeclarativeFlickable \since 4.7 + \ingroup qml-basic-interaction-elements + \brief The Flickable item provides a surface that can be "flicked". \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index b266273..6ce0fa6 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -70,6 +70,8 @@ public: /*! \qmlclass Flipable QDeclarativeFlipable \since 4.7 + \ingroup qml-basic-interaction-elements + \brief The Flipable item provides a surface that can be flipped. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp index bd60e25..5c7959a 100644 --- a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp +++ b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE /*! \qmlclass FocusPanel QDeclarativeFocusPanel \since 4.7 + \ingroup qml-basic-interaction-elements + \brief The FocusPanel item explicitly creates a focus panel. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp index e8e6fa2..4498275 100644 --- a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp +++ b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE /*! \qmlclass FocusScope QDeclarativeFocusScope \since 4.7 + \ingroup qml-basic-interaction-elements + \brief The FocusScope object explicitly creates a focus scope. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 68a4c64..d67e69a 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1056,6 +1056,8 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m /*! \qmlclass GridView QDeclarativeGridView \since 4.7 + \ingroup qml-view-elements + \inherits Flickable \brief The GridView item provides a grid view of items provided by a model. diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 37736cc..47a410c 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Image QDeclarativeImage \since 4.7 + \ingroup qml-vasic-visual-elements + \brief The Image element allows you to add bitmaps to a scene. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index cc7c673..0f16a79 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -69,6 +69,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Transform QGraphicsTransform + \ingroup qml-transform-elements \since 4.7 \brief The Transform elements provide a way of building advanced transformations on Items. @@ -90,6 +91,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Translate QDeclarativeTranslate + \ingroup qml-transform-elements \since 4.7 \brief The Translate object provides a way to move an Item without changing its x or y properties. @@ -131,6 +133,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Scale QGraphicsScale + \ingroup qml-transform-elements \since 4.7 \brief The Scale element provides a way to scale an Item. @@ -172,6 +175,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Rotation QGraphicsRotation + \ingroup qml-transform-elements \since 4.7 \brief The Rotation object provides a way to rotate an Item. @@ -419,6 +423,7 @@ void QDeclarativeItemKeyFilter::componentComplete() /*! \qmlclass KeyNavigation QDeclarativeKeyNavigationAttached + \ingroup qml-basic-interaction-elements \since 4.7 \brief The KeyNavigation attached property supports key navigation by arrow keys. @@ -725,6 +730,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post) /*! \qmlclass Keys QDeclarativeKeysAttached + \ingroup qml-basic-interaction-elements \since 4.7 \brief The Keys attached property provides key handling to Items. @@ -1310,6 +1316,7 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec /*! \qmlclass Item QDeclarativeItem + \ingroup qml-basic-visual-elements \since 4.7 \brief The Item is the most basic of all visual items in QML. diff --git a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp index 38d5f59..8509473 100644 --- a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass LayoutItem QDeclarativeLayoutItem + \ingroup qml-utility-elements \since 4.7 \brief The LayoutItem element allows declarative UI elements to be placed inside Qt's Graphics View layouts. diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index e1dd1c0..ec1b6cf 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1357,6 +1357,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m /*! \qmlclass ListView QDeclarativeListView + \ingroup qml-view-elements \since 4.7 \inherits Flickable \brief The ListView item provides a list view of items provided by a model. diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index d28181e..4c6268f 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -108,6 +108,7 @@ void QDeclarativeLoaderPrivate::initResize() /*! \qmlclass Loader QDeclarativeLoader + \ingroup qml-utility-elements \since 4.7 \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index dcdb9f6..2823888 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -180,6 +180,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() /*! \qmlclass MouseArea QDeclarativeMouseArea + \ingroup qml-basic-interaction-elements \since 4.7 \brief The MouseArea item enables simple mouse handling. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index c48011d3..62e03e7 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass PathElement QDeclarativePathElement + \ingroup qml-view-elements \since 4.7 \brief PathElement is the base path type. @@ -67,6 +68,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Path QDeclarativePath + \ingroup qml-view-elements \since 4.7 \brief A Path object defines a path for use by \l PathView. @@ -497,6 +499,7 @@ void QDeclarativeCurve::setY(qreal y) /*! \qmlclass PathAttribute QDeclarativePathAttribute + \ingroup qml-view-elements \since 4.7 \brief The PathAttribute allows setting an attribute at a given position in a Path. @@ -587,6 +590,7 @@ void QDeclarativePathAttribute::setValue(qreal value) /*! \qmlclass PathLine QDeclarativePathLine + \ingroup qml-view-elements \since 4.7 \brief The PathLine defines a straight line. @@ -627,6 +631,7 @@ void QDeclarativePathLine::addToPath(QPainterPath &path) /*! \qmlclass PathQuad QDeclarativePathQuad + \ingroup qml-view-elements \since 4.7 \brief The PathQuad defines a quadratic Bezier curve with a control point. @@ -713,6 +718,7 @@ void QDeclarativePathQuad::addToPath(QPainterPath &path) /*! \qmlclass PathCubic QDeclarativePathCubic + \ingroup qml-view-elements \since 4.7 \brief The PathCubic defines a cubic Bezier curve with two control points. @@ -828,6 +834,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path) /*! \qmlclass PathPercent QDeclarativePathPercent + \ingroup qml-view-elements \since 4.7 \brief The PathPercent manipulates the way a path is interpreted. diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 380c6ad..535fb90 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -326,6 +326,7 @@ void QDeclarativePathViewPrivate::regenerate() /*! \qmlclass PathView QDeclarativePathView + \ingroup qml-view-elements \since 4.7 \brief The PathView element lays out model-provided items on a path. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 1a5c42d..4ceb5d9 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -330,6 +330,7 @@ static inline bool isInvisible(QGraphicsObject *child) /*! \qmlclass Column QDeclarativeColumn + \ingroup qml-positioning-elements \since 4.7 \brief The Column item arranges its children vertically. \inherits Item @@ -495,6 +496,7 @@ void QDeclarativeColumn::reportConflictingAnchors() /*! \qmlclass Row QDeclarativeRow + \ingroup qml-positioning-elements \since 4.7 \brief The Row item arranges its children horizontally. \inherits Item @@ -633,6 +635,7 @@ void QDeclarativeRow::reportConflictingAnchors() /*! \qmlclass Grid QDeclarativeGrid + \ingroup qml-positioning-elements \since 4.7 \brief The Grid item positions its children in a grid. \inherits Item @@ -927,6 +930,7 @@ void QDeclarativeGrid::reportConflictingAnchors() /*! \qmlclass Flow QDeclarativeFlow + \ingroup qml-positioning-elements \since 4.7 \brief The Flow item arranges its children side by side, wrapping as necessary. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index c49be46..5990c2d 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -84,6 +84,7 @@ void QDeclarativePen::setWidth(int w) /*! \qmlclass GradientStop QDeclarativeGradientStop + \ingroup qml-basic-visual-elements \since 4.7 \brief The GradientStop item defines the color at a position in a Gradient @@ -105,6 +106,7 @@ void QDeclarativeGradientStop::updateGradient() /*! \qmlclass Gradient QDeclarativeGradient + \ingroup qml-basic-visual-elements \since 4.7 \brief The Gradient item defines a gradient fill. @@ -152,6 +154,7 @@ void QDeclarativeGradient::doUpdate() /*! \qmlclass Rectangle QDeclarativeRectangle + \ingroup qml-basic-visual-elements \since 4.7 \brief The Rectangle item allows you to add rectangles to a scene. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index b4b6c02..4a951a2 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -62,6 +62,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() /*! \qmlclass Repeater QDeclarativeRepeater + \ingroup qml-utility-elements \since 4.7 \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index ab2be9c..fcd112e 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -162,7 +162,8 @@ QSet<QUrl> QTextDocumentWithImageResources::errors; /*! \qmlclass Text QDeclarativeText - \since 4.7 + \ingroup qml-basic-visual-elements + \since 4.7 \brief The Text item allows you to add formatted text to a scene. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 8117676..b8e8726 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -61,6 +61,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass TextEdit QDeclarativeTextEdit + \ingroup qml-basic-visual-elements \since 4.7 \brief The TextEdit item displays multiple lines of editable formatted text. \inherits Item diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 90f5a70..b4f36f4 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass TextInput QDeclarativeTextInput + \ingroup qml-basic-visual-elements \since 4.7 \brief The TextInput item displays an editable line of text. \inherits Item @@ -276,8 +277,10 @@ void QDeclarativeTextInput::setSelectionColor(const QColor &color) QPalette p = d->control->palette(); p.setColor(QPalette::Highlight, d->selectionColor); d->control->setPalette(p); - clearCache(); - update(); + if (d->control->hasSelectedText()) { + clearCache(); + update(); + } emit selectionColorChanged(color); } @@ -302,8 +305,10 @@ void QDeclarativeTextInput::setSelectedTextColor(const QColor &color) QPalette p = d->control->palette(); p.setColor(QPalette::HighlightedText, d->selectedTextColor); d->control->setPalette(p); - clearCache(); - update(); + if (d->control->hasSelectedText()) { + clearCache(); + update(); + } emit selectedTextColorChanged(color); } @@ -561,6 +566,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b) /*! \qmlclass IntValidator QIntValidator + \ingroup qml-basic-visual-elements This element provides a validator for integer values. */ @@ -579,6 +585,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b) /*! \qmlclass DoubleValidator QDoubleValidator + \ingroup qml-basic-visual-elements This element provides a validator for non-integer numbers. */ @@ -617,6 +624,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b) /*! \qmlclass RegExpValidator QRegExpValidator + \ingroup qml-basic-visual-elements This element provides a validator, which counts as valid any string which matches a specified regular expression. @@ -1229,8 +1237,12 @@ void QDeclarativeTextInput::setPasswordCharacter(const QString &str) Q_D(QDeclarativeTextInput); if(str.length() < 1) return; - emit passwordCharacterChanged(); d->control->setPasswordCharacter(str.constData()[0]); + EchoMode echoMode_ = echoMode(); + if (echoMode_ == Password || echoMode_ == PasswordEchoOnEdit) { + updateSize(); + } + emit passwordCharacterChanged(); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index a489b5a..764676a 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -128,6 +128,7 @@ public: /*! \qmlclass VisualItemModel QDeclarativeVisualItemModel + \ingroup qml-working-with-data \since 4.7 \brief The VisualItemModel allows items to be provided to a view. @@ -644,6 +645,7 @@ QDeclarativeVisualDataModelData *QDeclarativeVisualDataModelPrivate::data(QObjec /*! \qmlclass VisualDataModel QDeclarativeVisualDataModel + \ingroup qml-working-with-data \brief The VisualDataModel encapsulates a model and delegate A VisualDataModel encapsulates a model and the delegate that will diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 5f4a063..15cef16 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -104,6 +104,7 @@ class QByteArray; /*! \qmlclass Component QDeclarativeComponent + \ingroup qml-utility-elements \since 4.7 \brief The Component element encapsulates a QML component definition. @@ -599,7 +600,7 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q property, or else the object will not be visible. Dynamically created instances can be deleted with the \c destroy() method. - See \l {Dynamic Object Management} for more information. + See \l {Dynamic Object Management in QML} for more information. */ /*! diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index de79e4d..513fc65 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -114,6 +114,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass QtObject QObject + \ingroup qml-utility-elements \since 4.7 \brief The QtObject element is the most basic element in QML. @@ -185,6 +186,7 @@ void QDeclarativeEnginePrivate::defineModule() /*! \qmlclass QML:Qt QDeclarativeEnginePrivate + \ingroup qml-utility-elements \brief The QML global Qt object provides useful enums and functions from Qt. \keyword QmlGlobalQtObject @@ -241,7 +243,7 @@ The format specification is described at \l{QML:Qt::formatDateTime}{Qt.formatDat \section1 Dynamic Object Creation The following functions on the global object allow you to dynamically create QML -items from files or strings. See \l{Dynamic Object Management} for an overview +items from files or strings. See \l{Dynamic Object Management in QML} for an overview of their use. \list @@ -1119,7 +1121,7 @@ For example: \snippet doc/src/snippets/declarative/createComponent-simple.qml 0 -See \l {Dynamic Object Management} for more information on using this function. +See \l {Dynamic Object Management in QML} for more information on using this function. To create a QML object from an arbitrary string of QML (instead of a file), use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}. @@ -1171,7 +1173,7 @@ Note that this function returns immediately, and therefore may not work if the \a qml string loads new components (that is, external QML files that have not yet been loaded). If this is the case, consider using \l{QML:Qt::createComponent()}{Qt.createComponent()} instead. -See \l {Dynamic Object Management} for more information on using this function. +See \l {Dynamic Object Management in QML} for more information on using this function. */ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngine *engine) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 1837366..ed98e3c 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -182,7 +182,7 @@ QVariant QDeclarativeEngineDebugServer::valueContents(const QVariant &value) con } void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, - QObject *object, bool recur) + QObject *object, bool recur, bool dumpProperties) { message << objectData(object); @@ -209,6 +209,8 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, continue; QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child); if (signal) { + if (!dumpProperties) + continue; QDeclarativeObjectProperty prop; prop.type = QDeclarativeObjectProperty::SignalProperty; prop.hasNotifySignal = false; @@ -229,12 +231,17 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, fakeProperties << prop; } else { if (recur) - buildObjectDump(message, child, recur); + buildObjectDump(message, child, recur, dumpProperties); else message << objectData(child); } } + if (!dumpProperties) { + message << 0; + return; + } + message << (object->metaObject()->propertyCount() + fakeProperties.count()); for (int ii = 0; ii < object->metaObject()->propertyCount(); ++ii) @@ -372,8 +379,9 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) int queryId; int objectId; bool recurse; + bool dumpProperties = true; - ds >> queryId >> objectId >> recurse; + ds >> queryId >> objectId >> recurse >> dumpProperties; QObject *object = QDeclarativeDebugService::objectForId(objectId); @@ -382,7 +390,7 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) rs << QByteArray("FETCH_OBJECT_R") << queryId; if (object) - buildObjectDump(rs, object, recurse); + buildObjectDump(rs, object, recurse, dumpProperties); sendMessage(reply); } else if (type == "WATCH_OBJECT") { diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h index ea35b40..aa450f3 100644 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ b/src/declarative/qml/qdeclarativeenginedebug_p.h @@ -103,7 +103,7 @@ private Q_SLOTS: private: void buildObjectList(QDataStream &, QDeclarativeContext *); - void buildObjectDump(QDataStream &, QObject *, bool); + void buildObjectDump(QDataStream &, QObject *, bool, bool); QDeclarativeObjectData objectData(QObject *); QDeclarativeObjectProperty propertyData(QObject *, int); QVariant valueContents(const QVariant &defaultValue) const; diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index aec84a6..789116e 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -514,6 +514,7 @@ void QDeclarativeWorkerScriptEngine::run() /*! \qmlclass WorkerScript QDeclarativeWorkerScript + \ingroup qml-utility-elements \brief The WorkerScript element enables the use of threads in QML. Use WorkerScript to run operations in a new thread. diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 2fca09d..4e9e8d5 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -74,6 +74,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Animation QDeclarativeAbstractAnimation + \ingroup qml-animation-transition \since 4.7 \brief The Animation element is the base of all QML animations. @@ -554,6 +555,7 @@ void QDeclarativeAbstractAnimation::timelineComplete() /*! \qmlclass PauseAnimation QDeclarativePauseAnimation + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The PauseAnimation element provides a pause for an animation. @@ -630,6 +632,7 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation() /*! \qmlclass ColorAnimation QDeclarativeColorAnimation + \ingroup qml-animation-transition \since 4.7 \inherits PropertyAnimation \brief The ColorAnimation element animates changes in color values. @@ -691,9 +694,12 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation() } \endqml - If this value is not set and the ColorAnimation is defined within - a \l Transition, it defaults to the value defined in the starting - state of the \l Transition. + If the ColorAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the starting state of the + \l Transition, or the current value of the property at the moment the + \l Behavior is triggered. + + \sa {QML Animation} */ QColor QDeclarativeColorAnimation::from() const { @@ -711,9 +717,12 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f) This property holds the color value at which the animation should end. - If this value is not set and the ColorAnimation is defined within - a \l Transition or \l Behavior, it defaults to the value defined in the end - state of the \l Transition or \l Behavior. + If the ColorAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. + + \sa {QML Animation} */ QColor QDeclarativeColorAnimation::to() const { @@ -730,6 +739,7 @@ void QDeclarativeColorAnimation::setTo(const QColor &t) /*! \qmlclass ScriptAction QDeclarativeScriptAction + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The ScriptAction element allows scripts to be run during an animation. @@ -878,33 +888,50 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() /*! \qmlclass PropertyAction QDeclarativePropertyAction + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The PropertyAction element allows immediate property changes during animation. - PropertyAction is used to specify an immediate property change - during an animation. The property change is not animated. + PropertyAction is used to specify an immediate property change during an + animation. The property change is not animated. - For example, to explicitly set \c {theImage.smooth = true} during a \l Transition: - \code - transitions: Transition { - ... - PropertyAction { target: theImage; property: "smooth"; value: true } - ... - } - \endcode + It is useful for setting non-animated property values during an animation. - Or, to set \c theWebView.url to the value set for the destination state: - \code + For example, here is a SequentialAnimation that sets the image's + \l {Image::}{smooth} property to \c true, animates the width of the image, + then sets \l {Image::}{smooth} back to \c false: + + \snippet doc/src/snippets/declarative/propertyaction.qml standalone + + PropertyAction is also useful for setting the exact point at which a property + change should occur during a \l Transition. For example, if PropertyChanges + was used in a \l State to rotate an item around a particular + \l {Item::}{transformOrigin}, it might be implemented like this: + + \snippet doc/src/snippets/declarative/propertyaction.qml transition + + However, with this code, the \c transformOrigin is not set until \e after + the animation, as a \l State is taken to define the values at the \e end of + a transition. The animation would rotate at the default \c transformOrigin, + then jump to \c Item.BottomRight. To fix this, insert a PropertyChanges + before the RotationAnimation begins: + + \qml transitions: Transition { - ... - PropertyAction { target: theWebView; property: "url" } - ... + SequentialAnimation { + PropertyAction { target: rect; property: "transformOrigin" } + RotationAnimation { ... } + } } - \endcode - + \endqml + + This immediately sets the \c transformOrigin property to the value defined + in the end state of the \l Transition (i.e. the value defined in the + PropertyChanges object) so that the rotation animation begins with the + correct transform origin. - \sa QtDeclarative + \sa {QML Animation}, QtDeclarative */ /*! \internal @@ -1009,7 +1036,11 @@ QDeclarativeListProperty<QObject> QDeclarativePropertyAction::exclude() /*! \qmlproperty any PropertyAction::value This property holds the value to be set on the property. - If not set, then the value defined for the end state of the transition. + + If the PropertyAction is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. */ QVariant QDeclarativePropertyAction::value() const { @@ -1129,6 +1160,7 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions, /*! \qmlclass NumberAnimation QDeclarativeNumberAnimation + \ingroup qml-animation-transition \since 4.7 \inherits PropertyAnimation \brief The NumberAnimation element animates changes in qreal-type values. @@ -1184,7 +1216,7 @@ void QDeclarativeNumberAnimation::init() /*! \qmlproperty real NumberAnimation::from - This property holds the starting number value. + This property holds the starting value for the animation. For example, the following animation is not applied until the \c x value has reached 100: @@ -1199,9 +1231,12 @@ void QDeclarativeNumberAnimation::init() } \endqml - If this value is not set and the NumberAnimation is defined within - a \l Transition, it defaults to the value defined in the start - state of the \l Transition. + If the NumberAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the starting state of the + \l Transition, or the current value of the property at the moment the + \l Behavior is triggered. + + \sa {QML Animation} */ qreal QDeclarativeNumberAnimation::from() const @@ -1217,11 +1252,14 @@ void QDeclarativeNumberAnimation::setFrom(qreal f) /*! \qmlproperty real NumberAnimation::to - This property holds the ending number value. + This property holds the end value for the animation. - If this value is not set and the NumberAnimation is defined within - a \l Transition or \l Behavior, it defaults to the value defined in the end - state of the \l Transition or \l Behavior. + If the NumberAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. + + \sa {QML Animation} */ qreal QDeclarativeNumberAnimation::to() const { @@ -1238,6 +1276,7 @@ void QDeclarativeNumberAnimation::setTo(qreal t) /*! \qmlclass Vector3dAnimation QDeclarativeVector3dAnimation + \ingroup qml-animation-transition \since 4.7 \inherits PropertyAnimation \brief The Vector3dAnimation element animates changes in QVector3d values. @@ -1273,10 +1312,14 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation() /*! \qmlproperty real Vector3dAnimation::from - This property holds the starting value. + This property holds the starting value for the animation. + + If the Vector3dAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the starting state of the + \l Transition, or the current value of the property at the moment the + \l Behavior is triggered. - If this value is not set, it defaults to the value defined in the start - state of the \l Transition. + \sa {QML Animation} */ QVector3D QDeclarativeVector3dAnimation::from() const { @@ -1291,10 +1334,14 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f) /*! \qmlproperty real Vector3dAnimation::to - This property holds the ending value. + This property holds the end value for the animation. - If this value is not set, it defaults to the value defined in the end - state of the \l Transition or \l Behavior. + If the Vector3dAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. + + \sa {QML Animation} */ QVector3D QDeclarativeVector3dAnimation::to() const { @@ -1311,6 +1358,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) /*! \qmlclass RotationAnimation QDeclarativeRotationAnimation + \ingroup qml-animation-transition \since 4.7 \inherits PropertyAnimation \brief The RotationAnimation element animates changes in rotation values. @@ -1335,6 +1383,12 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) your own properties via \l {PropertyAnimation::properties}{properties} or \l {PropertyAnimation::property}{property}. + Also, note the \l Rectangle will be rotated around its default + \l {Item::}{transformOrigin} (which is \c Item.Center). To use a different + transform origin, set the origin in the PropertyChanges object and apply + the change at the start of the animation using PropertyAction. See the + PropertyAction documentation for more details. + Like any other animation element, a RotationAnimation can be applied in a number of ways, including transitions, behaviors and property value sources. The \l {QML Animation} documentation shows a variety of methods @@ -1400,7 +1454,7 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation() /*! \qmlproperty real RotationAnimation::from - This property holds the starting number value. + This property holds the starting value for the animation. For example, the following animation is not applied until the \c angle value has reached 100: @@ -1415,8 +1469,12 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation() } \endqml - If this value is not set, it defaults to the value defined in the start - state of the \l Transition. + If the RotationAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the starting state of the + \l Transition, or the current value of the property at the moment the + \l Behavior is triggered. + + \sa {QML Animation} */ qreal QDeclarativeRotationAnimation::from() const { @@ -1431,10 +1489,14 @@ void QDeclarativeRotationAnimation::setFrom(qreal f) /*! \qmlproperty real RotationAnimation::to - This property holds the ending value. + This property holds the end value for the animation.. + + If the RotationAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. - If this value is not set, it defaults to the value defined in the end - state of the \l Transition or \l Behavior. + \sa {QML Animation} */ qreal QDeclarativeRotationAnimation::to() const { @@ -1540,6 +1602,7 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro /*! \qmlclass SequentialAnimation QDeclarativeSequentialAnimation + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The SequentialAnimation element allows animations to be run sequentially. @@ -1613,6 +1676,7 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio /*! \qmlclass ParallelAnimation QDeclarativeParallelAnimation + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The ParallelAnimation element allows animations to be run in parallel. @@ -1731,6 +1795,7 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int /*! \qmlclass PropertyAnimation QDeclarativePropertyAnimation + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The PropertyAnimation element animates changes in property values. @@ -1843,8 +1908,14 @@ void QDeclarativePropertyAnimation::setDuration(int duration) /*! \qmlproperty real PropertyAnimation::from - This property holds the starting value. - If not set, then the value defined in the start state of the transition. + This property holds the starting value for the animation. + + If the PropertyAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the starting state of the + \l Transition, or the current value of the property at the moment the + \l Behavior is triggered. + + \sa {QML Animation} */ QVariant QDeclarativePropertyAnimation::from() const { @@ -1864,8 +1935,14 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f) /*! \qmlproperty real PropertyAnimation::to - This property holds the ending value. - If not set, then the value defined in the end state of the transition or \l Behavior. + This property holds the end value for the animation. + + If the PropertyAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. + + \sa {QML Animation} */ QVariant QDeclarativePropertyAnimation::to() const { @@ -2400,6 +2477,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions /*! \qmlclass ParentAnimation QDeclarativeParentAnimation + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The ParentAnimation element animates changes in parent values. @@ -2490,7 +2568,10 @@ void QDeclarativeParentAnimation::setTarget(QDeclarativeItem *target) \qmlproperty Item ParentAnimation::newParent The new parent to animate to. - If not set, then the parent defined in the end state of the transition. + If the ParentAnimation is defined within a \l Transition or \l Behavior, + this value defaults to the value defined in the end state of the + \l Transition, or the value of the property change that triggered the + \l Behavior. */ QDeclarativeItem *QDeclarativeParentAnimation::newParent() const { @@ -2759,6 +2840,7 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation() /*! \qmlclass AnchorAnimation QDeclarativeAnchorAnimation + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The AnchorAnimation element animates changes in anchor values. diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp index 1e7f81a..f1b6f9a 100644 --- a/src/declarative/util/qdeclarativebehavior.cpp +++ b/src/declarative/util/qdeclarativebehavior.cpp @@ -72,6 +72,7 @@ public: /*! \qmlclass Behavior QDeclarativeBehavior + \ingroup qml-animation-transition \since 4.7 \brief The Behavior element allows you to specify a default animation for a property change. diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp index 5fab631..86d08f5 100644 --- a/src/declarative/util/qdeclarativebind.cpp +++ b/src/declarative/util/qdeclarativebind.cpp @@ -72,6 +72,7 @@ public: /*! \qmlclass Binding QDeclarativeBind + \ingroup qml-working-with-data \since 4.7 \brief The Binding element allows arbitrary property bindings to be created. diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp index b364821..293928e 100644 --- a/src/declarative/util/qdeclarativeconnections.cpp +++ b/src/declarative/util/qdeclarativeconnections.cpp @@ -71,6 +71,7 @@ public: /*! \qmlclass Connections QDeclarativeConnections + \ingroup qml-utility-elements \since 4.7 \brief A Connections element describes generalized connections to signals. diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 83bdb17..291583c 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -78,6 +78,7 @@ public: /*! \qmlclass FontLoader QDeclarativeFontLoader + \ingroup qml-utility-elements \since 4.7 \brief The FontLoader element allows fonts to be loaded by name or URL. diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 20fe3a9..1f66f0f 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -68,6 +68,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM /*! \qmlclass ListModel QDeclarativeListModel + \ingroup qml-working-with-data \since 4.7 \brief The ListModel element defines a free-form list data source. @@ -129,7 +130,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0 - The application's \tt Timer object periodically sends a message to the +working-with-data worker script by calling \l WorkerScript::sendMessage(). When this message is received, \l {WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in \tt dataloader.js, which appends the current time to the list model. @@ -769,6 +770,7 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) /*! \qmlclass ListElement + \ingroup qml-working-with-data \since 4.7 \brief The ListElement element defines a data item in a ListModel. diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp index 1a4f2a7..a5ec9b3 100644 --- a/src/declarative/util/qdeclarativepackage.cpp +++ b/src/declarative/util/qdeclarativepackage.cpp @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Package QDeclarativePackage + \ingroup qml-working-with-data \brief Package provides a collection of named items. The Package class is used in conjunction with diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 12c6353..c28ada3 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -61,51 +61,34 @@ QT_BEGIN_NAMESPACE /*! \qmlclass PropertyChanges QDeclarativePropertyChanges + \ingroup qml-state-elements \since 4.7 \brief The PropertyChanges element describes new property bindings or values for a state. - PropertyChanges provides a state change that modifies the properties of an item. + PropertyChanges is used to define the property values or bindings in a + \l State. This enables an item's property values to be changed when it + \l {QML States}{changes between states}. - Here is a property change that modifies the text and color of a \l Text element - when it is clicked: + To create a PropertyChanges object, specify the \l target item whose + properties are to be modified, and define the new property values or + bindings. For example: - \qml - Text { - id: myText - width: 100; height: 100 - text: "Hello" - color: "blue" - - states: State { - name: "myState" - - PropertyChanges { - target: myText - text: "Goodbye" - color: "red" - } - } - - MouseArea { anchors.fill: parent; onClicked: myText.state = 'myState' } - } - \endqml - - By default, PropertyChanges will establish new bindings where appropriate. - For example, the following creates a new binding for myItem's \c height property. - - \qml - PropertyChanges { - target: myItem - height: parent.height - } - \endqml - - If you don't want a binding to be established (and instead just want to assign - the value of the binding at the time the state is entered), - you should set the PropertyChange's \l{PropertyChanges::explicit}{explicit} + \snippet doc/src/snippets/declarative/propertychanges.qml import + \codeline + \snippet doc/src/snippets/declarative/propertychanges.qml 0 + + When the mouse is pressed, the \l Rectangle changes to the \e resized + state. In this state, the PropertyChanges object sets the rectangle's + color to blue and the \c height value to that of \c container.height. + + Note this automatically binds \c rect.height to \c container.height + in the \e resized state. If a property binding should not be + established, and the height should just be set to the value of + \c container.height at the time of the state change, set the \l explicit property to \c true. - - State-specific script for signal handlers can also be specified: + + A PropertyChanges object can also override the default signal handler + for an object to implement a signal handler specific to the new state: \qml PropertyChanges { @@ -114,36 +97,31 @@ QT_BEGIN_NAMESPACE } \endqml - You can reset a property in a state change by assigning \c undefined. In the following - example we reset \c theText's width when we enter state1. This will give the text its - natural width (which is the whole string on one line). + \note PropertyChanges can be used to change anchor margins, but not other anchor + values; use AnchorChanges for this instead. Similarly, to change an \l Item's + \l {Item::}{parent} value, use ParentChanges instead. - \qml - import Qt 4.7 - - Rectangle { - width: 640 - height: 480 - Text { - id: theText - width: 50 - wrapMode: Text.WordWrap - text: "a text string that is longer than 50 pixels" - } - states: State { - name: "state1" - PropertyChanges { - target: theText - width: undefined - } - } - } - \endqml + \section2 Resetting property values - Anchor margins should be changed with PropertyChanges, but other anchor changes or changes to - an Item's parent should be done using the associated change elements - (ParentChange and AnchorChanges, respectively). + The \c undefined value can be used to reset the property value for a state. + In the following example, when \c theText changes to the \e widerText + state, its \c width property is reset, giving the text its natural width + and displaying the whole string on a single line. + + \snippet doc/src/snippets/declarative/propertychanges.qml reset + + + \section2 Immediate property changes in transitions + + When \l Transitions are used to animate state changes, they animate + properties from their values in the current state to those defined in the + new state (as defined by PropertyChanges objects). However, + it is sometimes desirable to set a property value \e immediately during a + \l Transition, without animation; in these cases, the PropertyAction + element can be used to force an immediate property change. + + See the PropertyAction documentation for more details. \sa {declarative/animation/states}{states example}, {qmlstate}{States}, QtDeclarative */ @@ -396,12 +374,12 @@ void QDeclarativePropertyChanges::setObject(QObject *o) /*! \qmlproperty bool PropertyChanges::restoreEntryValues - - Whether or not the previous values should be restored when - leaving the state. By default, restoreEntryValues is true. - By setting restoreEntryValues to false, you can create a temporary state - that has permanent effects on property values. + This property holds whether the previous values should be restored when + leaving the state. + + The default value is \c true. Setting this value to \c false creates a + temporary state that has permanent effects on property values. */ bool QDeclarativePropertyChanges::restoreEntryValues() const { diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index 30e1491..b2f02e6 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -249,6 +249,7 @@ void QSmoothedAnimation::init() /*! \qmlclass SmoothedAnimation QDeclarativeSmoothedAnimation + \ingroup qml-animation-transition \since 4.7 \inherits NumberAnimation \brief The SmoothedAnimation element allows a property to smoothly track a value. diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp index 6f4ac51..fce4097 100644 --- a/src/declarative/util/qdeclarativespringanimation.cpp +++ b/src/declarative/util/qdeclarativespringanimation.cpp @@ -228,6 +228,7 @@ void QDeclarativeSpringAnimationPrivate::updateMode() /*! \qmlclass SpringAnimation QDeclarativeSpringAnimation + \ingroup qml-animation-transition \inherits Animation \since 4.7 diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 028bacb..6e17cf2 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -133,6 +133,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje /*! \qmlclass State QDeclarativeState + \ingroup qml-state-elements \since 4.7 \brief The State element defines configurations of objects and properties. diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp index 1c1e964..fc90baa 100644 --- a/src/declarative/util/qdeclarativestategroup.cpp +++ b/src/declarative/util/qdeclarativestategroup.cpp @@ -88,6 +88,7 @@ public: /*! \qmlclass StateGroup QDeclarativeStateGroup + \ingroup qml-state-elements \since 4.7 \brief The StateGroup element provides state support for non-Item elements. diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 2291c16..6e6f0cb 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -161,6 +161,7 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q /*! \preliminary \qmlclass ParentChange QDeclarativeParentChange + \ingroup qml-state-elements \brief The ParentChange element allows you to reparent an Item in a state change. ParentChange reparents an item while preserving its visual appearance (position, size, @@ -589,6 +590,7 @@ public: /*! \qmlclass StateChangeScript QDeclarativeStateChangeScript + \ingroup qml-state-elements \brief The StateChangeScript element allows you to run a script in a state. A StateChangeScript is run upon entering a state. You can optionally use @@ -693,6 +695,7 @@ QString QDeclarativeStateChangeScript::typeName() const /*! \qmlclass AnchorChanges QDeclarativeAnchorChanges + \ingroup qml-state-elements \brief The AnchorChanges element allows you to change the anchors of an item in a state. The AnchorChanges element is used to modify the anchors of an item in a \l State. diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp index c334859..7b80736 100644 --- a/src/declarative/util/qdeclarativesystempalette.cpp +++ b/src/declarative/util/qdeclarativesystempalette.cpp @@ -58,6 +58,7 @@ public: /*! \qmlclass SystemPalette QDeclarativeSystemPalette + \ingroup qml-utility-elements \since 4.7 \brief The SystemPalette element provides access to the Qt palettes. diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp index 838a8f3..56320e6 100644 --- a/src/declarative/util/qdeclarativetimer.cpp +++ b/src/declarative/util/qdeclarativetimer.cpp @@ -70,6 +70,7 @@ public: /*! \qmlclass Timer QDeclarativeTimer + \ingroup qml-utility-elements \since 4.7 \brief The Timer item triggers a handler at a specified interval. diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp index aa1426c..21d7ded 100644 --- a/src/declarative/util/qdeclarativetransition.cpp +++ b/src/declarative/util/qdeclarativetransition.cpp @@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Transition QDeclarativeTransition + \ingroup qml-animation-transition \since 4.7 \brief The Transition element defines animated transitions that occur on state changes. diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 8bd829e..7b3d4a8 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -72,6 +72,7 @@ typedef QPair<int, int> QDeclarativeXmlListRange; /*! \qmlclass XmlRole QDeclarativeXmlListModelRole + \ingroup qml-working-with-data \since 4.7 \brief The XmlRole element allows you to specify a role for an XmlListModel. @@ -505,6 +506,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla /*! \qmlclass XmlListModel QDeclarativeXmlListModel + \ingroup qml-working-with-data \since 4.7 \brief The XmlListModel element is used to specify a model using XPath expressions. |