diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-02-03 13:06:14 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-02-03 18:15:46 (GMT) |
commit | 37ca31b22426ac746641b9ff22d9df4ff71850c1 (patch) | |
tree | b6cf25a3ff7e4e16d48c89a77d4e594b05bd2a5f /doc/src | |
parent | ea3cc91feedc14f4f967768c3e337d69423856ea (diff) | |
download | Qt-37ca31b22426ac746641b9ff22d9df4ff71850c1.zip Qt-37ca31b22426ac746641b9ff22d9df4ff71850c1.tar.gz Qt-37ca31b22426ac746641b9ff22d9df4ff71850c1.tar.bz2 |
Augment documentation
Document automatic signal handlers and QmlViewer.Screen.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/declarative/extending.qdoc | 11 | ||||
-rw-r--r-- | doc/src/declarative/qmlviewer.qdoc | 21 |
2 files changed, 32 insertions, 0 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 42b054f..3b9c7f3 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -825,6 +825,17 @@ Here are three examples of signal declarations: } \endcode +Adding a signal to an item automatically adds a signal handler to it. +The signal hander is named on<Signal name>, with the first letter of the +signal name being upper cased. The above example item would now have the +following signal handlers: + +\list + \o onClicked + \o onHovered + \o onPerformAction +\endlist + \section1 Adding new methods New methods can be added to an existing type. These new methods are available diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc index df96535..6a107ce 100644 --- a/doc/src/declarative/qmlviewer.qdoc +++ b/doc/src/declarative/qmlviewer.qdoc @@ -75,4 +75,25 @@ \endcode Any QML can be used in the dummy data files. You could even animate the fictional data! + + \section1 Screen Orientation + + A special piece of dummy data which is integrated into the viewer is + a simple orientation property. The orientation can be set via the + settings menu in the application, or by pressing Ctrl+T to toggle it. + + To use this from within your QML file, import QmlViewer 1.0 and create a + Screen object. This object has a property, orientation, which can be either + Screen.Lanscape or Screen.Portrait and which can be bound to in your + application. An example is below: + +\code + import QmlViewer 1.0 as QmlViewer + + Item { + QmlViewer.Screen { id: qmlviewerScreen } + state: (qmlviewerScreen.orientation == QmlViewer.Screen.Landscape) ? 'landscape' : '' + } +\endcode + */ |