summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/declarative/declarativeui.qdoc6
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc12
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp19
3 files changed, 30 insertions, 7 deletions
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index cd27c40..217e372 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -37,7 +37,9 @@ custom user interfaces from a rich set of \l {QML Elements}{QML elements}.
Qt Quick helps programmers and designers collaborate to
build the fluid user interfaces that are becoming common in portable
consumer devices, such as mobile phones, media players, set-top boxes
-and netbooks.
+and netbooks. Qt Quick consists of the QtDeclarative C++ module, QML, and
+the integration of both of these into the Qt Creator IDE. Using the QtDeclarative
+C++ module, you can load and interact with QML files from your Qt application.
QML is an extension to \l
{http://www.ecma-international.org/publications/standards/Ecma-262.htm}
@@ -58,7 +60,7 @@ complete internet-enabled applications like a \l
Qt Quick builds on \l {QML for Qt programmers}{Qt's existing
strengths}. QML can be be used to incrementally extend an existing
application or to build completely new applications. QML is fully \l
-{Extending QML in C++}{extensible from C++}.
+{Extending QML in C++}{extensible from C++} through the QtDeclarative Module.
\section1 Getting Started
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index ae54d58..68d56bf 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -27,8 +27,6 @@
/*!
- INCOMPLETE
-
\page qtprogrammers.html
\target qtprogrammers
\title QML for Qt programmers
@@ -146,4 +144,14 @@ transition from an arbitrary Text item, or characters within a Text item, so you
item would need to be sufficiently flexible to allow such animation.
\section1 QML Items Compared With QGraphicsWidgets
+
+The main difference between QML items and QGraphicsWidgets is how they are intended to be used. The technical implementation details are much the same, but in practice they are different because QML items are made for declarative and compositional use, and QGraphicsWidgets are made for imperative and more integrated use. Both QML items and QGraphicsWidgets inherit from QGraphicsObject, and can co-exist. The differences are in the layouting system and the interfacing with other components. Note that, as QGraphicsWidgets tend more to be all-in-one packages, the equivalent of a QGraphicsWidget may be many QML items composed across several QML files, but it can still be loaded and used as a single QGraphicsObject from C++.
+
+QGraphicsWidgets are usually designed to be laid out with QGraphicsLayouts. QML does not use QGraphicsLayouts, as the Qt layouts do not mix well with animated and fluid UIs, so the geometry interface is one of the main differences. When writing QML elements, you allow the designers to place their bounding rectangle using absolute geometry, bindings or anchors (all setup for you when you inherit QDeclarativeItem) and you do not use layouts or size hints. If size hints are appropriate, then place them in the QML documentation so that the designers know how to use the item best, but still have complete control over the look and feel.
+
+The other main difference is that QGraphicsWidgets tend to follow the widget model, in that they are a self-contained bundle of UI and logic. In contrast, QML primitives are usually a single purpose item that does not fulfill a use case on its own, but is composed into the equivalent of the widget inside the QML file. So when writing QML Items, try to avoid doing UI logic or composing visual elements inside the items. Try instead to write more general purpose primitives, so that the look and feel (which involves the UI logic) can be written in QML.
+
+Both differences are caused by the different method of interaction. QGraphicsWidget is a QGraphicsObject subclass which makes fluid UI development from C++ easier, and QDeclarativeItem is a QGraphicsObject subclass which makes fluid UI development from QML easier. The difference therefore is primarily one of the interface exposed, and the design of the items that come with it (the Declarative primitives for QML and the nothing for QGraphicsWidget, because you need to write your own UI logic into the subclass).
+
+If you wish to use both QML and C++ to write the UI, for example to ease the transition period, it is recommended to use QDeclarativeItem subclasses (although you can use QGraphicsWidgets as well). To allow for easier use from C++ make the root item of each C++ component a LayoutItem, and load individual 'widgets' of QML (possibly comprised of multiple files, and containing a self-contained bundle of UI and logic) into your scene to replace individual QGraphicsWidgets one at a time.
*/
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index e95dfc7..8fe8a9f 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -158,6 +158,11 @@ void QDeclarativeParticleMotion::destroy(QDeclarativeParticle &particle)
\brief The ParticleMotionLinear object moves particles linearly.
\sa Particles
+
+ This is the default motion, and moves the particles according to the
+ properties specified in the Particles element.
+
+ It has no further properties.
*/
/*!
@@ -178,6 +183,13 @@ void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int inte
\since 4.7
\brief The ParticleMotionGravity object moves particles towards a point.
+ This motion attracts the particles to the specified point with the specified acceleration.
+ To mimic earth gravity, set yattractor to -6360000 and acceleration to 9.8.
+
+ The defaults are all 0, not earth gravity, and so no motion will occur without setting
+ at least the acceleration property.
+
+
\sa Particles
*/
@@ -186,6 +198,7 @@ void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int inte
\class QDeclarativeParticleMotionGravity
\ingroup group_effects
\brief The QDeclarativeParticleMotionGravity class moves the particles towards a point.
+
*/
/*!
@@ -305,14 +318,14 @@ Rectangle {
*/
/*!
- \qmlproperty real QDeclarativeParticleMotionWander::xvariance
- \qmlproperty real QDeclarativeParticleMotionWander::yvariance
+ \qmlproperty real ParticleMotionWander::xvariance
+ \qmlproperty real ParticleMotionWander::yvariance
These properties set the amount to wander in the x and y directions.
*/
/*!
- \qmlproperty real QDeclarativeParticleMotionWander::pace
+ \qmlproperty real ParticleMotionWander::pace
This property holds how quickly the paricles will move from side to side.
*/