summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-11 06:57:28 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-11 06:57:28 (GMT)
commit3fa3e8d03109ec566b9f33c85543157467adfeea (patch)
tree788c864f726475393cd676b25572ab41eba54d39
parent2f0337cbbc442904f77b768df41b45754e251614 (diff)
parent66a8b8b7bdb7fb9811cdeccfa7e57c44d8b4fd8c (diff)
downloadQt-3fa3e8d03109ec566b9f33c85543157467adfeea.zip
Qt-3fa3e8d03109ec566b9f33c85543157467adfeea.tar.gz
Qt-3fa3e8d03109ec566b9f33c85543157467adfeea.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsparticles.cpp2
-rw-r--r--src/declarative/util/qmllistmodel.cpp12
-rw-r--r--tests/auto/declarative/declarative.pro1
-rw-r--r--tests/auto/declarative/qmlgraphicspathview/data/pathview1.qml4
-rw-r--r--tests/auto/declarative/qmlgraphicspathview/data/pathview2.qml57
-rw-r--r--tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml58
-rw-r--r--tests/auto/declarative/qmlgraphicspathview/qmlgraphicspathview.pro8
-rw-r--r--tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp123
-rw-r--r--tools/qdoc3/cppcodemarker.cpp4
12 files changed, 265 insertions, 14 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
index db28134..8c91056 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
QMovie::supportedFormats().
\table
- \row
+ \row
\o \image animatedimageitem.gif
\o
\qml
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index 572aa98..aa5c4cb 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -1329,9 +1329,9 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject
Key handling is available to all Item-based visual elements via the \l {Keys}{Keys}
attached property. The \e Keys attached property provides basic handlers such
- as \l {Keys::onPressed(event)}{onPressed} and \l {Keys::onReleased(event)}{onReleased},
+ as \l {Keys::onPressed}{onPressed} and \l {Keys::onReleased}{onReleased},
as well as handlers for specific keys, such as
- \l {Keys::onCancelPressed(event)}{onCancelPressed}. The example below
+ \l {Keys::onCancelPressed}{onCancelPressed}. The example below
assigns \l {qmlfocus}{focus} to the item and handles
the Left key via the general \e onPressed handler and the Select key via the
onSelectPressed handler:
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
index 12bf0d8..edcd094 100644
--- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
@@ -1663,7 +1663,7 @@ void QmlGraphicsListView::keyPressEvent(QKeyEvent *event)
}
/*!
- \qmlmethod ListView::incrementCurrentIndex
+ \qmlmethod ListView::incrementCurrentIndex()
Increments the current index. The current index will wrap
if keyNavigationWraps is true and it is currently at the end.
@@ -1680,7 +1680,7 @@ void QmlGraphicsListView::incrementCurrentIndex()
}
/*!
- \qmlmethod ListView::decrementCurrentIndex
+ \qmlmethod ListView::decrementCurrentIndex()
Decrements the current index. The current index will wrap
if keyNavigationWraps is true and it is currently at the beginning.
diff --git a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
index 399e1a5..a0b41e8 100644
--- a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
@@ -1169,7 +1169,7 @@ void QmlGraphicsParticles::setMotion(QmlGraphicsParticleMotion *motion)
}
/*!
- \qmlmethod Particles::burst
+ \qmlmethod Particles::burst(int count, int emissionRate)
Initiates a burst of particles.
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 19282eb..9e91147 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -467,7 +467,7 @@ void QmlListModel::remove(int index)
}
/*!
- \qmlmethod ListModel::insert(index,dict)
+ \qmlmethod ListModel::insert(int index, jsobject dict)
Adds a new item to the list model at position \a index, with the
values in \a dict.
@@ -500,7 +500,7 @@ void QmlListModel::insert(int index, const QScriptValue& valuemap)
}
/*!
- \qmlmethod ListModel::move(from,to,n)
+ \qmlmethod ListModel::move(int from, int to, int n)
Moves \a n items \a from one position \a to another.
@@ -551,7 +551,7 @@ void QmlListModel::move(int from, int to, int n)
}
/*!
- \qmlmethod ListModel::append(dict)
+ \qmlmethod ListModel::append(jsobject dict)
Adds a new item to the end of the list model, with the
values in \a dict.
@@ -578,7 +578,7 @@ void QmlListModel::append(const QScriptValue& valuemap)
}
/*!
- \qmlmethod object ListModel::get(index)
+ \qmlmethod object ListModel::get(int index)
Returns the item at \a index in the list model.
@@ -620,7 +620,7 @@ QScriptValue QmlListModel::get(int index) const
}
/*!
- \qmlmethod ListModel::set(index,dict)
+ \qmlmethod ListModel::set(int index, jsobject dict)
Changes the item at \a index in the list model with the
values in \a dict. Properties not appearing in \a valuemap
@@ -663,7 +663,7 @@ void QmlListModel::set(int index, const QScriptValue& valuemap)
}
/*!
- \qmlmethod ListModel::set(index,property,value)
+ \qmlmethod ListModel::set(int index, string property, variant value)
Changes the \a property of the item at \a index in the list model to \a value.
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 8a3a06c..1d08d92 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -27,6 +27,7 @@ SUBDIRS += \
qmlgraphicslistview \ # Cover
qmlgraphicsloader \ # Cover
qmlgraphicsparticles \ # Cover
+ qmlgraphicspathview \ # Cover
qmlgraphicspositioners \ # Cover
qmlgraphicstext \ # Cover
qmlgraphicstextedit \ # Cover
diff --git a/tests/auto/declarative/qmlgraphicspathview/data/pathview1.qml b/tests/auto/declarative/qmlgraphicspathview/data/pathview1.qml
new file mode 100644
index 0000000..b3b0a9a
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspathview/data/pathview1.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+PathView {
+}
diff --git a/tests/auto/declarative/qmlgraphicspathview/data/pathview2.qml b/tests/auto/declarative/qmlgraphicspathview/data/pathview2.qml
new file mode 100644
index 0000000..0d5c98b
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspathview/data/pathview2.qml
@@ -0,0 +1,57 @@
+import Qt 4.6
+
+PathView {
+ id: photoPathView; model: rssModel; delegate: photoDelegate
+ y: 100; width: 800; height: 330; pathItemCount: 10; z: 1
+
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+
+ model: ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+
+ delegate: Component {
+ id: photoDelegate
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+ scale: wrapper.PathView.scale
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml b/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml
new file mode 100644
index 0000000..a8c1e91
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+
+PathView {
+ id: photoPathView; model: rssModel; delegate: photoDelegate
+ y: 100; width: 800; height: 330; pathItemCount: 4; offset: 10
+ dragMargin: 24; snapPosition: 50
+
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+
+ model: ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+
+ delegate: Component {
+ id: photoDelegate
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+ scale: wrapper.PathView.scale
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspathview/qmlgraphicspathview.pro b/tests/auto/declarative/qmlgraphicspathview/qmlgraphicspathview.pro
new file mode 100644
index 0000000..142a256
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspathview/qmlgraphicspathview.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qmlgraphicspathview.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp b/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp
new file mode 100644
index 0000000..c36b969
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspathview/tst_qmlgraphicspathview.cpp
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <private/qmlgraphicspathview_p.h>
+#include <qmlcontext.h>
+#include <qmlexpression.h>
+#include <qtest.h>
+#include <QtDeclarative/qmlengine.h>
+#include <QtDeclarative/qmlcomponent.h>
+#include <private/qmlvaluetype_p.h>
+#include "../../../shared/util.h"
+
+class tst_QmlGraphicsPathView : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QmlGraphicsPathView();
+
+private slots:
+ void initValues();
+ void pathview2();
+ void pathview3();
+};
+
+
+tst_QmlGraphicsPathView::tst_QmlGraphicsPathView()
+{
+}
+
+void tst_QmlGraphicsPathView::initValues()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/pathview1.qml"));
+ QmlGraphicsPathView *obj = qobject_cast<QmlGraphicsPathView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->path() == 0);
+ QVERIFY(obj->delegate() == 0);
+ QCOMPARE(obj->model(), QVariant());
+ QCOMPARE(obj->currentIndex(), 0);
+ QCOMPARE(obj->offset(), 0.);
+ QCOMPARE(obj->snapPosition(), 0.);
+ QCOMPARE(obj->dragMargin(), 0.);
+ QCOMPARE(obj->count(), 0);
+ QCOMPARE(obj->pathItemCount(), -1);
+}
+
+void tst_QmlGraphicsPathView::pathview2()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/pathview2.qml"));
+ QmlGraphicsPathView *obj = qobject_cast<QmlGraphicsPathView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->path() != 0);
+ QVERIFY(obj->delegate() != 0);
+ QVERIFY(obj->model() != QVariant());
+ QCOMPARE(obj->currentIndex(), 0);
+ QCOMPARE(obj->offset(), 0.);
+ QCOMPARE(obj->snapPosition(), 0.);
+ QCOMPARE(obj->dragMargin(), 0.);
+ QCOMPARE(obj->count(), 8);
+ QCOMPARE(obj->pathItemCount(), 10);
+}
+
+void tst_QmlGraphicsPathView::pathview3()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/pathview3.qml"));
+ QmlGraphicsPathView *obj = qobject_cast<QmlGraphicsPathView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->path() != 0);
+ QVERIFY(obj->delegate() != 0);
+ QVERIFY(obj->model() != QVariant());
+ QCOMPARE(obj->currentIndex(), 0);
+ QCOMPARE(obj->offset(), 50.); // ???
+ QCOMPARE(obj->snapPosition(), 0.5); // ???
+ QCOMPARE(obj->dragMargin(), 24.);
+ QCOMPARE(obj->count(), 8);
+ QCOMPARE(obj->pathItemCount(), 4);
+}
+
+QTEST_MAIN(tst_QmlGraphicsPathView)
+
+#include "tst_qmlgraphicspathview.moc"
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index a8f6a02..f3c8fa5 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -1127,7 +1127,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
"signal",
"signals");
FastSection qmlattachedsignals(qmlClassNode,
- "QML Attached Signals",
+ "Attached Signals",
"signal",
"signals");
FastSection qmlmethods(qmlClassNode,
@@ -1135,7 +1135,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
"method",
"methods");
FastSection qmlattachedmethods(qmlClassNode,
- "QML Attached Methods",
+ "Attached Methods",
"method",
"methods");