diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-31 10:19:05 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-31 10:20:34 +0200 |
commit | efac3cd245e2610924133e304d15bf726f5864f5 (patch) | |
tree | c872124a0ea7c40056b69babaf14478f0cb02ce4 /examples/enginio/quick/todos/doc/src/todos.qdoc | |
parent | 99c09ff33b7516a568455c6980f0f81c59a4fb3a (diff) | |
parent | 30ee95cd19f9a435ce337b4f651175ed2e8ba2e5 (diff) |
Merge remote-tracking branch 'origin/1.1' into '1.2'v1.2.0-beta1v1.2.0
Conflicts:
.qmake.conf
LICENSE.LGPLv21
LICENSE.LGPLv3
src/enginio_client/chunkdevice_p.h
src/enginio_client/enginio.h
src/enginio_client/enginiobackendconnection.cpp
src/enginio_client/enginiobackendconnection_p.h
src/enginio_client/enginiobasemodel.h
src/enginio_client/enginiobasemodel_p.h
src/enginio_client/enginioclient.cpp
src/enginio_client/enginioclient.h
src/enginio_client/enginioclient_global.h
src/enginio_client/enginioclient_p.h
src/enginio_client/enginioclientconnection.h
src/enginio_client/enginiodummyreply.cpp
src/enginio_client/enginiodummyreply_p.h
src/enginio_client/enginiofakereply.cpp
src/enginio_client/enginiofakereply_p.h
src/enginio_client/enginioidentity.cpp
src/enginio_client/enginioidentity.h
src/enginio_client/enginiomodel.cpp
src/enginio_client/enginiomodel.h
src/enginio_client/enginiooauth2authentication.h
src/enginio_client/enginioobjectadaptor_p.h
src/enginio_client/enginioreply.cpp
src/enginio_client/enginioreply.h
src/enginio_client/enginioreply_p.h
src/enginio_client/enginioreplystate.h
src/enginio_client/enginiostring.cpp
src/enginio_client/enginiostring_p.h
src/enginio_plugin/enginioplugin.cpp
src/enginio_plugin/enginioplugin_p.h
src/enginio_plugin/enginioqmlclient.cpp
src/enginio_plugin/enginioqmlclient_p.h
src/enginio_plugin/enginioqmlclient_p_p.h
src/enginio_plugin/enginioqmlmodel.cpp
src/enginio_plugin/enginioqmlmodel_p.h
src/enginio_plugin/enginioqmlobjectadaptor_p.h
src/enginio_plugin/enginioqmlreply.cpp
src/enginio_plugin/enginioqmlreply_p.h
tests/auto/common/common.cpp
tests/auto/common/common.h
tests/auto/enginioclient/tst_enginioclient.cpp
tests/auto/enginiomodel/tst_enginiomodel.cpp
tests/auto/files/tst_files.cpp
tests/auto/identity/common/identitycommon.h
tests/auto/identity/oauth2authentication/tst_oauth2authentication.cpp
tests/auto/notifications/tst_notifications.cpp
tests/auto/qmltests/tst_enginioclient.qml
tests/auto/qmltests/tst_enginioreply.qml
tests/auto/qmltests/tst_files.qml
tests/auto/qmltests/tst_identity.qml
tests/auto/qmltests/tst_model.qml
tests/auto/qmltests/tst_qmltest.cpp
tests/auto/qmltests/tst_query.qml
Change-Id: Icb6a167ba58b41e1a8e4d2c8f78213eae9472864
Diffstat (limited to 'examples/enginio/quick/todos/doc/src/todos.qdoc')
-rw-r--r-- | examples/enginio/quick/todos/doc/src/todos.qdoc | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/examples/enginio/quick/todos/doc/src/todos.qdoc b/examples/enginio/quick/todos/doc/src/todos.qdoc index 74052ce..ef33072 100644 --- a/examples/enginio/quick/todos/doc/src/todos.qdoc +++ b/examples/enginio/quick/todos/doc/src/todos.qdoc @@ -31,17 +31,21 @@ \ingroup enginio-qml-examples \inmodule enginio-qml - In this example a simple list of objects is displayed in a ListView. - Each item in the list is a "To Do" object which can be \e done or \e{not yet done}. - Todos can be added and removed (when hovering with the mouse). + In this example a simple list of objects is displayed in a + ListView. Each item in the list is a "To Do" object which can be + \e done or \e{not yet done}. Todos can be added and removed (when + hovering with the mouse). + \image todolist.png - In this simple schema the objects will only have two properties that are added - to the default properties (such as creation date, which always exists): - a string \c title and a bool \c completed. The object type will be created - when a call to create, or, in this case, a call to \l{Enginio::EnginioModel::append()}{EnginioModel::append()} is made. + In this simple schema, the objects will only have two properties + that are added to the default properties (such as creation date, + which always exists): a string \c title and a bool \c completed. + The object type will be created when a call to create, or, in this + case, a call to \l{EnginioModel::append()}{EnginioModel::append()} + is made. - A todo object will look like this (in JSON): + A todo object will look like this in \l {http://json.org} {JSON}: \code { "title": "Buy Milk", @@ -52,11 +56,12 @@ The example uses Qt Quick Controls, Layouts, and Enginio. \snippet todos/todo.qml imports - The first step is to create an \l{Enginio::EnginioModel} and - the Enginio instance with the backend configuration. - To get nice debug output in case something goes wrong, the onError signal in - Enginio is handled. Since the error is a JSON object, JSON.stringify is used - to format it to a string. + The first step is to create an \l{Enginio::EnginioModel} {Enginio model} and + its \l {EnginioClient} {Enginio client} with the backend configuration. + To get nice debug output in case something goes wrong, the client's + \l {EnginioClient::error} {onError} signal handler is implented. Since the + error is a \l {http://www.ecma-international.org/ecma-262/5.1/#sec-15.12} + {JSON object}, JSON.stringify is used to format it to a string. \snippet todos/todo.qml model @@ -64,15 +69,19 @@ properties of the Enginio objects are used. \snippet todos/todo.qml view - It is easy to add a new object to the model. By using the \l onAccepted - signal handler of a \l TextField, the data is appended to the model. After appending - the new Todo, the text gets cleared so that a new Todo can be entered. + It is easy to add a new Todo object to the model using a \l {TextInput}. + By implementing the \l {TextInput::accepted} {onAccepted} signal handler, + the Todo data is appended to the model. After appending the new Todo, the + \l {TextInput::text} {text property} is cleared so that the next Todo can + be entered. \snippet todos/todo.qml append - Inside the delegate, the data for the index is available by using the property names (\e title and \e completed). - The \e title property is directly assigned to the text displayed on each list item. The \e completed - boolean is used to display the item with a strikeout font and a light color. + Inside the delegate, the data for the index is available by using + the property names (\e title and \e completed). The \e title + property is directly assigned to the text displayed on each list + item. The \e completed boolean is used to display the item with a + strikeout font and a light color. \snippet todos/todo.qml delegate-properties |