diff options
28 files changed, 405 insertions, 181 deletions
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index 13202ee..c5333df 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -71,13 +71,15 @@ to explicitly set the \c target and \c property to animate. Animations can be joined into a group using SequentialAnimation and ParallelAnimation. +See the \l {declarative/animation/basics}{Animation basics example} for a demonstration of creating and combining multiple animations in QML. + \target state-transitions \section1 Transitions -QML transitions describe animations to perform when \l{qmlstates}{state} changes occur. A transition +\l Transition elements describe the animations to perform when \l{qmlstates}{state} changes occur. A transition can only be triggered by a state change. -For example, a transition could describe how an item moves from its initial position to its new position: +For example, a \l Transition could describe how an item moves from its initial position to its new position: \snippet doc/src/snippets/declarative/animation.qml transitions-1 @@ -108,9 +110,13 @@ making use of both sequential and parallel animations: \snippet doc/src/snippets/declarative/animation.qml transitions-3 + +See \l {declarative/animation/states}{States and Transitions example} for a simple example of how transitions can be applied. + + \section1 Property Behaviors -A \l{Behavior}{property behavior} specifies a default animation to run whenever the property's value changes, regardless +A property \l {Behavior}{behavior} specifies a default animation to run whenever the property's value changes, regardless of what caused the change. The \c enabled property can be used to force a \l Behavior to only apply under certain circumstances. @@ -119,7 +125,7 @@ whenever it changes. The animation will last 300 milliseconds and use an \l{Prop \snippet doc/src/snippets/declarative/animation.qml behavior -Like using an animation as a value source, when used in a Behavior and animation does not need to specify +Like using an animation as a value source, when used in a \l Behavior and animation does not need to specify a \c target or \c property. To trigger this behavior, we could enter a state that changes \c x: @@ -149,4 +155,6 @@ If \c x were bound to another property, triggering the binding would also trigge If a state change has a transition animation matching a property with a \l Behavior, the transition animation will override the \l Behavior for that state change. +The \l {declarative/animation/behaviors}{Behaviors example} shows how behaviors can be used to provide animations. + */ diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index f113147..4235c27 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -104,6 +104,7 @@ application or to build completely new applications. QML is fully \l \o \l {QML Security} \o \l {QtDeclarative Module} \o \l {Debugging QML} +\o \l {QML Viewer} \o \l {QML Performance} \o \l {QML Coding Conventions} \endlist diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index de65a12..a5e53a9 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -39,8 +39,12 @@ QML also supports the dynamic creation of objects from within JavaScript code. This is useful if the existing QML elements do not fit the needs of your application, and there are no C++ components involved. +See the {declarative/toys/dynamicscene}{Dynamic Scene example} for a demonstration +of the concepts discussed on this page. + \section1 Creating Objects Dynamically + There are two ways to create objects dynamically from JavaScript. You can either call \l {QML:Qt::createComponent()}{Qt.createComponent()} to create a component which instantiates items, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 699ebcb..cc546c0 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -266,6 +266,10 @@ When a QML item explicitly relinquishes focus (by setting its does not automatically select another element to receive focus. That is, it is possible for there to be no currently \e {active focus}. +See the {declarative/keyinteraction/focus}{Keyboard Focus example} for a +demonstration of moving keyboard focus between multiple areas using FocusScope +elements. + \section1 Advanced uses of Focus Scopes Focus scopes allow focus to allocation to be easily partitioned. Several diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index ecbaa9e..40fc3eb 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -114,6 +114,8 @@ browser. The following objects and properties are supported by the QML implemen \endtable +\sa {declarative/xml/xmlhttprequest}{XMLHttpRequest example} + \section1 Offline Storage API \section2 Database API @@ -132,6 +134,8 @@ The API can be used from JavaScript functions in your QML: The API conforms to the Synchronous API of the HTML5 Web Database API, \link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink. +\sa {declarative/sqllocalstorage}{SQL Local Storage example} + \section3 db = openDatabaseSync(identifier, version, description, estimated_size, callback(db)) Returns the database identified by \e identifier. If the database does not already exist, it diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc index c16dea3..40f7919 100644 --- a/doc/src/declarative/qdeclarativei18n.qdoc +++ b/doc/src/declarative/qdeclarativei18n.qdoc @@ -78,4 +78,7 @@ Finally, we can test the translation: \code qml -translation hello.qm hello.qml \endcode + + +You can see a complete example and source code in the {declarative/i18n}{QML Internationalization example}. */ diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index bb17896..7671eb3 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -279,6 +279,8 @@ ListView { \endcode \endtable +The complete example is available in \l {declarative/modelviews/stringlistmodel}. + \note There is no way for the view to know that the contents of a QStringList have changed. If the QStringList is changed, it will be necessary to reset the model by calling QDeclarativeContext::setContextProperty() again. @@ -329,6 +331,8 @@ ListView { } \endcode +The complete example is available in \l {declarative/modelviews/objectlistmodel}. + Note the use of the fully qualified access to the \c color property. The properties of the object are not replicated in the \c model object, since they are easily available via the modelData diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index ef5bf98..6461925 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -82,4 +82,7 @@ Other things you can do in a state change: \o Run some script with StateChangeScript \endlist + +The {declarative/animation/states}{States and Transitions example} demonstrates how to declare a basic set of states and then apply animated transitions between them. + */ diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index 15d8567..d44e774 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -26,172 +26,117 @@ ****************************************************************************/ /*! - \page qmlruntime.html - \title Qt Declarative UI Runtime - \keyword QML Viewer - \ingroup qttools - - This page documents the \e{Declarative UI Runtime} for the Qt GUI - toolkit, and the \QQV which can be used to run apps - written for the runtime. The \QQV reads a declarative - user interface definition (\c .qml) file and displays the user interface it describes. - - QML is a runtime, as you can run plain QML files which pull in their required modules. - To run apps with the QML runtime, you can either start the runtime - from your own application (using a QDeclarativeView) or with the simple \QQV. - The launcher can be installed in a production environment, assuming that it is not already - present in the system. It is generally packaged alongside Qt. - - To deploy an application using the QML runtime, you have two options: - - \list - \o Write your own Qt application including a QDeclarative view and deploy it the same as - any other Qt application (not discussed further on this page), or - \o Write a main QML file for your application, and run your application using the included \QQV. - \endlist - - To run an application with the \QQV, pass the filename as an argument: - - \code - qmlviewer myQmlFile.qml - \endcode - - Deploying a QML application via the \QQV allows for QML only deployments, but can also - include custom C++ modules just as easily. Below is an example of how you might structure - a complex application deployed via the QML runtime, it is a listing of the files that would - be included in the deployment package. - - \code - MyApp.qml - MyAppCore/qmldir - MyAppCore/libMyAppCore.so - MyAppCore/MyAppCore.dll - MyAppCore/AnAppElement.qml - MyAppCore/AnotherElement.qml - MyAppCore/images/Logo.png - OtherModule/qmldir - OtherModule/OtherElement.qml - \endcode - - Note that this example is for deploying the example to both windows and linux. You will still need to compile the C++ - modules for each target platform, but you can deploy multiple versions of the modules across platforms with different naming conventions, - as the appropriate module file is chosen based on platform naming conventions. The C++ - modules must contain a QDeclarativeExtentionPlugin subclass. - - The application would be executed either with your own application, the command 'qmlviewer MyApp.qml' or by - opening the file if your system has the \QQV registered as the handler for QML files. The MyApp.qml file would have access - to all of the deployed types using the import statements such as the following: - - \code - import "MyAppCore" - import "OtherModule" 1.0 as Other - \endcode - - \section1 Qt QML Viewer functionality - The \QQV implements some additional functionality to help it supporting - myriad applications. If you implement your own application, you may also wish to reimplement - some or all of this functionality. However, much of this functionality is intended to aid the prototyping of - QML applications and may not be necessary for a deployed application. - - \section2 Options - - When run with the \c -help option, \c qmlviewer shows available options. - - \section2 Translations - - When the launcher loads an initial QML file, it will install a translation file from - a "i18n" subdirectory relative to that initial QML file. The actual translation file - loaded will be according to the system locale and have the form - "qml_<language>.qm", where <language> is a two-letter ISO 639 language, - such as "qml_fr.qm", optionally followed by an underscore and an uppercase two-letter ISO 3166 country - code, such as "qml_fr_FR.qm" or "qml_fr_CA.qm". - - Such files can be created using \l{Qt Linguist}. - - See the \l{scripting.html#internationalization}{Qt Internationalization} documentation for information about how to make - the JavaScript in QML files use translatable strings. - - Additionally, the launcher will load translation files specified on the - command line via the \c -translation option. - - \section2 Dummy Data - - The secondary use of the launcher is to allow QML files to be viewed with - dummy data. This is useful when prototyping the UI, as the dummy data can - be later replaced with actual data and bindings from a C++ plugin. - To provide dummy data: create a directory called "dummydata" in the same directory as - the target QML file and create files there with the "qml" extension. - All such files will be loaded as QML objects and bound to the root - context as a property with the name of the file (without ".qml"). - - To replace this with real data, you simply bind the real object to - the root context in C++. - - For example, if the Qt application has a "clock.time" property - that is a qreal from 0 to 86400 representing the number of seconds since - midnight, dummy data for this could be provided by \c dummydata/clock.qml: - \code - QtObject { property real time: 12345 } - \endcode - Any QML can be used in the dummy data files. You could even animate the - fictional data! - - \section2 Runtime Object - - All applications using the launcher will have access to the \c runtime - property on the root context. This property contains several pieces of - information about the runtime environment of the application. - - \section3 Screen Orientation - - A special piece of dummy data which is integrated into the launcher is - a simple orientation property. The orientation can be set via the - settings menu in the application, or by pressing Ctrl+T to rotate it. - - To use this from within your QML file, access \c runtime.orientation, - which can be one of the following values: - - \list - \o \c Orientation.Portrait - \o \c Orientation.Landscape - \o \c Orientation.PortraitInverted (Portrait orientation, upside-down) - \o \c Orientation.LandscapeInverted (Landscape orientation, upside-down) - \endlist - - These values can be bound to in your application. For example: - - \code - Item { - state: (runtime.orientation == Orientation.Landscape) ? 'landscape' : '' +\page qmlruntime.html +\title Qt Declarative UI Runtime + +QML documents are loaded and executed by the QML runtime. This includes the +Declarative UI engine along with the built-in QML elements and plugin modules, +and it also provides access to third-party QML elements and modules. + +Applications that use QML need to invoke the QML runtime in order to +execute QML documents. This can be done by creating a QDeclarativeView +or a QDeclarativeEngine, as described below. In addition, the Declarative UI +package includes the \QQV tool, which loads \c .qml files. This tool is +useful for developing and testing QML code without the need to write +a C++ application to load the QML runtime. + + + +\section1 Deploying QML-based applications + +To deploy an application that uses QML, the QML runtime must be invoked by +the application. This is done by writing a Qt C++ application that loads the +QDeclarativeEngine by either: + +\list +\o Loading the QML file through a QDeclarativeView instance, or +\o Creating a QDeclarativeEngine instance and loading QML files with QDeclarativeComponent +\endlist + + +\section2 Deploying with QDeclarativeView + +QDeclarativeView is a QWidget-based class that is able to load QML files. +For example, if there is a QML file, \c application.qml, like this: + +\qml + import Qt 4.7 + + Rectangle { width: 100; height: 100; color: "red" } +\endqml + +It can be loaded in a Qt application's \c main.cpp file like this: + +\code + #include <QApplication> + #include <QDeclarativeView> + + int main(int argc, char *argv[]) + { + QApplication app(argc, argv); + + QDeclarativeView view; + view.setSource(QUrl::fromLocalFile("application.qml")); + view.show(); + + return app.exec(); } - \endcode - - This allows your application to respond to changes in the screen's orientation. The launcher - will automatically update this on some platforms (currently the N900 only) to match the physical - screen's orientation. On other plaforms orientation changes will only happen when explictly asked for. - - \section3 Window Active - - The \c runtime.isActiveWindow property tells whether the main window of the launcher is currently active - or not. This is especially useful for embedded devices when you want to pause parts of your application, - including animations, when your application loses focus or goes to the background. - - The example below, stops the animation when the application's window is deactivated and resumes on activation: - - \code - Item { - width: 300; height: 200 - Rectangle { - width: 100; height: 100 - color: "green" - SequentialAnimation on x { - running: runtime.isActiveWindow - loops: Animation.Infinite - NumberAnimation {to: 200} - NumberAnimation {to: 0} - } - } +\endcode + +This creates a QWidget-based view that displays the contents of +\c application.qml. + +The application's \c .pro \l{qmake Project Files}{project file} must specify +the \c declarative module for the \c QT variable. For example: + +\code + TEMPLATE += app + QT += gui declarative + SOURCES += main.cpp +\endcode + + +\section2 Creating a QDeclarativeEngine directly + +If \c application.qml does not have any graphical components, or if it is +preferred to avoid QDeclarativeView for other reasons, the QDeclarativeEngine +can be constructed directly instead. In this case, \c application.qml is +loaded as a QDeclarativeComponent instance rather than placed into a view: + +\code + #include <QCoreApplication> + #include <QDeclarativeEngine> + + int main(int argc, char *argv[]) + { + QCoreApplication app(argc, argv); + + QDeclarativeEngine engine; + QDeclarativeContext *windowContext = new QDeclarativeContext(engine.rootContext()); + + QDeclarativeComponent component(&engine, "application.qml"); + QObject *window = component.create(windowContext); + + // ... delete window and windowContext when necessary + + return app.exec(); } - \endcode +\endcode + +See \l {Using QML in C++ Applications} for more information about using +QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well +as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}. + + + +\section1 Developing and prototyping with QML Viewer + +The Declarative UI package includes a QML runtime tool, the \QQV, which loads +and displays QML documents. This is useful during the application development +phase for prototyping QML-based applications without writing your own C++ +applications to invoke the QML runtime. + +See the \l{QML Viewer} documentation for more details. */ + diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc new file mode 100644 index 0000000..efff9cc --- /dev/null +++ b/doc/src/declarative/qmlviewer.qdoc @@ -0,0 +1,234 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in a +** written agreement between you and Nokia. +** +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of this +** file. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + +\page qmlviewer.html +\title QML Viewer +\ingroup qttools + +The Declarative UI package includes \QQV, a tool for loading QML documents that +makes it easy to quickly develop and debug QML applications. It invokes the QML +runtime to load QML documents and also includes additional features useful for +the development of QML-based applications. + +The QML Viewer is a tool for testing and developing QML applications. It is +\e not intended for use in a production environment and should not be used for the +deployment of QML applications. In those cases, the QML runtime should be invoked +from a Qt application instead; see \l {Qt Declarative UI Runtime} for more +information. + +The viewer is located at QTDIR/bin/qmlviewer. To load a \c .qml file +with the viewer, run the viewer and select the file to be opened, or provide the +file path on the command line: + +\code + qmlviewer myqmlfile.qml +\endcode + +On Mac OS X, the QML Viewer application is named \c QMLViewer.app instead. You +can launch the viewer by opening the QMLViewer application from the Finder, or +from the command line: + +\code + QMLViewer.app/Contents/MacOS/QMLViewer myqmlfile.qml +\endcode + +The QML Viewer has a number of configuration options involving features such as +fullscreen display, module import path configurations, video recording of QML +animations, and OpenGL support. + +To see the configuration options, run \c qmlviewer with the \c -help argument. + + +\section1 Adding module import paths + +Additional module import paths can be provided using the \c -I flag. +For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates +a C++ plugin identified as \c com.nokia.TimeExample. Since this has a namespaced +identifier, the viewer has to be run with the \c -I flag from the example's +base directory: + +\code +qmlviewer -I . plugins.qml +\endcode + +This adds the current directory to the import path so that the viewer will +find the plugin in the \c com/nokia/TimeExample directory. + +Note by default, the current directory is included in the import search path, +but namespaced modules like \c com.nokia.TimeExample are not found unless +the path is explicitly added. + + +\section1 Loading translation files + +When the QML Viewer loads a QML file, it installs a translation file from a +"i18n" subdirectory relative to that initial file. This directory should contain +translation files named "qml_<language>.qm", where <language> is a two-letter +ISO 639 language, such as "qml_fr.qm", optionally followed by an underscore and +an uppercase two-letter ISO 3166 country code, such as "qml_fr_FR.qm" or +"qml_fr_CA.qm". + +Such files can be created using \l {Qt Linguist}. + +The actual translation file that is loaded depends on the system locale. +Additionally, the viewer will load any translation files specified on the command +line via the \c -translation option. + +See the \l{declarative/i18n}{QML i18n example} for an example. Also, the +\l{scripting.html#internationalization}{Qt Internationalization} documentation +shows how JavaScript code in QML files can be made to use translatable strings. + + +\section1 Loading placeholder data with QML Viewer + +Often, QML applications are prototyped with fake data that is later replaced +by real data sources from C++ plugins. QML Viewer assists in this aspect by +loading fake data into the application context: it looks for a directory named +"dummydata" in the same directory as the target QML file, and any \c .qml +files in that directory are loaded as QML objects and bound to the root context +as properties named after the files. + +For example, this QML document refers to a \c lottoNumbers property which does +not actually exist within the document: + +\qml +import Qt 4.7 + +ListView { + width: 200; height: 300 + model: lottoNumbers + delegate: Text { text: number } +} +\endqml + +If within the document's directory, there is a "dummydata" directory which +contains a \c lottoNumbers.qml file like this: + +\qml +import Qt 4.7 + +ListModel { + ListElement { number: 23 } + ListElement { number: 44 } + ListElement { number: 78 } +} +\endqml + +Then this model would be automatically loaded into the ListView in the previous document. + +Child properties are included when loaded from dummy data. The following document +refers to a \c clock.time property: + +\qml +import Qt 4.7 +Text { text: clock.time } +\endqml + +The text value could be filled by a \c dummydata/clock.qml file with a \c time +property in the root context: + +\qml +import Qt 4.7 +QtObject { property int time: 54321 } +\endqml + +To replace this with real data, you can simply bind the real data object to +the root context in C++ using QDeclarativeContext::setContextProperty(). This +is detailed in \l {Using QML in C++ Applications}. + +\section1 Using the \c runtime object + +QML applications that are loaded with the QML Viewer have access to a special +\c runtime property on the root context. This property provides additional +information about the application's runtime environment through the following properties: + +\table +\row + +\o \c runtime.isActiveWindow + +\o This property indicates whether the QML Viewer window is the current active +window on the system. It is useful for "pausing" an application, particularly +animations, when the QML Viewer loses focus or moves to the background. + +For example, the following animation is only played when the QML Viewer is +the active window: + +\qml +Rectangle { + width: 200; height: 200 + + ColorAnimation on color { + running: runtime.isActiveWindow + loops: Animation.Infinite + from: "green"; to: "blue"; duration: 2000 + } +} +\endqml + +\row + +\o \c runtime.orientation + +\o This property indicates the current orientation of the QML Viewer. On the +N900 platform, this property automatically updates to reflect the device's +actual orientation; on other platforms, this indicates the orientation currently +selected in the QML Viewer's \e {Settings -> Properties} menu. The +\c orientation value can be one of the following: + +\list +\o \c Orientation.Portrait +\o \c Orientation.Landscape +\o \c Orientation.PortraitInverted (Portrait orientation, upside-down) +\o \c Orientation.LandscapeInverted (Landscape orientation, upside-down) +\endlist + +When the viewer's orientation changes, the appearance of the loaded QML document +does not change unless it has been set to respond to changes in +\c runtime.orientation. For example, the following Rectangle changes its +aspect ratio depending on the orientation of the QML Viewer: + +\qml +Rectangle { + id: window + width: 640; height: 480 + + states: State { + name: "landscape" + PropertyChanges { target: window; width: 480; height: 640 } + } + state: (runtime.orientation == Orientation.Landscape + || runtime.orientation == Orientation.LandscapeInverted) ? 'landscape' : '' +} +\endqml + +\endtable + +*/ + diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 252c11e..c884486 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -222,5 +222,5 @@ This is equivalent to writing the two transitions separately. The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time. We could also run them one after the other by using \l SequentialAnimation instead. -For more details on states and transitions, see \l {QML States}. +For more details on states and transitions, see \l {QML States} and the {declarative/animation/states}{states and transitions example}. */ diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp index 4bd2a86..e8e6fa2 100644 --- a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp +++ b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp @@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE Focus scopes assist in keyboard focus handling when building reusable QML components. All the details are covered in the \l {qmlfocus}{keyboard focus documentation}. + + \sa {declarative/keyinteraction/focus}{Keyboard focus example} */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index dda1efb..cb99129 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1099,6 +1099,8 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m is not clipped by another item or the screen, it will be necessary to set \e {clip: true} in order to have the out of view items clipped nicely. + + \sa {declarative/modelviews/gridview}{GridView example} */ QDeclarativeGridView::QDeclarativeGridView(QDeclarativeItem *parent) : QDeclarativeFlickable(*(new QDeclarativeGridViewPrivate), parent) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 336010f..9a17d78 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -149,7 +149,7 @@ QT_BEGIN_NAMESPACE } \endqml - \sa Rotate, Translate + \sa Rotation, Translate */ /*! @@ -196,6 +196,8 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/declarative/rotation.qml 0 \image axisrotation.png + + \sa {declarative/ui-components/dialcontrol}{Dial Control example}, {declarative/toys/clocks}{Clocks example} */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 0bed41b..caf251d 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -192,7 +192,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() MouseArea is an invisible item: it is never painted. - \sa MouseEvent + \sa MouseEvent, {declarative/touchinteraction/mousearea}{MouseArea example} */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index e97d362..0bd9a53 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -136,6 +136,8 @@ QSet<QUrl> QTextDocumentWithImageResources::errors; HTML img tags that load remote images, the text is reloaded. Text provides read-only text. For editable text, see \l TextEdit. + + \sa {declarative/text/fonts}{Fonts example} */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 8098aba..c6566ff 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -99,7 +99,7 @@ TextEdit { You can translate between cursor positions (characters from the start of the document) and pixel points using positionAt() and positionToRectangle(). - \sa Text, TextInput + \sa Text, TextInput, {declarative/text/textselection}{Text Selection example} */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 8d68129..ed999a2 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE On Mac OS X, the Up/Down key bindings for Home/End are explicitly disabled. If you want such bindings (on any platform), you will need to construct them in QML. - \sa TextEdit, Text + \sa TextEdit, Text, {declarative/text/textselection}{Text Selection example} */ QDeclarativeTextInput::QDeclarativeTextInput(QDeclarativeItem* parent) : QDeclarativePaintedItem(*(new QDeclarativeTextInputPrivate), parent) diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp index 4be3472..f4a8588 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.cpp +++ b/src/declarative/qml/qdeclarativeimageprovider.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \note the request() method may be called by multiple threads, so ensure the implementation of this method is reentrant. - \sa QDeclarativeEngine::addImageProvider() + \sa QDeclarativeEngine::addImageProvider(), {declarative/cppextensions/imageprovider}{ImageProvider example} */ /*! diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/declarative/qml/qdeclarativelist.cpp index 31ef4c2..7c89672 100644 --- a/src/declarative/qml/qdeclarativelist.cpp +++ b/src/declarative/qml/qdeclarativelist.cpp @@ -341,6 +341,8 @@ QML list properties are typesafe - in this case \c {Fruit} is a QObject type tha \note QDeclarativeListProperty can only be used for lists of QObject-derived object pointers. +\sa {Object and List Property Types} + */ /*! diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp index 399831d..d22798d 100644 --- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp +++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE Note: the create() method may be called by multiple threads, so ensure the implementation of this method is reentrant. - \sa QDeclarativeEngine::setNetworkAccessManagerFactory() + \sa QDeclarativeEngine::setNetworkAccessManagerFactory(), {declarative/cppextensions/networkaccessmanagerfactory}{NetworkAccessManagerFactory example} */ /*! diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp index 90e0ca3..047993e 100644 --- a/src/declarative/util/qdeclarativebehavior.cpp +++ b/src/declarative/util/qdeclarativebehavior.cpp @@ -94,7 +94,7 @@ public: Currently only a single Behavior may be specified for a property; this Behavior can be enabled and disabled via the \l{enabled} property. - \sa QtDeclarative + \sa {declarative/animation/behaviors}{Behavior example}, QtDeclarative */ diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 8e3ec82..12c6353 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -145,7 +145,7 @@ QT_BEGIN_NAMESPACE an Item's parent should be done using the associated change elements (ParentChange and AnchorChanges, respectively). - \sa {qmlstate}{States}, QtDeclarative + \sa {declarative/animation/states}{states example}, {qmlstate}{States}, QtDeclarative */ /*! diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp index 9e18eb5..576995f 100644 --- a/src/declarative/util/qdeclarativetimer.cpp +++ b/src/declarative/util/qdeclarativetimer.cpp @@ -103,6 +103,8 @@ public: 1000ms has its \e repeat property changed 500ms after starting, the elapsed time will be reset to 0, and the Timer will be triggered 1000ms later. + + \sa {declarative/toys/clocks}{Clocks example} */ QDeclarativeTimer::QDeclarativeTimer(QObject *parent) diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp index ab8b116..38ed97e 100644 --- a/src/declarative/util/qdeclarativetransition.cpp +++ b/src/declarative/util/qdeclarativetransition.cpp @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE \since 4.7 \brief The Transition element defines animated transitions that occur on state changes. - \sa {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative} + \sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative} */ /*! diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index bfd25be..0692aaa 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -588,6 +588,8 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla If multiple key roles are specified, the model only adds and reload items with a combined value of all key roles that is not already present in the model. + + \sa {declarative/rssnews}{RSS News demo} */ QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent) diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp index 22be2f1..e5647bd 100644 --- a/src/imports/gestures/qdeclarativegesturearea.cpp +++ b/src/imports/gestures/qdeclarativegesturearea.cpp @@ -130,7 +130,7 @@ public: GestureArea is an invisible item: it is never painted. - \sa Gesture, MouseArea + \sa Gesture, MouseArea, {declarative/touchinteraction/gestures}{Gestures example} */ /*! diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index a75023b..900a464 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -119,7 +119,7 @@ void usage() qWarning(" -fullscreen............................... run fullscreen"); qWarning(" -stayontop................................ keep viewer window on top"); qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content"); - qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view"); + qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view (default)"); qWarning(" -qmlbrowser .............................. use a QML-based file browser"); qWarning(" -warnings [show|hide]..................... show warnings in a separate log window"); qWarning(" -recordfile <output> ..................... set video recording file"); |