summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-04-24 04:40:45 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-04-24 04:40:45 (GMT)
commit3f4ad7b2066eb399f3ae2d6c888a9410a66c69b9 (patch)
tree38ad9b4d553c223859838f14a3cdaf66c817a1ae /src
parentb7451b45e43f1f21bc2b9e35c330f4f27225307d (diff)
parentbe859f223b21ac21f889d278c30ddd653f9233fc (diff)
downloadQt-3f4ad7b2066eb399f3ae2d6c888a9410a66c69b9.zip
Qt-3f4ad7b2066eb399f3ae2d6c888a9410a66c69b9.tar.gz
Qt-3f4ad7b2066eb399f3ae2d6c888a9410a66c69b9.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/easing/easing.cpp96
-rw-r--r--src/declarative/extra/qmlnumberformatter.cpp1
-rw-r--r--src/declarative/fx/qfxblendedimage.cpp29
-rw-r--r--src/declarative/fx/qfxitem.cpp27
-rw-r--r--src/declarative/fx/qfxitem.h4
-rw-r--r--src/declarative/fx/qfxpainted.cpp10
-rw-r--r--src/declarative/fx/qfxparticles.cpp2
-rw-r--r--src/declarative/fx/qfxpath.cpp123
-rw-r--r--src/declarative/fx/qfxrect.cpp5
-rw-r--r--src/declarative/fx/qfxreflectionfilter.cpp3
-rw-r--r--src/declarative/fx/qfxrepeater.cpp8
-rw-r--r--src/declarative/fx/qfxtext.cpp2
-rw-r--r--src/declarative/fx/qfxtextedit.cpp4
-rw-r--r--src/declarative/fx/qfxtransform.cpp5
-rw-r--r--src/declarative/fx/qfxwidgetcontainer.cpp2
-rw-r--r--src/declarative/qml/qmlengine.cpp10
-rw-r--r--src/declarative/util/qbindablemap.cpp3
-rw-r--r--src/declarative/util/qfxview.cpp10
-rw-r--r--src/declarative/util/qfxview.h1
19 files changed, 216 insertions, 129 deletions
diff --git a/src/3rdparty/easing/easing.cpp b/src/3rdparty/easing/easing.cpp
index 6a98c98..9177c26 100644
--- a/src/3rdparty/easing/easing.cpp
+++ b/src/3rdparty/easing/easing.cpp
@@ -37,36 +37,36 @@ static qreal easeNone(qreal progress)
{
return progress;
}
-
+
/**
* Easing equation function for a quadratic (t^2) easing in: accelerating from zero velocity.
*
* @param t Current time (in frames or seconds).
* @return The correct value.
*/
-static qreal easeInQuad(qreal t)
+static qreal easeInQuad(qreal t)
{
return t*t;
}
-
+
/**
* Easing equation function for a quadratic (t^2) easing out: decelerating to zero velocity.
*
* @param t Current time (in frames or seconds).
* @return The correct value.
*/
-static qreal easeOutQuad(qreal t)
+static qreal easeOutQuad(qreal t)
{
return -t*(t-2);
}
-
+
/**
* Easing equation function for a quadratic (t^2) easing in/out: acceleration until halfway, then deceleration.
*
* @param t Current time (in frames or seconds).
* @return The correct value.
*/
-static qreal easeInOutQuad(qreal t)
+static qreal easeInOutQuad(qreal t)
{
t*=2.0;
if (t < 1) {
@@ -76,7 +76,7 @@ static qreal easeInOutQuad(qreal t)
return -0.5 * (t*(t-2) - 1);
}
}
-
+
/**
* Easing equation function for a quadratic (t^2) easing out/in: deceleration until halfway, then acceleration.
*
@@ -88,7 +88,7 @@ static qreal easeOutInQuad(qreal t)
if (t < 0.5) return easeOutQuad (t*2)/2;
return easeInQuad((2*t)-1)/2 + 0.5;
}
-
+
/**
* Easing equation function for a cubic (t^3) easing in: accelerating from zero velocity.
*
@@ -99,7 +99,7 @@ static qreal easeInCubic(qreal t)
{
return t*t*t;
}
-
+
/**
* Easing equation function for a cubic (t^3) easing out: decelerating from zero velocity.
*
@@ -111,7 +111,7 @@ static qreal easeOutCubic(qreal t)
t-=1.0;
return t*t*t + 1;
}
-
+
/**
* Easing equation function for a cubic (t^3) easing in/out: acceleration until halfway, then deceleration.
*
@@ -151,7 +151,7 @@ static qreal easeInQuart(qreal t)
{
return t*t*t*t;
}
-
+
/**
* Easing equation function for a quartic (t^4) easing out: decelerating from zero velocity.
*
@@ -163,7 +163,7 @@ static qreal easeOutQuart(qreal t)
t-= qreal(1.0);
return - (t*t*t*t- 1);
}
-
+
/**
* Easing equation function for a quartic (t^4) easing in/out: acceleration until halfway, then deceleration.
*
@@ -178,7 +178,7 @@ static qreal easeInOutQuart(qreal t)
t -= 2.0f;
return -0.5 * (t*t*t*t- 2);
}
-}
+}
/**
* Easing equation function for a quartic (t^4) easing out/in: deceleration until halfway, then acceleration.
@@ -186,12 +186,12 @@ static qreal easeInOutQuart(qreal t)
* @param t Current time (in frames or seconds).
* @return The correct value.
*/
-static qreal easeOutInQuart(qreal t)
+static qreal easeOutInQuart(qreal t)
{
if (t < 0.5) return easeOutQuart (2*t)/2;
return easeInQuart(2*t-1)/2 + 0.5;
}
-
+
/**
* Easing equation function for a quintic (t^5) easing in: accelerating from zero velocity.
*
@@ -202,7 +202,7 @@ static qreal easeInQuint(qreal t)
{
return t*t*t*t*t;
}
-
+
/**
* Easing equation function for a quintic (t^5) easing out: decelerating from zero velocity.
*
@@ -214,7 +214,7 @@ static qreal easeOutQuint(qreal t)
t-=1.0;
return t*t*t*t*t + 1;
}
-
+
/**
* Easing equation function for a quintic (t^5) easing in/out: acceleration until halfway, then deceleration.
*
@@ -230,7 +230,7 @@ static qreal easeInOutQuint(qreal t)
return 0.5*(t*t*t*t*t + 2);
}
}
-
+
/**
* Easing equation function for a quintic (t^5) easing out/in: deceleration until halfway, then acceleration.
*
@@ -242,7 +242,7 @@ static qreal easeOutInQuint(qreal t)
if (t < 0.5) return easeOutQuint (2*t)/2;
return easeInQuint(2*t - 1)/2 + 0.5;
}
-
+
/**
* Easing equation function for a sinusoidal (sin(t)) easing in: accelerating from zero velocity.
*
@@ -253,7 +253,7 @@ static qreal easeInSine(qreal t)
{
return (t == 1.0) ? 1.0 : -::cos(t * M_PI_2) + 1.0;
}
-
+
/**
* Easing equation function for a sinusoidal (sin(t)) easing out: decelerating from zero velocity.
*
@@ -264,7 +264,7 @@ static qreal easeOutSine(qreal t)
{
return ::sin(t* M_PI_2);
}
-
+
/**
* Easing equation function for a sinusoidal (sin(t)) easing in/out: acceleration until halfway, then deceleration.
*
@@ -275,7 +275,7 @@ static qreal easeInOutSine(qreal t)
{
return -0.5 * (::cos(M_PI*t) - 1);
}
-
+
/**
* Easing equation function for a sinusoidal (sin(t)) easing out/in: deceleration until halfway, then acceleration.
*
@@ -287,7 +287,7 @@ static qreal easeOutInSine(qreal t)
if (t < 0.5) return easeOutSine (2*t)/2;
return easeInSine(2*t - 1)/2 + 0.5;
}
-
+
/**
* Easing equation function for an exponential (2^t) easing in: accelerating from zero velocity.
*
@@ -336,7 +336,7 @@ static qreal easeOutInExpo(qreal t)
if (t < 0.5) return easeOutExpo (2*t)/2;
return easeInExpo(2*t - 1)/2 + 0.5;
}
-
+
/**
* Easing equation function for a circular (sqrt(1-t^2)) easing in: accelerating from zero velocity.
*
@@ -547,23 +547,23 @@ static qreal easeOutInBack(qreal t, qreal s)
return easeInBack(2*t - 1, s)/2 + 0.5;
}
-static qreal easeOutBounce_helper(qreal t, qreal b, qreal c, qreal a)
+static qreal easeOutBounce_helper(qreal t, qreal c, qreal a)
{
- if (t == 1.0) return 1.0;
- if (t < (1/2.75)) {
- return c*(7.5625*t*t) + b;
- } else if (t < (2/2.75)) {
- t -= (1.5f/2.75f);
- return -a * (1. - (7.5625*t*t + .75)) + (b + c);
- } else if (t < (2.5/2.75)) {
- t -= (2.25f/2.75f);
- return -a * (1. - (7.5625*t*t + .9375)) + (b + c);
+ if (t == 1.0) return c;
+ if (t < (4/11.0)) {
+ return c*(7.5625*t*t);
+ } else if (t < (8/11.0)) {
+ t -= (6/11.0);
+ return -a * (1. - (7.5625*t*t + .75)) + c;
+ } else if (t < (10/11.0)) {
+ t -= (9/11.0);
+ return -a * (1. - (7.5625*t*t + .9375)) + c;
} else {
- t -= (2.65f/2.75f);
- return -a * (1. - (7.5625*t*t + .984375)) + (b + c);
+ t -= (21/22.0);
+ return -a * (1. - (7.5625*t*t + .984375)) + c;
}
}
-
+
/**
* Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity.
*
@@ -573,7 +573,7 @@ static qreal easeOutBounce_helper(qreal t, qreal b, qreal c, qreal a)
*/
static qreal easeOutBounce(qreal t, qreal a)
{
- return easeOutBounce_helper(t, 0, 1, a);
+ return easeOutBounce_helper(t, 1, a);
}
/**
@@ -585,10 +585,10 @@ static qreal easeOutBounce(qreal t, qreal a)
*/
static qreal easeInBounce(qreal t, qreal a)
{
- return 1.0 - easeOutBounce_helper(1.0-t, 0, 1.0, a);
+ return 1.0 - easeOutBounce_helper(1.0-t, 1.0, a);
}
-
-
+
+
/**
* Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration.
*
@@ -601,7 +601,7 @@ static qreal easeInOutBounce(qreal t, qreal a)
if (t < 0.5) return easeInBounce (2*t, a)/2;
else return (t == 1.0) ? 1.0 : easeOutBounce (2*t - 1, a)/2 + 0.5;
}
-
+
/**
* Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out/in: deceleration until halfway, then acceleration.
*
@@ -611,8 +611,8 @@ static qreal easeInOutBounce(qreal t, qreal a)
*/
static qreal easeOutInBounce(qreal t, qreal a)
{
- if (t < 0.5) return easeOutBounce_helper(t*2, 0, 0.5, a);
- return 1.0 - easeOutBounce_helper (2.0-2*t, 0.0, 0.5, a);
+ if (t < 0.5) return easeOutBounce_helper(t*2, 0.5, a);
+ return 1.0 - easeOutBounce_helper (2.0-2*t, 0.5, a);
}
static inline qreal qt_sinProgress(qreal value)
@@ -633,7 +633,7 @@ static inline qreal qt_smoothBeginEndMixFactor(qreal value)
/**
* Easing function that starts growing slowly, then increases in speed. At the end of the curve the speed will be constant.
*/
-static qreal easeInCurve(qreal t)
+static qreal easeInCurve(qreal t)
{
const qreal sinProgress = qt_sinProgress(t);
const qreal mix = qt_smoothBeginEndMixFactor(t);
@@ -643,7 +643,7 @@ static qreal easeInCurve(qreal t)
/**
* Easing function that starts growing steadily, then ends slowly. The speed will be constant at the beginning of the curve.
*/
-static qreal easeOutCurve(qreal t)
+static qreal easeOutCurve(qreal t)
{
const qreal sinProgress = qt_sinProgress(t);
const qreal mix = qt_smoothBeginEndMixFactor(1 - t);
@@ -653,7 +653,7 @@ static qreal easeOutCurve(qreal t)
/**
* Easing function where the value grows sinusoidally. Note that the calculated end value will be 0 rather than 1.
*/
-static qreal easeSineCurve(qreal t)
+static qreal easeSineCurve(qreal t)
{
return (qSin(((t * M_PI * 2)) - M_PI_2) + 1) / 2;
}
@@ -662,7 +662,7 @@ static qreal easeSineCurve(qreal t)
* Easing function where the value grows cosinusoidally. Note that the calculated start value will be 0.5 and the end value will be 0.5
* contrary to the usual 0 to 1 easing curve.
*/
-static qreal easeCosineCurve(qreal t)
+static qreal easeCosineCurve(qreal t)
{
return (qCos(((t * M_PI * 2)) - M_PI_2) + 1) / 2;
}
diff --git a/src/declarative/extra/qmlnumberformatter.cpp b/src/declarative/extra/qmlnumberformatter.cpp
index 60b154d..8772305 100644
--- a/src/declarative/extra/qmlnumberformatter.cpp
+++ b/src/declarative/extra/qmlnumberformatter.cpp
@@ -78,6 +78,7 @@ public:
*/
/*!
+ \internal
\class QmlNumberFormatter
\ingroup group_utility
\brief The QmlNumberFormatter class allows you to format a number to a particular string format/locale specific number format.
diff --git a/src/declarative/fx/qfxblendedimage.cpp b/src/declarative/fx/qfxblendedimage.cpp
index 9a3bb72..b5d9a9a 100644
--- a/src/declarative/fx/qfxblendedimage.cpp
+++ b/src/declarative/fx/qfxblendedimage.cpp
@@ -49,12 +49,24 @@
QT_BEGIN_NAMESPACE
/*!
+ \qmlclass BlendedImage
+ \brief The BlendedImage elements blends two different images depending on a blend ratio.
+
+ This element can be used to simulate blur on slow devices by setting secondaryUrl with
+ a pre-rendered blurred version of primaryUrl.
+
+ Note that this class will only work under OpenGL. On the software canvas it will display
+ only the primary image unless the blend is > 0.75, in which case it will display only the
+ secondary image.
+*/
+
+/*!
\internal
\class QFxBlendedImage
\brief The QFxBlendedImage blends two different images depending on a blend ratio.
- This class can be used to simulate blur on slow devices by setting secondaryFile with
- a pre-rendered blurred version of primaryFile.
+ This class can be used to simulate blur on slow devices by setting secondaryUrl with
+ a pre-rendered blurred version of primaryUrl.
Note that this class will only work under OpenGL. On the software canvas it will display
only the primary image unless the blend is > 0.75, in which case it will display only the
@@ -69,8 +81,8 @@ QFxBlendedImage::QFxBlendedImage(QFxItem *parent)
}
/*!
- \property QFxBlendedImage::primaryUrl
- \brief the URL of the first image to be displayed in this item.
+ \qmlproperty string BlendedImage::primaryUrl
+ The URL of the first image to be displayed in this item.
*/
QString QFxBlendedImage::primaryUrl() const
{
@@ -97,8 +109,8 @@ void QFxBlendedImage::setPrimaryUrl(const QString &url)
}
/*!
- \property QFxBlendedImage::secondaryUrl
- \brief the URL of the second image to be displayed in this item.
+ \qmlproperty string BlendedImage::secondaryUrl
+ The URL of the second image to be displayed in this item.
*/
QString QFxBlendedImage::secondaryUrl() const
{
@@ -125,8 +137,8 @@ void QFxBlendedImage::setSecondaryUrl(const QString &url)
}
/*!
- \property QFxBlendedImage::blend
- \brief the ratio used to blend the two images.
+ \qmlproperty real BlendedImage::blend
+ The ratio used to blend the two images.
If blend has a value of 0, only the first image will be displayed.
If blend has a value of 1, only the second image will be displayed.
@@ -246,4 +258,5 @@ void QFxBlendedImage::paintGLContents(GLPainter &p)
#endif
QML_DEFINE_TYPE(QFxBlendedImage,BlendedImage);
+
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index ed65b84..6b4c504 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -838,23 +838,6 @@ void QFxItem::qmlLoaded()
}
/*!
- \qmlproperty Item Item::clipToItem
-
- Experimental clip to item support. Do not use.
-
- \todo complete clip to item support.
- */
-QFxItem *QFxItem::clipToItem() const
-{
- return 0;
-}
-
-void QFxItem::setClipToItem(QFxItem *)
-{
- qWarning() << "QFxItem: clipToItem not implemented";
-}
-
-/*!
\qmlproperty real Item::x
\qmlproperty real Item::y
\qmlproperty int Item::width
@@ -1361,7 +1344,7 @@ void QFxItem::setScale(qreal s)
Opacity is an \e inherited attribute. That is, the opacity is
also applied individually to child items. In almost all cases this
is what you want. If you can spot the issue in the following
- example, you might need to use an opacity filter instead.
+ example, you might need to use an opacity filter (not yet available) instead.
\table
\row
@@ -1385,8 +1368,6 @@ void QFxItem::setScale(qreal s)
</Item>
\endqml
\endtable
-
- \todo There is no such thing as an opacity filter
*/
qreal QFxItem::opacity() const
@@ -1488,8 +1469,8 @@ QmlList<QmlTransition *>* QFxItem::transitions()
\qmlproperty list<Filter> Item::filter
This property holds a list of graphical filters to be applied to the item.
- \l {qmlfilter}{Filters} include things like \l {qmlblur}{blurring}
- the item, or giving it a Reflection. Some
+ \l {Filter}{Filters} include things like \l {Blur}{blurring}
+ the item, or giving it a \l Reflection. Some
filters may not be available on all canvases; if a filter is not
available on a certain canvas, it will simply not be applied for
that canvas (but the XML will still be considered valid).
@@ -1677,7 +1658,7 @@ void QFxItem::classBegin()
void QFxItem::classComplete()
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::ItemClassComplete> cc;
+ QFxPerfTimer<QFxPerf::ItemComponentComplete> cc;
#endif
Q_D(QFxItem);
d->_classComplete = true;
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index d3b9899..c47a1e1 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -113,7 +113,6 @@ class Q_DECLARATIVE_EXPORT QFxItem : public QSimpleCanvasItem, public QmlParserS
Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged)
Q_PROPERTY(QString qml READ qml WRITE setQml NOTIFY qmlChanged)
Q_PROPERTY(QFxItem *qmlItem READ qmlItem NOTIFY qmlChanged)
- Q_PROPERTY(QFxItem *clipToItem READ clipToItem WRITE setClipToItem)
Q_PROPERTY(qreal x READ x WRITE setX NOTIFY leftChanged)
Q_PROPERTY(qreal y READ y WRITE setY NOTIFY topChanged)
Q_PROPERTY(qreal z READ z WRITE setZ)
@@ -174,9 +173,6 @@ public:
QString qml() const;
void setQml(const QString &);
- QFxItem *clipToItem() const;
- void setClipToItem(QFxItem *i);
-
bool flipVertically() const;
void setFlipVertically(bool);
bool flipHorizontally() const;
diff --git a/src/declarative/fx/qfxpainted.cpp b/src/declarative/fx/qfxpainted.cpp
index 8109efa..ad1b3ad 100644
--- a/src/declarative/fx/qfxpainted.cpp
+++ b/src/declarative/fx/qfxpainted.cpp
@@ -77,13 +77,12 @@ QT_BEGIN_NAMESPACE
*/
/*!
- Constructs the painted item.
+ Constructs a painted item with parent object \a parent.
*/
-
-//### what options do we need to set?
QFxPainted::QFxPainted(QFxItem *parent)
: QFxItem(*(new QFxPaintedPrivate), parent)
{
+ //### what options do we need to set?
setOptions(HasContents, true);
}
@@ -105,8 +104,9 @@ QFxPainted::QFxPainted(QFxPaintedPrivate &dd, QFxItem *parent)
/*!
\fn QFxPainted::paint(QPainter *painter)
- Implement this method to paint the item. The painting will be cached and
- paint() will only be called again if \l markDirty() has been called.
+ Implement this method to paint the item using \a painter.
+ The painting will be cached and paint() will only be called again
+ if \l markDirty() has been called.
\sa markDirty()
*/
diff --git a/src/declarative/fx/qfxparticles.cpp b/src/declarative/fx/qfxparticles.cpp
index 939afba..9319c46 100644
--- a/src/declarative/fx/qfxparticles.cpp
+++ b/src/declarative/fx/qfxparticles.cpp
@@ -917,7 +917,7 @@ void QFxParticles::setStreamIn(bool b)
will be produced until it is set to true.
*/
/*!
- \property bool Particles::emitting
+ \property QFxParticles::emitting
If emitting is set to false no new particles will be created. This means that
when a particle reaches the end of its lifespan it is not replaced. This
property can be used to turn particles on and off with a more natural look.
diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp
index 14c06bb..06c9f2b 100644
--- a/src/declarative/fx/qfxpath.cpp
+++ b/src/declarative/fx/qfxpath.cpp
@@ -462,8 +462,43 @@ void QFxCurve::setY(int y)
/****************************************************************************/
/*!
- \qmlclass PathAttribute
- \brief The PathAttribute allows to set an attribute at a given position in the path.
+ \qmlclass PathAttribute
+ \brief The PathAttribute allows setting an attribute at a given position in a Path.
+
+ The PathAttribute element allows attibutes consisting of a name and a
+ value to be specified for the endpoints of path segments. The attributes
+ are exposed to the delegate as \l {Attached Properties}. The value of
+ an attribute at any particular point is interpolated from the PathAttributes
+ bounding the point.
+
+ The example below shows a path with the items scaled to 10% at the ends of
+ the path and scaled 100% along the PathLine in the middle. Note the use
+ of the PathView.scale attached property to set the scale of the delegate.
+ \table
+ \row
+ \o \image declarative-pathattribute.png
+ \o
+ \code
+ <Component id="Delegate">
+ <Rect id="Wrapper" width="20" height="20" scale="{PathView.scale}" color="steelblue"/>
+ </Component>
+ <PathView width="200" height="100" model="{Model}" delegate="{Delegate}">
+ <path>
+ <Path startX="20" startY="0">
+ <PathAttribute name="scale" value="0.1"/>
+ <PathQuad x="50" y="80" controlX="0" controlY="80"/>
+ <PathAttribute name="scale" value="1"/>
+ <PathLine x="150" y="80"/>
+ <PathAttribute name="scale" value="1"/>
+ <PathQuad x="180" y="0" controlX="200" controlY="80"/>
+ <PathAttribute name="scale" value="0.1"/>
+ </Path>
+ </path>
+ </PathView>
+ \endcode
+ \endtable
+
+ \sa Path
*/
/*!
@@ -519,8 +554,19 @@ void QFxPathAttribute::setValue(qreal value)
/****************************************************************************/
/*!
- \qmlclass PathLine
- \brief The PathLine defines a straight line.
+ \qmlclass PathLine
+ \brief The PathLine defines a straight line.
+
+ The example below creates a path consisting of a straight line from
+ 0,100 to 200,100:
+
+ \code
+ <Path startX="0" startY="100">
+ <PathLine x="200" y="100"/>
+ </Path>
+ \endcode
+
+ \sa Path, PathQuad, PathCubic
*/
@@ -541,9 +587,22 @@ void QFxPathLine::addToPath(QPainterPath &path)
/****************************************************************************/
/*!
- \qmlclass PathQuad
- \brief The PathQuad defines a quadratic Bezier curve with a control point.
+ \qmlclass PathQuad
+ \brief The PathQuad defines a quadratic Bezier curve with a control point.
+
+ The following QML produces the path shown below:
+ \table
+ \row
+ \o \image declarative-pathquad.png
+ \o
+ \code
+ <Path startX="0" startY="0">
+ <PathQuad x="200" y="0" controlX="100" controlY="150"/>
+ </Path>
+ \endcode
+ \endtable
+ \sa Path, PathCubic, PathLine
*/
/*!
@@ -557,7 +616,7 @@ void QFxPathLine::addToPath(QPainterPath &path)
/*!
\qmlproperty string PathQuad::controlX
- the x position of the control point.
+ The x position of the control point.
*/
/*!
@@ -578,7 +637,7 @@ void QFxPathQuad::setControlX(int x)
/*!
\qmlproperty string PathQuad::controlY
- the y position of the control point.
+ The y position of the control point.
*/
/*!
@@ -608,6 +667,20 @@ void QFxPathQuad::addToPath(QPainterPath &path)
\qmlclass PathCubic
\brief The PathCubic defines a cubic Bezier curve with two control points.
+ The following QML produces the path shown below:
+ \table
+ \row
+ \o \image declarative-pathcubic.png
+ \o
+ \code
+ <Path startX="20" startY="0">
+ <PathCubic x="180" y="0" control1X="-10" control1Y="90"
+ control2X="210" control2Y="90"/>
+ </Path>
+ \endcode
+ \endtable
+
+ \sa Path, PathQuad, PathLine
*/
/*!
@@ -715,9 +788,39 @@ void QFxPathCubic::addToPath(QPainterPath &path)
/****************************************************************************/
/*!
- \qmlclass PathPercent
- \brief The PathPercent manipulates the way a path is interpreted.
+ \qmlclass PathPercent
+ \brief The PathPercent manipulates the way a path is interpreted.
+
+ The examples below show the normal distrubution of items along a path
+ compared to a distribution which places 50% of the items along the
+ PathLine section of the path.
+ \table
+ \row
+ \o \image declarative-nopercent.png
+ \o
+ \code
+ <Path startX="20" startY="0">
+ <PathQuad x="50" y="80" controlX="0" controlY="80"/>
+ <PathLine x="150" y="80"/>
+ <PathQuad x="180" y="0" controlX="200" controlY="80"/>
+ </Path>
+ \endcode
+ \row
+ \o \image declarative-percent.png
+ \o
+ \code
+ <Path startX="20" startY="0">
+ <PathQuad x="50" y="80" controlX="0" controlY="80"/>
+ <PathPercent value=".25"/>
+ <PathLine x="150" y="80"/>
+ <PathPercent value=".75"/>
+ <PathQuad x="180" y="0" controlX="200" controlY="80"/>
+ <PathPercent value="1"/>
+ </Path>
+ \endcode
+ \endtable
+ \sa Path
*/
/*!
diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp
index 2e84c74..a761ec5 100644
--- a/src/declarative/fx/qfxrect.cpp
+++ b/src/declarative/fx/qfxrect.cpp
@@ -70,10 +70,7 @@ QML_DEFINE_TYPE(QFxPen,Pen);
\brief the color of the pen.
color is most commonly specified in hexidecimal notation (#RRGGBB)
- or as an
- \htmlonly
- <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords"> SVG color keyword name</a>
- \endhtmlonly
+ or as an \l {http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG color keyword name}
(as defined by the World Wide Web Consortium). For example:
\code
<!-- rect with green border using hexidecimal notation -->
diff --git a/src/declarative/fx/qfxreflectionfilter.cpp b/src/declarative/fx/qfxreflectionfilter.cpp
index d67095b..39342d7 100644
--- a/src/declarative/fx/qfxreflectionfilter.cpp
+++ b/src/declarative/fx/qfxreflectionfilter.cpp
@@ -103,9 +103,6 @@ public:
Reflection is only supported when Qt Declarative is compiled for OpenGL ES 2.0.
Otherwise the Reflection filter has no effect.
-
- \todo describe (and fix) reflection and bounding box interaction
-
*/
/*!
diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp
index ec1d88c..570d54d 100644
--- a/src/declarative/fx/qfxrepeater.cpp
+++ b/src/declarative/fx/qfxrepeater.cpp
@@ -110,13 +110,7 @@ QML_DEFINE_TYPE(QFxRepeater,Repeater);
The repeater instance continues to own all items it instantiates, even
if they are otherwise manipulated. It is illegal to manually remove an item
- created by the Repeater.
-
- \todo Repeater is very conservative in how it instatiates/deletes items.
- Also new model entries will not be created and old ones will not be removed.
-
- \todo Need an example
-
+ created by the Repeater.
*/
/*!
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index bc03d7c..e7085d8 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -85,8 +85,6 @@ QML_DEFINE_TYPE(QFxText,Text);
plain text to a set width.
Text provides read-only text. For editable text, see \l TextEdit.
-
- \todo explain details of auto-sizing
*/
/*!
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index 96ebe0d..7efb826 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -294,7 +294,7 @@ void QFxTextEdit::setColor(const QColor &color)
*/
/*!
- \property QFxText::hAlign
+ \property QFxTextEdit::hAlign
\brief the horizontal alignment of the text.
Valid values are \c AlignLeft, \c AlignRight, and \c AlignHCenter. The default value is \c AlignLeft.
@@ -316,7 +316,7 @@ void QFxTextEdit::setHAlign(QFxTextEdit::HAlignment alignment)
}
/*!
- \property QFxText::vAlign
+ \property QFxTextEdit::vAlign
\brief the vertical alignment of the text.
Valid values are \c AlignTop, \c AlignBottom, and \c AlignVCenter. The default value is \c AlignTop.
diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp
index 90875a6..a001214 100644
--- a/src/declarative/fx/qfxtransform.cpp
+++ b/src/declarative/fx/qfxtransform.cpp
@@ -56,8 +56,6 @@ QML_DEFINE_TYPE(QFxTransform,Transform);
/*!
\qmlclass Transform
\brief A transformation.
-
- \todo Document Transform.
*/
QFxTransform::QFxTransform(QObject *parent) :
QObject(parent)
@@ -334,9 +332,6 @@ public:
\endcode
\image flipable.gif
-
- \todo A lot needs to be done to get a fully-functioning Flipable. Should we simplify?
-
*/
/*!
diff --git a/src/declarative/fx/qfxwidgetcontainer.cpp b/src/declarative/fx/qfxwidgetcontainer.cpp
index 44ccf0f..f86c8dc 100644
--- a/src/declarative/fx/qfxwidgetcontainer.cpp
+++ b/src/declarative/fx/qfxwidgetcontainer.cpp
@@ -73,7 +73,7 @@ QGraphicsWidget *QFxWidgetContainer::graphicsWidget() const
}
/*!
- \property QGraphicsWidget QFxWidgetContainer::graphicsWidget
+ \qmlproperty QGraphicsWidget QFxWidgetContainer::graphicsWidget
The QGraphicsWidget associated with this element.
*/
void QFxWidgetContainer::setGraphicsWidget(QGraphicsWidget *widget)
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index b42480d..5cbd02b 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -461,7 +461,7 @@ QmlContext *QmlEngine::activeContext()
/*!
Sets the mappings from namespace URIs to URL to \a map.
- \sa nameSpacePaths
+ \sa nameSpacePaths()
*/
void QmlEngine::setNameSpacePaths(const QMap<QString,QString>& map)
{
@@ -472,7 +472,7 @@ void QmlEngine::setNameSpacePaths(const QMap<QString,QString>& map)
/*!
Adds mappings (given by \a map) from namespace URIs to URL.
- \sa nameSpacePaths
+ \sa nameSpacePaths()
*/
void QmlEngine::addNameSpacePaths(const QMap<QString,QString>& map)
{
@@ -483,7 +483,7 @@ void QmlEngine::addNameSpacePaths(const QMap<QString,QString>& map)
/*!
Adds a mapping from namespace URI \a ns to URL \a path.
- \sa nameSpacePaths
+ \sa nameSpacePaths()
*/
void QmlEngine::addNameSpacePath(const QString& ns, const QString& path)
{
@@ -521,7 +521,7 @@ void QmlEngine::addNameSpacePath(const QString& ns, const QString& path)
In the above case, "xyz://abc/def/Bar.qml" would then map to
"file:///opt/jkl/def/Bar.qml".
- \sa componentUrl
+ \sa componentUrl()
*/
QMap<QString,QString> QmlEngine::nameSpacePaths() const
{
@@ -533,7 +533,7 @@ QMap<QString,QString> QmlEngine::nameSpacePaths() const
Returns the URL for the component source \a src, as mapped
by the nameSpacePaths(), resolved relative to \a baseUrl.
- \sa nameSpacePaths
+ \sa nameSpacePaths()
*/
QUrl QmlEngine::componentUrl(const QUrl& src, const QUrl& baseUrl) const
{
diff --git a/src/declarative/util/qbindablemap.cpp b/src/declarative/util/qbindablemap.cpp
index aea2a2c..341dd31 100644
--- a/src/declarative/util/qbindablemap.cpp
+++ b/src/declarative/util/qbindablemap.cpp
@@ -117,6 +117,9 @@ QBindableMap::QBindableMap(QObject *parent)
m_mo = new QBindableMapMetaObject(this);
}
+/*!
+ Destroys the bindable map.
+*/
QBindableMap::~QBindableMap()
{
}
diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp
index a8b8eea..993d5cb 100644
--- a/src/declarative/util/qfxview.cpp
+++ b/src/declarative/util/qfxview.cpp
@@ -228,7 +228,9 @@ void QFxView::continueExecute()
QPerformanceLog::displayData();
QPerformanceLog::clear();
d->root = item;
- emit sceneResized(QSize(item->width(), item->height()));
+ connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged()));
+ connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged()));
+ sizeChanged();
} else if(QWidget *wid = qobject_cast<QWidget *>(obj)) {
window()->setAttribute(Qt::WA_OpaquePaintEvent, false);
window()->setAttribute(Qt::WA_NoSystemBackground, false);
@@ -246,6 +248,12 @@ void QFxView::continueExecute()
}
}
+void QFxView::sizeChanged()
+{
+ if (d->root)
+ emit sceneResized(QSize(d->root->width(),d->root->height()));
+}
+
QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent)
{
if(!d->root)
diff --git a/src/declarative/util/qfxview.h b/src/declarative/util/qfxview.h
index b5592b8..3c4be20 100644
--- a/src/declarative/util/qfxview.h
+++ b/src/declarative/util/qfxview.h
@@ -89,6 +89,7 @@ Q_SIGNALS:
private Q_SLOTS:
void continueExecute();
+ void sizeChanged();
protected:
virtual void resizeEvent(QResizeEvent *);