aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-27 19:16:41 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-05-23 14:27:58 +0200
commit36dfaf4bb3b1029da1baf4181d077ab7661153ff (patch)
treebef7088b641df569cdf50563b1454da61baaf95d /doc/src
parent67eeff8459db037591b67e749da97b8fc0abc222 (diff)
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch). (cherry picked from commit 539311f7b2687e3148ea695ce06fee768abe7b44)
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/declarativeui.qdoc8
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc81
-rw-r--r--doc/src/declarative/qtbinding.qdoc4
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc2
-rw-r--r--doc/src/snippets/declarative/mousearea/mousearea-snippet.qml82
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h2
6 files changed, 136 insertions, 43 deletions
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 93571bd56f..8367c0f004 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -147,4 +147,12 @@ examples for porting}
\list
\o \l{Qt Quick Licensing Information}
\endlist
+
+\section1 Online Examples
+
+\list
+\o Forum Nokia:
+\l{http://wiki.forum.nokia.com/index.php/Qt_Quick_examples_for_porting}{Qt Quick
+examples for porting}
+\endlist
*/
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 23dd390000..30167d7327 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -422,3 +422,84 @@ a function in the model, e.g.:
updated, and that \e{value} holds the new value.
*/
+
+/*!
+\page qml-presenting-data.html
+\title Presenting Data with QML
+
+\section1 Introduction
+
+Qt Quick contains a set of standard items that can be used to present data in a
+number of different ways. For simple user interfaces,
+\l{Using QML Positioner and Repeater Items#Repeaters}{Repeaters} can be used
+in combination with
+\l{Using QML Positioner and Repeater Items#Positioners}{Positioners}
+to obtain pieces of data and arrange them in a user interface. However, when
+large quantities of data are involved, it is often better to use models with
+the standard views since these contain many built-in display and navigation
+features.
+
+\section1 Views
+
+Views are scrolling containers for collections of items. They are feature-rich,
+supporting many of the use cases found in typical applications, and can be
+customized to meet requirements on style and behavior.
+
+A set of standard views are provided in the basic set of Qt Quick
+graphical elements:
+
+\list
+\o \l{#ListView}{ListView} arranges items in a horizontal or vertical list
+\o \l{#GridView}{GridView} arranges items in a grid within the available space
+\o \l{#PathView}{PathView} arranges items on a path
+\endlist
+
+Unlike these items, \l WebView is not a fully-featured view item, and needs
+to be combined with a \l Flickable item to create a view that performs like
+a Web browser.
+
+\section2 ListView
+
+\l ListView shows a classic list of items with horizontal or vertical placing
+of items.
+
+\beginfloatright
+\inlineimage qml-listview-snippet.png
+\endfloat
+
+The following example shows a minimal ListView displaying a sequence of
+numbers (using an \l{QML Data Models#An Integer}{integer as a model}).
+A simple delegate is used to define an items for each piece of data in the
+model.
+
+\clearfloat
+\snippet doc/src/snippets/declarative/listview/listview-snippet.qml document
+
+
+
+\section2 GridView
+
+\l GridView displays items in a grid like an file manager's icon view.
+
+\section2 PathView
+
+\l PathView displays items on a path, where the selection remains in
+the same place and the items move around it.
+
+\section1 Decorating Views
+
+\section2 Headers and Footers
+
+\section2 Sections
+
+\section2 Navigation
+
+In traditional user interfaces, views can be scrolled using standard
+controls, such as scroll bars and arrow buttons. In some situations, it
+is also possible to drag the view directly by pressing and holding a
+mouse button while moving the cursor. In touch-based user interfaces,
+this dragging action is often complemented with a flicking action, where
+scrolling continues after the user has stopped touching the view.
+
+\section1 Further Reading
+*/
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 3659caa6e7..02d88ae360 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -465,6 +465,10 @@ below right calls this function, passing a QVariantList and a QVariantMap, which
converted to JavaScript array and object values, repectively:
\table
+\header
+\o Type
+\o String format
+\o Example
\row
\o \snippet doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml 0
\o \snippet doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp 0
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index 4a6f6a9e01..3930d3dab6 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -210,4 +210,4 @@
#include <QtDeclarative> to use this function.
Returns the QML type id.
- */
+*/
diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
index 03473bafda..1b9a9ec8bc 100644
--- a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
+++ b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
@@ -47,53 +47,53 @@ Rectangle {
width: 500; height: 500
color: "green"
-Column {
-//! [anchor fill]
-Rectangle {
- id: button
- width: 100; height: 100
+ Column {
+ //! [anchor fill]
+ Rectangle {
+ id: button
+ width: 100; height: 100
- MouseArea {
- anchors.fill: parent
- onClicked: console.log("button clicked")
- }
- MouseArea {
- width:150; height: 75
- onClicked: console.log("irregular area clicked")
- }
-}
-//! [anchor fill]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log("button clicked")
+ }
+ MouseArea {
+ width:150; height: 75
+ onClicked: console.log("irregular area clicked")
+ }
+ }
+ //! [anchor fill]
-Rectangle {
- id: button
- width: 100; height: 100
+ Rectangle {
+ id: button
+ width: 100; height: 100
-//! [enable handlers]
- MouseArea {
- hoverEnabled: true
- acceptedButtons: Qt.LeftButton | Qt.RightButton
- onEntered: console.log("mouse entered the area")
- onExited: console.log("mouse left the area")
- }
-//! [enable handlers]
-}
+ //! [enable handlers]
+ MouseArea {
+ hoverEnabled: true
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onEntered: console.log("mouse entered the area")
+ onExited: console.log("mouse left the area")
+ }
+ //! [enable handlers]
+ }
-Rectangle {
- id: button
- width: 100; height: 100
+ Rectangle {
+ id: button
+ width: 100; height: 100
-//! [mouse handlers]
- MouseArea {
- anchors.fill: parent
- onClicked: console.log("area clicked")
- onDoubleClicked: console.log("area double clicked")
- onEntered: console.log("mouse entered the area")
- onExited: console.log("mouse left the area")
- }
-//! [mouse handlers]
-}
+ //! [mouse handlers]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log("area clicked")
+ onDoubleClicked: console.log("area double clicked")
+ onEntered: console.log("mouse entered the area")
+ onExited: console.log("mouse left the area")
+ }
+ //! [mouse handlers]
+ }
-} //end of column
+ } //end of column
//! [parent end]
}
//! [parent end]
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h b/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h
index f317d4029c..763a451646 100644
--- a/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h
+++ b/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**