diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-07-19 01:32:27 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-07-19 01:32:27 (GMT) |
commit | e2cb220eb67455f1041cf8ac863a5da4421ab424 (patch) | |
tree | 830302d9d445e2c071afe59ff7bef0f0664440f5 /doc | |
parent | 5572ec653fe735c4f413195c1ef34382aa8c6105 (diff) | |
parent | 53d3083eecf88a20bc36ada43942c7a18677af62 (diff) | |
download | Qt-e2cb220eb67455f1041cf8ac863a5da4421ab424.zip Qt-e2cb220eb67455f1041cf8ac863a5da4421ab424.tar.gz Qt-e2cb220eb67455f1041cf8ac863a5da4421ab424.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'doc')
54 files changed, 2644 insertions, 1139 deletions
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc index 641b936..6fe0223 100644 --- a/doc/src/classes/phonon-api.qdoc +++ b/doc/src/classes/phonon-api.qdoc @@ -1577,7 +1577,6 @@ \since 4.4 \brief The MediaObject class provides an interface for media playback. - The media object manages a \l{Phonon::}{MediaSource}, which supplies the media object with multimedia content, e.g., from a file. A playback in Phonon is always started by calling the @@ -1651,17 +1650,8 @@ playback of the current source, but it is possible to try with a different one. A user readable error message is given by errorString(). - \section1 Symbian Platform Security Requirements - - On Symbian, processes which access media via the network must - have the \c NetworkServices platform security capability. If the client - process lacks this capability, operations will result in errors. - This failure is indicated by a state() of Phonon::ErrorState. - - Platform security capabilities are added via the - \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} - qmake variable. + \sa {Symbian Platform Security Requirements} \sa Phonon::MediaSource, Phonon::AudioOutput, VideoWidget, {Music Player Example}, {Phonon Overview}, Phonon::VideoPlayer, Phonon::createPlayer(), {Phonon Module} diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index afedb44..1341bbb 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -164,14 +164,22 @@ The \c createBlock() function creates a block from the \c Block.qml file and moves the new block to its position on the game canvas. This involves several steps: \list -\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to generate an element from \c Block.qml. - If the component is ready, we can call \c createObject() to create an instance of the \c Block item. -\o If \c createObject() returned null (i.e. if there was an error while - loading the object), print the error information. -\o Place the block in its position on the board and set its width and height. - Also, store it in the blocks array for future reference. -\o Finally, print error information to the console if the component could not be - loaded for some reason (for example, if the file is missing). + +\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to + generate an element from \c Block.qml. If the component is ready, + we can call \c createObject() to create an instance of the \c Block + item. + +\o If \c createObject() returned null (i.e. if there was an error + while loading the object), print the error information. + +\o Place the block in its position on the board and set its width and + height. Also, store it in the blocks array for future reference. + +\o Finally, print error information to the console if the component + could not be loaded for some reason (for example, if the file is + missing). + \endlist diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 0edd242..c2930b3 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -113,7 +113,7 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt \row \o \l {Connections} \o Explicitly connects signals and signal handlers \row \o \l {Component} \o Encapsulate QML items as a component \row \o \l {Timer} \o Provides timed triggers -\row \o \l {QtObject} \o Basic element containing only the objectName property +\row \o \l {QML:QtObject} {QtObject} \o Basic element containing only the objectName property \row \o \l {WorkerScript} \o Enables the use of threads in QML \row \o \l {Loader} \o Controls the loading of items or components \row \o \l {Repeater} \o Uses a model to create multiples of components diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index 9126a79..3f1b184 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -314,7 +314,7 @@ Item { \section2 Signal Handlers -Signal handlers allow actions to be taken in reponse to an event. For instance, +Signal handlers allow actions to be taken in response to an event. For instance, the \l MouseArea element has signal handlers to handle mouse press, release and click: diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index b44e6f2..173002a 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -208,7 +208,10 @@ Models can be defined in C++ and then made available to QML. This is useful for exposing existing C++ data models or otherwise complex datasets to QML. A C++ model class can be defined as a QStringList, a QList<QObject*> or a -QAbstractItemModel. +QAbstractItemModel. The first two are useful for exposing simpler datasets, +while QAbstractItemModel provides a more flexible solution for more complex +models. + \section2 QStringList @@ -268,7 +271,10 @@ the model by calling QDeclarativeContext::setContextProperty() again. \section2 QAbstractItemModel -A model can be defined by subclassing QAbstractItemModel. +A model can be defined by subclassing QAbstractItemModel. This is the +best approach if you have a more complex model that cannot be supported +by the other approaches. A QAbstractItemModel can also automatically +notify a QML view when the model data has changed. The roles of a QAbstractItemModel subclass can be exposed to QML by calling QAbstractItemModel::setRoleNames(). The default role names set by Qt are: @@ -305,6 +311,12 @@ roles: \snippet examples/declarative/modelviews/abstractitemmodel/view.qml 0 +QML views are automatically updated when the model changes. Remember the model +must follow the standard rules for model changes and notify the view when +the model has changed by using QAbstractItemModel::dataChanged(), +QAbstractItemModel::beginInsertRows(), etc. See the \l {Model subclassing reference} for +more information. + The complete example is available in Qt's \l {declarative/modelviews/abstractitemmodel}{examples/declarative/modelviews/abstractitemmodel} directory. QAbstractItemModel presents a hierarchy of tables, but the views currently provided by QML @@ -429,4 +441,77 @@ Rectangle { } \endcode +\section1 Accessing Views and Models from Delegates + +You can access the view for which a delegate is used, and its +properties, by using ListView.view in a delegate on a ListView, or +GridView.view in a delegate on a GridView, etc. In particular, you can +access the model and its properties by using ListView.view.model. + +This is useful when you want to use the same delegate for a number of +views, for example, but you want decorations or other features to be +different for each view, and you would like these different settings to +be properties of each of the views. Similarly, it might be of interest +to access or show some properties of the model. + +In the following example, the delegate shows the property \e{language} +of the model, and the color of one of the fields depends on the +property \e{fruit_color} of the view. + +\code +Rectangle { + width: 200; height: 200 + + ListModel { + id: fruitModel + property string language: "en" + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } + } + + Component { + id: fruitDelegate + Row { + Text { text: " Fruit: " + name; color: ListView.view.fruit_color } + Text { text: " Cost: $" + cost } + Text { text: " Language: " + ListView.view.model.language } + } + } + + ListView { + property color fruit_color: "green" + model: fruitModel + delegate: fruitDelegate + anchors.fill: parent + } +} +\endcode + +Another important case is when some action (e.g. mouse click) in the +delegate should update data in the model. In this case you can define +a function in the model, e.g.: + +\code + setData(int row, const QString & field_name, QVariant new_value), +\endcode + +...and call it from the delegate using: + +\code + ListView.view.model.setData(index, field, value) +\endcode + +...assuming that \e{field} holds the name of the field which should be +updated, and that \e{value} holds the new value. + */ diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc index 733f52d..4d7b3e0 100644 --- a/doc/src/examples/movie.qdoc +++ b/doc/src/examples/movie.qdoc @@ -30,8 +30,8 @@ \title Movie Example The Movie example demonstrates how to use QMovie and QLabel to - display animations. Now that Qt comes with \l{Phonon - Overview}{Phonon} (the multimedia framework), QMovie is mostly + display animations. Now that Qt comes with the \l{Phonon multimedia + framework} {Phonon multimedia framework}, QMovie is mostly useful if one wants to play a simple animation without the added complexity of a multimedia framework to install and deploy. diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc index fe69d52..bc06178 100644 --- a/doc/src/examples/trafficinfo.qdoc +++ b/doc/src/examples/trafficinfo.qdoc @@ -145,5 +145,5 @@ The rest of the code in this example is just for representing the time and station information to the user, and uses techniques described in the - \l{Widgets Examples}. + \l{Widget Examples}. */ diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc index 4a1b631..c5dd27c 100644 --- a/doc/src/frameworks-technologies/dnd.qdoc +++ b/doc/src/frameworks-technologies/dnd.qdoc @@ -45,7 +45,7 @@ outlines the approach used to enable it in custom widgets. Drag and drop operations are also supported by Qt's item views and by the graphics view framework. More information is available in - \l{Using Drag and Drop with Item Views} and \l{Graphics View + \l{Using drag & drop with item views} and \l{Graphics View Framework}. \section1 Drag and Drop Classes diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc index 94b9f0d..131f063 100644 --- a/doc/src/frameworks-technologies/model-view-programming.qdoc +++ b/doc/src/frameworks-technologies/model-view-programming.qdoc @@ -900,7 +900,7 @@ after its application through the use of certain types of selection commands. These are discussed later in this section. - \section3 Current item & selected items + \section3 Current item and selected items In a view, there is always a current item and a selected item - two independent states. An item can be the current item and selected at the @@ -1257,7 +1257,7 @@ reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()} function. - \section3 Model headers & data + \section3 Model headers and data For items in the view, we want to return the strings in the string list. The \l{QAbstractItemModel::data()}{data()} function is responsible for @@ -1350,7 +1350,7 @@ \snippet doc/src/snippets/stringlistmodel/model.cpp 1 - \section3 Inserting & removing rows + \section3 Inserting and removing rows It is possible to change the number of rows and columns in a model. In the string list model it only makes sense to change the number of rows, so we @@ -1634,7 +1634,7 @@ contain the text given in the search string. This pattern can also be used in the list and table widgets. - \section1 Using drag & drop with item views + \section1 Using drag & drop with item views Qt's drag and drop infrastructure is fully supported by the model/view framework. Items in lists, tables, and trees can be dragged within the views, and data can be @@ -1714,7 +1714,7 @@ of QAbstractItemModel::removeRows(), either directly or by inheriting the implementation from its base class. - \section3 Enabling drag & drop for items + \section3 Enabling drag & drop for items Models indicate to views which items can be dragged, and which will accept drops, by reimplementing the QAbstractItemModel::flags() function to provide suitable @@ -2124,12 +2124,12 @@ children may be displayed incorrectly in some views until the user attempts to view the non-existent child items. - \section2 Navigation & model index creation + \section2 Navigation and model index creation Hierarchical models need to provide functions that views can call to navigate the tree-like structures they expose, and obtain model indexes for items. - \section3 Parents & children + \section3 Parents and children Since the structure exposed to views is determined by the underlying data structure, it is up to each model subclass to create its own model indexes @@ -2153,7 +2153,7 @@ models to supply some unique identifier to this function to ensure that the model index can be re-associated with its corresponding item later on. - \section2 Drag & drop support and MIME type handling + \section2 Drag & drop support and MIME type handling The model/view classes support drag and drop operations, providing default behavior that is sufficient for many applications. However, it is also possible to customize @@ -2282,7 +2282,7 @@ \endlist For more information about drag and drop with item views, refer to - \l{Using Drag and Drop with Item Views}. + \l{Using drag & drop with item views}. \section3 Convenience views @@ -2293,7 +2293,7 @@ the existing contents with the data being transferred, the underlying model will set the data of the target items rather than insert new rows and columns into the model. For more information on drag and drop in convenience views, - you can see \l{Using Drag and Drop with Item Views}. + you can see \l{Using drag & drop with item views}. \section2 Performance optimization for large amounts of data diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc index 023b4ce..5119638 100644 --- a/doc/src/frameworks-technologies/phonon.qdoc +++ b/doc/src/frameworks-technologies/phonon.qdoc @@ -34,6 +34,7 @@ \tableofcontents + \target Phonon Overview \section1 Introduction Qt uses the Phonon multimedia framework to provide functionality diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index b6766d5..a32d120 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -343,8 +343,8 @@ /*! \page examples-draganddrop.html \ingroup all-examples - \title Drag & Drop Examples - \brief How to access your platform's native darg & drop functionality + \title Drag & Drop Examples + \brief How to access your platform's native darg & drop functionality \image draganddrop-examples.png diff --git a/doc/src/getting-started/tutorials.qdoc b/doc/src/getting-started/tutorials.qdoc index 6e1cee8..0a83170 100644 --- a/doc/src/getting-started/tutorials.qdoc +++ b/doc/src/getting-started/tutorials.qdoc @@ -71,6 +71,18 @@ A guided tour through the translations process, explaining the tools provided for developers, translators and release managers. + + \row + \o{2,1} \l{modelview.html}{\bold{ModelView}} + \o{2,1} + + \row + \o \image treeview_sml.png ModelView + \o This tutorial gives an introduction to ModelView programming using the Qt cross-platform framework + + \o + \o + \row \o{2,1} \l{QTestLib Tutorial}{\bold QTestLib} \o{2,1} \l{qmake Tutorial}{\bold qmake} diff --git a/doc/src/images/clock.png b/doc/src/images/clock.png Binary files differnew file mode 100755 index 0000000..c7f6a1b --- /dev/null +++ b/doc/src/images/clock.png diff --git a/doc/src/images/columnview.png b/doc/src/images/columnview.png Binary files differnew file mode 100644 index 0000000..127b795 --- /dev/null +++ b/doc/src/images/columnview.png diff --git a/doc/src/images/combobox.png b/doc/src/images/combobox.png Binary files differnew file mode 100755 index 0000000..d172b41 --- /dev/null +++ b/doc/src/images/combobox.png diff --git a/doc/src/images/dummy_tree.png b/doc/src/images/dummy_tree.png Binary files differnew file mode 100755 index 0000000..7373ea6 --- /dev/null +++ b/doc/src/images/dummy_tree.png diff --git a/doc/src/images/edit.png b/doc/src/images/edit.png Binary files differnew file mode 100755 index 0000000..161b06f --- /dev/null +++ b/doc/src/images/edit.png diff --git a/doc/src/images/example_model.png b/doc/src/images/example_model.png Binary files differnew file mode 100755 index 0000000..4261261 --- /dev/null +++ b/doc/src/images/example_model.png diff --git a/doc/src/images/header.png b/doc/src/images/header.png Binary files differnew file mode 100755 index 0000000..2597635 --- /dev/null +++ b/doc/src/images/header.png diff --git a/doc/src/images/lineedit.png b/doc/src/images/lineedit.png Binary files differnew file mode 100755 index 0000000..83d1c47 --- /dev/null +++ b/doc/src/images/lineedit.png diff --git a/doc/src/images/list_table_tree.png b/doc/src/images/list_table_tree.png Binary files differnew file mode 100755 index 0000000..b2daf1f --- /dev/null +++ b/doc/src/images/list_table_tree.png diff --git a/doc/src/images/listview.png b/doc/src/images/listview.png Binary files differnew file mode 100755 index 0000000..fa49c52 --- /dev/null +++ b/doc/src/images/listview.png diff --git a/doc/src/images/lotto.png b/doc/src/images/lotto.png Binary files differnew file mode 100755 index 0000000..dd751cf --- /dev/null +++ b/doc/src/images/lotto.png diff --git a/doc/src/images/modelview.png b/doc/src/images/modelview.png Binary files differnew file mode 100755 index 0000000..7b042af --- /dev/null +++ b/doc/src/images/modelview.png diff --git a/doc/src/images/path.png b/doc/src/images/path.png Binary files differnew file mode 100755 index 0000000..73107ff --- /dev/null +++ b/doc/src/images/path.png diff --git a/doc/src/images/qcompleter.png b/doc/src/images/qcompleter.png Binary files differnew file mode 100755 index 0000000..d25caac --- /dev/null +++ b/doc/src/images/qcompleter.png diff --git a/doc/src/images/readonlytable.png b/doc/src/images/readonlytable.png Binary files differnew file mode 100755 index 0000000..90bcba4 --- /dev/null +++ b/doc/src/images/readonlytable.png diff --git a/doc/src/images/readonlytable_role.png b/doc/src/images/readonlytable_role.png Binary files differnew file mode 100755 index 0000000..7d2d416 --- /dev/null +++ b/doc/src/images/readonlytable_role.png diff --git a/doc/src/images/selection2.png b/doc/src/images/selection2.png Binary files differnew file mode 100755 index 0000000..66c757f --- /dev/null +++ b/doc/src/images/selection2.png diff --git a/doc/src/images/standardwidget.png b/doc/src/images/standardwidget.png Binary files differnew file mode 100755 index 0000000..3ccccf1 --- /dev/null +++ b/doc/src/images/standardwidget.png diff --git a/doc/src/images/tableview.png b/doc/src/images/tableview.png Binary files differnew file mode 100755 index 0000000..8be1b6c --- /dev/null +++ b/doc/src/images/tableview.png diff --git a/doc/src/images/tree.png b/doc/src/images/tree.png Binary files differnew file mode 100755 index 0000000..3f046c9 --- /dev/null +++ b/doc/src/images/tree.png diff --git a/doc/src/images/tree_2.png b/doc/src/images/tree_2.png Binary files differnew file mode 100755 index 0000000..6ee1f4a --- /dev/null +++ b/doc/src/images/tree_2.png diff --git a/doc/src/images/tree_2_with_algorithm.png b/doc/src/images/tree_2_with_algorithm.png Binary files differnew file mode 100755 index 0000000..ecf9101 --- /dev/null +++ b/doc/src/images/tree_2_with_algorithm.png diff --git a/doc/src/images/tree_city.png b/doc/src/images/tree_city.png Binary files differnew file mode 100755 index 0000000..57f03d9 --- /dev/null +++ b/doc/src/images/tree_city.png diff --git a/doc/src/images/treeview.png b/doc/src/images/treeview.png Binary files differnew file mode 100755 index 0000000..af31fe9 --- /dev/null +++ b/doc/src/images/treeview.png diff --git a/doc/src/images/treeview_sml.png b/doc/src/images/treeview_sml.png Binary files differnew file mode 100755 index 0000000..fb6de1d --- /dev/null +++ b/doc/src/images/treeview_sml.png diff --git a/doc/src/images/widgetmapper.png b/doc/src/images/widgetmapper.png Binary files differnew file mode 100755 index 0000000..9627088 --- /dev/null +++ b/doc/src/images/widgetmapper.png diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 18a1746..b5e73ed 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -44,7 +44,7 @@ <li><a href="installation.html">Installation & first steps</a></li> <li><a href="how-to-learn-qt.html">How to learn Qt</a></li> <li><a href="tutorials.html">Tutorials</a></li> - <li><a href="examples.html">Examples</a></li> + <li><a href="all-examples.html">Examples</a></li> <li><a href="qt4-7-intro.html">Whats new in Qt 4.7</a></li> </ul> </div> @@ -56,30 +56,29 @@ <div class="indexboxcont indexboxbar "> <div class="sectionlist tricol"> <ul> - <li><a href="classes.html">Class index</a></li> - <li><a href="functions.html">Function index</a></li> - <li><a href="modules.html">Modules</a></li> - <li><a href="namespaces.html">Namespaces</a></li> - <li><a href="qtglobal.html">Global stuff</a></li> - <li><a href="qdeclarativeelements.html">QML elements</a></li> + <li><a href="classes.html">Class index</a></li> + <li><a href="functions.html">Function index</a></li> + <li><a href="modules.html">Modules</a></li> + <li><a href="namespaces.html">Namespaces</a></li> + <li><a href="qtglobal.html">Global Declarations</a></li> </ul> </div> <div class="sectionlist tricol"> <ul> - <li><a href="qt-basic-concepts.html">Basic Qt Architecture</a></li> - <li><a href="declarativeui.html">Device UI's & Qt Quick</a></li> - <li><a href="qt-gui-concepts.html">Desktop UI components</a></li> - <li><a href="platform-specific.html">Platform-specific info</a></li> - <li><a href="qt-graphics.html">Graphics, Painting & Printing</a></li> - <li><a href="qt-network.html">Input/Output & networking</a></li> + <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> + <li><a href="qt-basic-concepts.html">Qt Architecture</a></li> + <li><a href="developing-with-qt.html">Cross-platform & Platform-specific Development</a></li> + <li><a href="technology-apis.html">Qt & standard technologies </a></li> + <li><a href="best-practices.html">Qt How-to's & best practices</a></li> </ul> </div> <div class="sectionlist"> <ul> - <li><a href="model-view-programming.html">Model/View programming</a></li> - <li><a href="technology-apis.html">Qt API's for other technologies</a></li> - <li><a href="best-practices.html">Qt How-to's & best practices</a></li> - <li><a href="developing-with-qt.html">Cross-platform development</a></li> + <li><a href="declarativeui.html">Qt Quick</a></li> + <li><a href="qdeclarativeintroduction.html">Introduction to QML</a></li> + <li><a href="qdeclarativeelements.html">QML Elements</a></li> + <li><a href="qt-gui-concepts.html">UI components</a></li> + <li><a href="declarativeui.html">Qt & GUI design</a></li> </ul> </div> </div> @@ -104,7 +103,7 @@ </ul> </div> </div> - </div> + </div> \endraw */ diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 110dac7..e7133e3 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -194,16 +194,16 @@ \hr copyright (C) 1999 by Willem van Schaik <willem@schaik.com> - + version 1.0 - 1999.10.15 - First version. - + Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty. - + \hr Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. @@ -293,7 +293,7 @@ Copyright (c) 1987, 1993, 1994\br The Regents of the University of California. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\br @@ -305,7 +305,7 @@ 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -336,7 +336,7 @@ Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\br Copyright (c( 1996 USAF Phillips Laboratory\br Additions (c) Richard Nolde 2006-2009 - + Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in @@ -344,11 +344,11 @@ Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics. - + THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - + IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, @@ -360,11 +360,11 @@ Copyright (c) 1985, 1986 The Regents of the University of California.\br All rights reserved. - + This code is derived from software contributed to Berkeley by James A. Woods, derived from original work by Spencer Thomas and Joseph Orost. - + Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, @@ -381,7 +381,7 @@ Copyright (c) 1996-1997 Sam Leffler\br Copyright (c) 1996 Pixar - + Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in @@ -389,11 +389,11 @@ Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Pixar, Sam Leffler and Silicon Graphics. - + THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - + IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, @@ -423,8 +423,6 @@ \section1 JavaScriptCore - \hr - Copyright (c) 1991, 2000, 2001 by Lucent Technologies.\br Copyright (C) 2002, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. @@ -441,6 +439,60 @@ See \c src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp for license details. + \hr + + Copyright (C) 2009 Company 100, Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met:\br + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \hr + + Copyright (C) 2009 Apple Inc. All rights reserved.\br + Copyright (C) 2009 University of Szeged\br + All rights reserved.\br + Copyright (C) 2010 MIPS Technologies, Inc. All rights reserved.\br + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met:\br + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MIPS TECHNOLOGIES, INC. OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \section1 Pixman (\c pixman) version 0.17.11 \e{pixman is a library that provides low-level pixel manipulation @@ -479,4 +531,156 @@ See \c src/3rdparty/pixman/pixman-arm-neon-asm.h and \c src/3rdparty/pixman/pixman-arm-neon-asm.S + + \section1 WebCore (WebKit) + + Copyright (C) 2009 Ericsson AB\br + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution.\br + 3. Neither the name of Ericsson nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \hr + + Copyright (C) 2004, Apple Computer, Inc. and The Mozilla Foundation.\br + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution.\br + 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla + Foundation ("Mozilla") nor the names of their contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR + THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \hr + + Copyright (C) 2009 Igalia S.L.\br + Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org>\br + Copyright (C) 2008 Christian Dywan <christian@imendio.com>\br + Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com>\br + Copyright (C) 2006 Charles Samuels <charles@kde.org>\br + Copyright (C) 2009 Dominik Röttsches <dominik.roettsches@access-company.com>\br + Copyright (C) 2009 Brent Fulgham\br + Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>\br + Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>\br + Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>\br + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met:\br + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \hr + + Copyright (C) 2007, 2008 Apple Inc. All rights reserved.\br + Copyright (C) IBM Corp. 2009 All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution.\br + 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission.\br + + THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \hr + + Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.\br + Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved\br + Copyright (C) 2007 Marius Renn <damarvy@gmail.com> All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met:\br + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.\br + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc index 96d5d29..a04a256 100644 --- a/doc/src/legal/licenses.qdoc +++ b/doc/src/legal/licenses.qdoc @@ -328,7 +328,7 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + \list \o Parts of WebKit used by the QtWebKit module \endlist @@ -716,6 +716,53 @@ \list \o Parts of WebKit used by the QtWebKit module \endlist + + \hr + + Copyright (c) 1991-2009 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in + http://www.unicode.org/copyright.html. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of the Unicode data files and any associated + documentation (the "Data Files") or Unicode software and any + associated documentation (the "Software") to deal in the Data + Files or Software without restriction, including without + limitation the rights to use, copy, modify, merge, publish, + distribute, and/or sell copies of the Data Files or Software, + and to permit persons to whom the Data Files or Software are + furnished to do so, provided that (a) the above copyright + notice(s) and this permission notice appear with all copies + of the Data Files or Software, (b) both the above copyright + notice(s) and this permission notice appear in associated + documentation, and (c) there is clear notice in each modified + Data File or in the Software as well as in the documentation + associated with the Data File(s) or Software that the data or + software has been modified. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT + WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED + IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT + OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES + OR SOFTWARE. + + Except as contained in this notice, the name of a copyright + holder shall not be used in advertising or otherwise to promote + the sale, use or other dealings in these Data Files or Software + without prior written authorization of the copyright holder. + + \list + \o Included in \c{util/unicode/data}, + \c{tests/auto/qtextboundaryfinder/data} and + \c{tests/auto/qchar} + \o Parts of the \l makeqpf tool + \endlist */ /*! diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 22d858f..afb17c4 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -51,6 +51,7 @@ \o \l {Exception Safety with Symbian} \o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support} \o \l {qmake Platform Notes#Symbian platform} {Qt for Symbian extensions for qmake} + \o \l {Symbian Platform Security Requirements} {Symbian Platform Security Requirements} \endlist \o \list @@ -60,6 +61,22 @@ */ /*! + \page symbian-platform-security-requirements.html + + \title Symbian Platform Security Requirements + \ingroup qtsymbian + + On Symbian, processes that access media via the network must + have the \c NetworkServices platform security capability. If the client + process lacks this capability, operations will result in errors. + This failure is indicated by a state() of Phonon::ErrorState. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. +*/ + +/*! \page symbian-with-qt-introduction.html \title The Symbian platform - Introduction to Qt diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/declarative/coloranimation.qml new file mode 100644 index 0000000..4e35f22 --- /dev/null +++ b/doc/src/snippets/declarative/coloranimation.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** 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 QtDeclarative module 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$ +** +****************************************************************************/ + +//![0] +import Qt 4.7 + +Rectangle { + width: 100; height: 100 + color: "red" + + ColorAnimation on color { to: "yellow"; duration: 1000 } +} +//![0] + diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/declarative/numberanimation.qml new file mode 100644 index 0000000..57d23b1 --- /dev/null +++ b/doc/src/snippets/declarative/numberanimation.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** 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 QtDeclarative module 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$ +** +****************************************************************************/ + +//![0] +import Qt 4.7 + +Rectangle { + width: 100; height: 100 + color: "red" + + NumberAnimation on x { to: 50; duration: 1000 } +} +//![0] + diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml new file mode 100644 index 0000000..059cde5 --- /dev/null +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** 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 QtDeclarative module 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$ +** +****************************************************************************/ + +import Qt 4.7 + +Row { + +//![transition] +Rectangle { + id: rect + width: 100; height: 100 + color: "red" + + states: State { + name: "moved" + PropertyChanges { target: rect; x: 50 } + } + + transitions: Transition { + PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } + } +} +//![transition] + +//![behavior] +Rectangle { + width: 100; height: 100 + color: "red" + + Behavior on x { PropertyAnimation {} } + + MouseArea { anchors.fill: parent; onClicked: parent.x = 50 } +} +//![behavior] + +//![propertyvaluesource] +Rectangle { + width: 100; height: 100 + color: "red" + + SequentialAnimation on x { + loops: Animation.Infinite + PropertyAnimation { to: 50 } + PropertyAnimation { to: 0 } + } +} +//![propertyvaluesource] + +//![standalone] +Rectangle { + id: theRect + width: 100; height: 100 + color: "red" + + // this is a standalone animation, it's not running by default + PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 } + + MouseArea { anchors.fill: parent; onClicked: animation.running = true } +} +//![standalone] + + +} diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/declarative/smoothedanimation.qml new file mode 100644 index 0000000..20c90b5 --- /dev/null +++ b/doc/src/snippets/declarative/smoothedanimation.qml @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//![0] +import Qt 4.7 + +Rectangle { + width: 800; height: 600 + color: "blue" + + Rectangle { + width: 60; height: 60 + x: rect1.x - 5; y: rect1.y - 5 + color: "green" + + Behavior on x { SmoothedAnimation { velocity: 200 } } + Behavior on y { SmoothedAnimation { velocity: 200 } } + } + + Rectangle { + id: rect1 + width: 50; height: 50 + color: "red" + } + + focus: true + Keys.onRightPressed: rect1.x = rect1.x + 100 + Keys.onLeftPressed: rect1.x = rect1.x - 100 + Keys.onUpPressed: rect1.y = rect1.y - 100 + Keys.onDownPressed: rect1.y = rect1.y + 100 +} +//![0] diff --git a/doc/src/snippets/declarative/springanimation.qml b/doc/src/snippets/declarative/springanimation.qml new file mode 100644 index 0000000..b73a9d2 --- /dev/null +++ b/doc/src/snippets/declarative/springanimation.qml @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//![0] +import Qt 4.7 + +Rectangle { + width: 300; height: 300 + + Rectangle { + id: rect + width: 50; height: 50 + color: "red" + + Behavior on x { SpringAnimation { spring: 2; damping: 0.2 } } + Behavior on y { SpringAnimation { spring: 2; damping: 0.2 } } + } + + MouseArea { + anchors.fill: parent + onClicked: { + rect.x = mouse.x + rect.y = mouse.y + } + } +} +//![0] + diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml index a99c2e2..af6b103 100644 --- a/doc/src/snippets/declarative/state.qml +++ b/doc/src/snippets/declarative/state.qml @@ -44,26 +44,13 @@ import Qt 4.7 Rectangle { id: myRect width: 100; height: 100 - color: "black" + color: "red" - states: [ - State { - name: "clicked" - PropertyChanges { - target: myRect - color: "red" - } - } - ] + MouseArea { id: mouseArea; anchors.fill: parent } - MouseArea { - anchors.fill: parent - onClicked: { - if (myRect.state == "") // i.e. the default state - myRect.state = "clicked"; - else - myRect.state = ""; - } + states: State { + name: "hidden"; when: mouseArea.pressed + PropertyChanges { target: myRect; opacity: 0 } } } //![0] diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml new file mode 100644 index 0000000..615de17 --- /dev/null +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** 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 QtDeclarative module 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$ +** +****************************************************************************/ +import Qt 4.7 + +//![0] +Rectangle { + id: rect + width: 100; height: 100 + color: "red" + + MouseArea { id: mouseArea; anchors.fill: parent } + + states: State { + name: "brighter"; when: mouseArea.pressed + PropertyChanges { target: rect; color: "yellow" } + } + + transitions: Transition { + ColorAnimation { duration: 1000 } + } +} +//![0] + + diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml new file mode 100644 index 0000000..8a7b69a --- /dev/null +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** 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 QtDeclarative module 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$ +** +****************************************************************************/ +import Qt 4.7 + +//![0] +Rectangle { + id: rect + width: 100; height: 100 + color: "red" + + MouseArea { id: mouseArea; anchors.fill: parent } + + states: State { + name: "brighter" + when: mouseArea.pressed + PropertyChanges { target: rect; color: "yellow"; x: 50 } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; duration: 1000 } + ColorAnimation { duration: 1000 } + } + } +} +//![0] + diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml new file mode 100644 index 0000000..b884750 --- /dev/null +++ b/doc/src/snippets/declarative/transition.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** 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 QtDeclarative module 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$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +Rectangle { + id: rect + width: 100; height: 100 + color: "red" + + states: State { + name: "moved" + PropertyChanges { target: rect; x: 50; y: 50 } + } + + transitions: Transition { + PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } + } +} +//![0] + diff --git a/doc/src/template/style/OfflineStyle.css b/doc/src/template/style/OfflineStyle.css index afa7de0..9f5d28b 100644 --- a/doc/src/template/style/OfflineStyle.css +++ b/doc/src/template/style/OfflineStyle.css @@ -1,588 +1,26 @@ @media screen { - html - { - color: #000000; - background: #FFFFFF; - } - body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td - { - margin: 0; - padding: 0; - } - table - { - border-collapse: collapse; - border-spacing: 0; - } - fieldset, img - { - border: 0; - } - address, caption, cite, code, dfn, em, strong, th, var, optgroup - { - font-style: inherit; - font-weight: inherit; - } - del, ins - { - text-decoration: none; - } - li - { - list-style: none; - } - caption, th - { - text-align: left; - } - h1, h2, h3, h4, h5, h6 - { - font-size: 100%; - } - q:before, q:after - { - content: ''; - } - abbr, acronym - { - border: 0; - font-variant: normal; - } - sup - { - vertical-align: baseline; - } - sub - { - vertical-align: baseline; - } - tt, .qmlreadonly span, .qmldefault span - { - word-spacing:5px; - } - .heading - { - font: normal 600 16px/1.0 Arial; - } - .subtitle - { - font-size: 13px; - } - .small-subtitle - { - font-size: 13px; - } - legend - { - color: #000000; - } - input, button, textarea, select, optgroup, option - { - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; - } - input, button, textarea, select - { - font-size: 100%; - } - body - { - font: normal 13px/1.2 Verdana; - color: #363534; - } - strong - { - font-weight: bold; - } - em - { - font-style: italic; - } - a - { - color: #00732f; - text-decoration: none; - } - .header, .footer, .wrapper - { - /*min-width: 600px;*/ - max-width: 1500px; - margin: 0 5px; - } + .wrapper { - position:relative; top:50px; + background: none; + } .wrapper .bd { + background: none; position: relative; } - .header, .footer - { - display: block; - clear: both; - overflow: hidden; - } - .header - { - height: 115px; - position: relative; - } - - - .header .qtref - { - position: absolute; - top: 28px; - left: 88px; - width: 302px; - height: 22px; - } - .header .qtref span - { - display: block; - height: 22px; - } - .wrap .content h1 - { - font: 600 18px/1.2 Arial; - } - .wrap .content h2 - { - font: 600 16px/1.2 Arial; - } - .wrap .content h3 - { - font: 600 14px/1.2 Arial; - } - .wrap .content h4 - { - font: 600 12px/1.2 Arial; - } - - .wrap .content p - { - line-height: 20px; - padding: 5px; - } - .wrap .content table p - { - line-height: 20px; - padding: 0px; - } - .wrap .content ul - { - padding-left: 25px; - padding-top: 10px; - } - a:hover - { - color: #4c0033; - text-decoration: underline; - } - .content a:visited - { - color: #4c0033; - text-decoration: none; - } - .content a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - - pre - { - border: 1px solid #DDDDDD; - margin: 0 20px 10px 10px; - padding: 20px 15px 20px 20px; - overflow-x: auto; - } - table, pre - { - -moz-border-radius: 7px 7px 7px 7px; - background-color: #F6F6F6; - border: 1px solid #E6E6E6; - border-collapse: separate; - font-size: 11px; - /*min-width: 395px;*/ - margin-bottom: 25px; - display: inline-block; - } - thead - { - margin-top: 5px; - font:600 12px/1.2 Arial; - } - th - { - padding: 5px 15px 5px 15px; - background-color: #E1E1E1; - /* border-bottom: 1px solid #E6E6E6;*/ - border-left: 1px solid #E6E6E6; - /* border-right: 1px solid #E6E6E6;*/ - } - td - { - padding: 3px 15px 3px 20px; - /* border-left: 1px solid #E6E6E6; - border-right: 1px solid #E6E6E6;*/ - } - tr.odd td:hover, tr.even td:hover - { - /* border-right: 1px solid #C3C3C3; - border-left: 1px solid #C3C3C3;*/ - } - - td.rightAlign - { - padding: 3px 15px 3px 10px; - } - table tr.odd - { - border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; - color: #66666E; - } - table tr.even - { - border-left: 1px solid #E6E6E6; - background-color: #ffffff; - color: #66666E; - } - table tr.odd td:hover, table tr.even td:hover - { - background-color: #E6E6E6; - } - - span.comment - { - color: #8B0000; - font-style: italic; - } - span.string, span.char - { - color: #254117; - } - - .qmltype - { - text-align: center; - font-size: 160%; - } - .qmlreadonly - { - float: right; - color: #254117; - } - - .qmldefault - { - float: right; - color: red; - } - - .footer - { - border-top:1px solid #E5E5E5; - min-height: 100px; - color: #797775; - font: normal 9px/1 Verdana; - text-align: center; - padding-top: 40px; - margin: 0; - } - .wrap - { - margin: 0 5px 0 5px; - } - .wrap .toolbar - { - display:block; - } - - .wrap .breadcrumb ul li - { - float: left; - background: url(../images/breadcrumb.png) no-repeat 0 5px; - padding-left: 15px; - margin-left: 15px; - font-weight: bold; - } - .wrap .breadcrumb ul li.last - { - font-weight: normal; - } - .wrap .breadcrumb ul li a - { - /* color: #363534;*/ - color: #00732F; - } - .wrap .breadcrumb ul li.first - { - background-image: none; - padding-left: 0; - margin-left: 0; - } - .wrap .content - { - word-wrap:break-word; - } - .wrap .content li - { - /*padding-left: 12px;*/ - background: url(../images/bullet_sq.png) no-repeat 0 5px; - font: normal 400 10pt/1 Verdana; - /* color: #44a51c;*/ - margin-bottom: 10px; - } - - .offline .wrap .content - { - padding-top: 15px; - } - - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - - hr - { - background-color: #E6E6E6; - border: 1px solid #E6E6E6; - height: 1px; - width: 100%; - text-align: left; - margin: 5px 0px 5px 0px; - } - - .content .alignedsummary - { - margin: 5px; - width:100%; - } - - - .toc - { - float: right; - -moz-border-radius: 7px 7px 7px 7px; - background-color: #F6F6F6; - border: 1px solid #DDDDDD; - margin: 0 20px 10px 10px; - padding: 20px 15px 20px 20px; - height: auto; - width: 200px; - } - - .toc h3, .generic a - { - font: 600 12px/1.2 Arial; - } - - .wrap .content .toc ul - { - padding-left: 0px; - } - - - .wrap .content .toc .level2 - { - margin-left: 15px; - } - - .wrap .content .toc .level3 - { - margin-left: 30px; - } - - .content .toc li - { - font: normal 10px/1.2 Verdana; - background: url(../images/bullet_dn.png) no-repeat 0 5px; - } - - - .generic{ - max-width:75%; - } - .generic td{ - padding:0; - } - - .generic .odd .alphaChar{ - background-color: #F6F6F6; - } - - .generic .even .alphaChar{ - background-color: #FFFFFF; - } - - .highlightedCode - { - margin:10px; - } - - .flowList{ - vertical-align:top; - } - .alphaChar{ - width:100%; - background-color:#F6F6F6; - border:1px solid #E6E6E6; - font-size:12pt; - padding-left:10px; - margin-top:10px; - margin-bottom:10px; - } - - .flowList dl{ - } - .flowList dd{ - display:inline-block; - margin-left:10px; - width:250px; - } - .wrap .content .flowList p{ - padding:0px; - } - - .relpage - { - -moz-border-radius: 7px 7px 7px 7px; - border: 1px solid #DDDDDD; - padding: 25px 25px; - clear: both; - } - .relpage ul - { - float: none; - padding: 15px; - } - .content .relpage li - { - font: normal 11px/1.2 Verdana; - } - h3.fn, span.fn - { - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - font-weight: bold; - word-spacing:3px; - } - - .functionIndex { - font-size:12pt; - word-spacing:10px; - margin-bottom:10px; - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - width:100%; - } - - .centerAlign { text-align:center;} - .rightAlign {text-align:right;} - .leftAlign {text-align:left;} - .topAlign{vertical-align:top } - .functionIndex a{display:inline-block;} - - /* start index box */ - .indexbox - { - width: 100%; - display:inline-block; - } - - .indexboxcont { display: block; } - - .indexboxbar - { - border-bottom:1px solid #E5E5E5; - margin-bottom: 25px; - } - - .indexboxcont .section - { - display: inline-block; - padding:0 2% 0 1%; - vertical-align:top; - } - - .indexboxcont .section { - float: left; - } - - .indexboxcont .section p - { - padding-top: 20px; - padding-bottom: 20px; - } - .indexboxcont .sectionlist - { - display: inline-block; - vertical-align:top; - padding: 0; - } - .indexboxcont .sectionlist ul - { - margin-bottom: 20px; - } - - .indexboxcont .sectionlist ul li - { - line-height: 12px; - } - - .content .indexboxcont li - { - font: normal 600 13px/1 Verdana; - } - - .indexbox a:hover, .indexbox a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - - .indexbox a:visited - { - color: #00732f; - text-decoration: none; - } - - .indexbox .indexIcon { - width: 11%; - } - - - .indexboxcont:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - + body.offline { background-image: none; + background-color: #FFFFFF; + } .offline .footer { @@ -811,22 +249,3 @@ ul.sf-menu li li li.sfHover ul { } /* end of screen media */ -/* start of print media */ - -@media print -{ - input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft - { - display: none; - background: none; - } - .content - { - position: absolute; - top: 0px; - left: 0px; - background: none; - display: block; - } -} -/* end of print media */ diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 184a832..9f80921 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -1,6 +1,8 @@ @media screen { - html + +/* basic elements */ + html { color: #000000; background: #FFFFFF; @@ -18,8 +20,7 @@ fieldset, img { border: 0; - height:100%; - width:100% + max-width:100%; } address, caption, cite, code, dfn, em, strong, th, var, optgroup { @@ -41,7 +42,6 @@ h1, h2, h3, h4, h5, h6 { font-size: 100%; -/* font-weight: normal; */ } q:before, q:after { @@ -52,11 +52,7 @@ border: 0; font-variant: normal; } - sup - { - vertical-align: baseline; - } - sub + sup, sub { vertical-align: baseline; } @@ -64,19 +60,6 @@ { word-spacing:5px; } - .heading - { - font: normal 600 16px/1.0 Arial; - padding-bottom: 15px; - } - .subtitle - { - font-size: 13px; - } - .small-subtitle - { - font-size: 13px; - } legend { color: #000000; @@ -92,9 +75,19 @@ { font-size: 100%; } + strong + { + font-weight: bold; + } + em + { + font-style: italic; + } + + /* adding Qt theme */ html { - background-color: #e5e5e5; + /* background-color: #e5e5e5;*/ } body { @@ -102,73 +95,115 @@ font: normal 13px/1.2 Verdana; color: #363534; } - strong + a { - font-weight: bold; + color: #00732f; + text-decoration: none; } - em + hr { - font-style: italic; + background-color: #E6E6E6; + border: 1px solid #E6E6E6; + height: 1px; + width: 100%; + text-align: left; + margin: 15px 0px 15px 0px; } - a + + pre { - color: #00732f; - text-decoration: none; + border: 1px solid #DDDDDD; + -moz-border-radius: 7px 7px 7px 7px; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + overflow-x: auto; } - .header, .footer, .wrapper + table, pre { - min-width: 600px; - max-width: 1500px; - margin: 0 30px; + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 11px; + margin-bottom: 25px; } - .wrapper + pre.highlightedCode { + display: block; + overflow:hidden; + } + thead { - background: url(../images/bg_r.png) repeat-y 100% 0; + margin-top: 5px; + font:600 12px/1.2 Arial; } - .wrapper .hd + th { - padding-left: 216px; - height: 15px; - background: url(../images/page.png) no-repeat 0 0; - overflow: hidden; + padding: 5px 15px 5px 15px; + background-color: #E1E1E1; + border-left: 1px solid #E6E6E6; } - .offline .wrapper .hd + td { - background: url(../images/page.png) no-repeat 0 -15px; + padding: 3px 15px 3px 20px; } - .wrapper .hd span + tr.odd td:hover, tr.even td:hover {} + + td.rightAlign + { + padding: 3px 5px 3px 10px; + } + table tr.odd { - height: 15px; - display: block; - overflow: hidden; - background: url(../images/page.png) no-repeat 100% -30px; + border-left: 1px solid #E6E6E6; + background-color: #F6F6F6; + color: #66666E; } - .wrapper .bd + table tr.even { - background: url(../images/bg_l.png) repeat-y 0 0; - position: relative; + border-left: 1px solid #E6E6E6; + background-color: #ffffff; + color: #66666E; } - .offline .wrapper .bd + table tr.odd td:hover, table tr.even td:hover { - background: url(../images/bg_l_blank.png) repeat-y 0 0; + /* background-color: #E6E6E6;*/ /* disabled until further notice */ } - .wrapper .ft + + span.comment { - padding-left: 216px; - height: 15px; - background: url(../images/page.png) no-repeat 0 -75px; - overflow: hidden; + color: #8B0000; + font-style: italic; } - .offline .wrapper .ft + span.string, span.char { - background: url(../images/page.png) no-repeat 0 -90px; + color: #254117; } - .wrapper .ft span + + +/* end basic elements */ + +/* font style elements */ + .heading { - height: 15px; - display: block; - background: url(../images/page.png) no-repeat 100% -60px; - overflow: hidden; + font: normal bold 16px/1.0 Arial; + padding-bottom: 15px; + } + .subtitle + { + font-size: 13px; + } + .small-subtitle + { + font-size: 13px; + } +/* end font style elements */ + +/* global settings*/ + .header, .footer, .wrapper + { + min-width: 600px; + max-width: 1500px; + margin: 0 30px; } .header, .footer { @@ -176,6 +211,17 @@ clear: both; overflow: hidden; } + .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + +/* end global settings*/ +/* header elements */ .header { height: 115px; @@ -203,7 +249,247 @@ text-indent: -999em; background: url(../images/sprites-combined.png) no-repeat -78px -235px; } + .content a:visited + { + color: #4c0033; + text-decoration: none; + } + .content a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + #nav-topright + { + height: 70px; + } + + #nav-topright ul + { + list-style-type: none; + float: right; + width: 370px; + margin-top: 11px; + } + + #nav-topright li + { + display: inline-block; + margin-right: 20px; + float: left; + } + + #nav-topright li.nav-topright-last + { + margin-right: 0; + } + + #nav-topright li a + { + background: transparent url(../images/sprites-combined.png) no-repeat; + height: 18px; + display: block; + overflow: hidden; + text-indent: -9999px; + } + + #nav-topright li.nav-topright-home a + { + width: 65px; + background-position: -2px -91px; + } + + #nav-topright li.nav-topright-home a:hover + { + background-position: -2px -117px; + } + + + #nav-topright li.nav-topright-dev a + { + width: 30px; + background-position: -76px -91px; + } + + #nav-topright li.nav-topright-dev a:hover + { + background-position: -76px -117px; + } + + + #nav-topright li.nav-topright-labs a + { + width: 40px; + background-position: -114px -91px; + } + + #nav-topright li.nav-topright-labs a:hover + { + background-position: -114px -117px; + } + + #nav-topright li.nav-topright-doc a + { + width: 32px; + background-position: -162px -91px; + } + + #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a + { + background-position: -162px -117px; + } + + #nav-topright li.nav-topright-blog a + { + width: 40px; + background-position: -203px -91px; + } + + #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a + { + background-position: -203px -117px; + } + + #nav-topright li.nav-topright-shop a + { + width: 40px; + background-position: -252px -91px; + } + + #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a + { + background-position: -252px -117px; + } + + #nav-logo + { + background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px; + left: -3px; + position: absolute; + width: 75px; + height: 75px; + top: 13px; + } + #nav-logo a + { + width: 75px; + height: 75px; + display: block; + text-indent: -9999px; + overflow: hidden; + } + + + .shortCut-topleft-inactive + { + padding-left: 3px; + background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px; + height: 20px; + width: 47px; + } + .shortCut-topleft-inactive span + { + font-variant: normal; + } + .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover + { + text-decoration:none; + } + #shortCut + { + padding-top: 10px; + font-weight: bolder; + color: #b0adab; + } + #shortCut ul + { + list-style-type: none; + float: left; + width: 347px; + margin-left: 100px; + } + #shortCut li + { + display: inline-block; + margin-right: 25px; + float: left; + white-space: nowrap; + } + #shortCut li a + { + color: #b0adab; + } + #shortCut li a:hover + { + color: #44a51c; + } + + + +/* end header elements */ +/* content and sidebar elements */ + .wrapper + { + background: url(../images/bg_r.png) repeat-y 100% 0; + } + .wrapper .hd + { + padding-left: 216px; + height: 15px; + background: url(../images/page.png) no-repeat 0 0; + overflow: hidden; + } + + + + + .wrapper .hd span + { + height: 15px; + display: block; + overflow: hidden; + background: url(../images/page.png) no-repeat 100% -30px; + } + .wrapper .bd + { + background: url(../images/bg_l.png) repeat-y 0 0; + position: relative; + } + + + + + .wrapper .ft + { + padding-left: 216px; + height: 15px; + background: url(../images/page.png) no-repeat 0 -75px; + overflow: hidden; + } + + + + + .wrapper .ft span + { + height: 15px; + display: block; + background: url(../images/page.png) no-repeat 100% -60px; + overflow: hidden; + } + .navTop{ + float:right; + display:block; + padding-right:15px; + + } + + + +/* end content and sidebar elements */ +/* sidebar elements */ .sidebar { float: left; @@ -212,10 +498,10 @@ font-size: 11px; } - .offline .sidebar, .offline .feedback, .offline .t_button - { - display: none; - } + + + + .sidebar .searchlabel { @@ -258,9 +544,8 @@ .sidebar .box h2 { - font: 600 16px/1.2 Arial; + font: bold 16px/1.2 Arial; padding: 0; -/* min-height: 32px;*/ } .sidebar .box h2 span { @@ -273,10 +558,6 @@ } .sidebar #lookup.box h2 span { -/* background: url(../images/sprites-combined.png) no-repeat -6px -311px; - width: 27px; - height: 35px; - margin-right: 13px;*/ } .sidebar .box#topics h2 { @@ -284,10 +565,6 @@ } .sidebar #topics.box h2 span { - /* background: url(../images/sprites-combined.png) no-repeat -94px -311px; - width: 27px; - height: 32px; - margin-right: 13px;*/ } .sidebar .box#examples h2 { @@ -295,10 +572,6 @@ } .sidebar #examples.box h2 span { - /* background: url(../images/sprites-combined.png) no-repeat -48px -311px; - width: 30px; - height: 31px; - margin-right: 9px;*/ } .sidebar .box .list @@ -315,7 +588,6 @@ } .sidebar .box ul { - /*padding:10px;*/ padding-bottom:5px; padding-left:10px; padding-top:5px; @@ -342,16 +614,40 @@ color:#AAD2F0; font-style:italic; } + .sidebar .search form input.loading + { + background:url("../images/spinner.gif") no-repeat scroll right center transparent; + } +.floatingResult{ + z-index:1; + position:relative; + padding-top:0px; + background-color:white; + border:solid 1px black; + height:250px; + width:600px; + overflow-x:hidden; + overflow-y:auto; +} + + .floatingResult:hover{ + display:block; + } + .floatingResult:hover{ + } + +/* end sidebar elements */ +/* content elements */ .wrap { margin: 0 5px 0 208px; overflow: visible; } - .offline .wrap - { - margin: 0 5px 0 5px; - } + + + + .wrap .toolbar { background-color: #fafafa; @@ -437,8 +733,11 @@ color: #00732F; } - .offline .wrap .breadcrumb + + .wrap .content { + padding: 30px; + word-wrap:break-word; } .wrap .breadcrumb ul @@ -466,48 +765,51 @@ padding-left: 0; margin-left: 0; } - .wrap .content - { - padding: 30px; - word-wrap:break-word; - } + + + + .wrap .content ol li { + background:none; + font:normal 10pt/1 Verdana; + + margin-bottom:10px; + margin-left:12px; + /*list-style-type:disc;*/ + } + .wrap .content li { - /*padding-left: 12px;*/ background: url(../images/bullet_sq.png) no-repeat 0 5px; font: normal 400 10pt/1 Verdana; - /* color: #44a51c;*/ margin-bottom: 10px; padding-left:12px; } - .content li:hover - { - /* text-decoration: underline;*/ - } - .offline .wrap .content - { - padding-top: 15px; - } + + + + + + + + + .content li:hover {} .wrap .content h1 { - font: 600 18px/1.2 Arial; + font: bold 18px/1.2 Arial; } .wrap .content h2 { - border-bottom:1px solid #DDDDDD; font:600 16px/1.2 Arial; margin-top:15px; - width:100%; - + width:100%; } .wrap .content h3 { - font: 600 14px/1.2 Arial; - /*border-bottom:1px solid #DDDDDD;*/ + font: bold 14px/1.2 Arial; font:600 16px/1.2 Arial; margin-top:15px; width:100%; @@ -516,7 +818,6 @@ { line-height: 20px; padding: 5px; - /* text-align:justify;*/ } .wrap .content table p { @@ -533,25 +834,6 @@ color: #4c0033; text-decoration: underline; } - .content a:visited - { - color: #4c0033; - text-decoration: none; - } - .content a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } .footer - { - min-height: 100px; - color: #797775; - font: normal 9px/1 Verdana; - text-align: center; - padding-top: 40px; - background-color: #E6E7E8; - margin: 0; - } .feedback { float: none; @@ -568,267 +850,36 @@ color: #00732F; text-decoration: underline; } - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - #nav-topright - { - height: 70px; - } - - #nav-topright ul - { - list-style-type: none; - float: right; - width: 370px; - margin-top: 11px; - } - - #nav-topright li - { - display: inline-block; - margin-right: 20px; - float: left; - } - - #nav-topright li.nav-topright-last - { - margin-right: 0; - } - - #nav-topright li a - { - background: transparent url(../images/sprites-combined.png) no-repeat; - height: 18px; - display: block; - overflow: hidden; - text-indent: -9999px; - } - - #nav-topright li.nav-topright-home a - { - width: 65px; - background-position: -2px -91px; - } - - #nav-topright li.nav-topright-home a:hover - { - background-position: -2px -117px; - } - - - #nav-topright li.nav-topright-dev a - { - width: 30px; - background-position: -76px -91px; - } - - #nav-topright li.nav-topright-dev a:hover - { - background-position: -76px -117px; - } - - - #nav-topright li.nav-topright-labs a - { - width: 40px; - background-position: -114px -91px; - } - - #nav-topright li.nav-topright-labs a:hover - { - background-position: -114px -117px; - } - - #nav-topright li.nav-topright-doc a - { - width: 32px; - background-position: -162px -91px; - } - - #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a - { - background-position: -162px -117px; - } - - #nav-topright li.nav-topright-blog a - { - width: 40px; - background-position: -203px -91px; - } - - #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a - { - background-position: -203px -117px; - } - - #nav-topright li.nav-topright-shop a - { - width: 40px; - background-position: -252px -91px; - } - - #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a - { - background-position: -252px -117px; - } - - #nav-logo - { - background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px; - left: -3px; - position: absolute; - width: 75px; - height: 75px; - top: 13px; - } - #nav-logo a - { - width: 75px; - height: 75px; - display: block; - text-indent: -9999px; - overflow: hidden; - } - - - .shortCut-topleft-inactive - { - padding-left: 3px; - background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px; - height: 20px; - width: 47px; - } - .shortCut-topleft-inactive span - { - font-variant: normal; - } - .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover - { - text-decoration:none; + .alphaChar{ + width:100%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; } - #shortCut - { - padding-top: 10px; - font-weight: bolder; - color: #b0adab; - } - #shortCut ul - { - list-style-type: none; - float: left; - width: 347px; - margin-left: 100px; - } - #shortCut li - { - display: inline-block; - margin-right: 25px; - float: left; - white-space: nowrap; - } - #shortCut li a - { - color: #b0adab; - } - #shortCut li a:hover - { - color: #44a51c; - } + .flowList{ + vertical-align:top; + } - hr - { - background-color: #E6E6E6; - border: 1px solid #E6E6E6; - height: 1px; - width: 100%; - text-align: left; - margin: 15px 0px 15px 0px; - } + .flowList dl{ + } + .flowList dd{ + display:inline-block; + margin-left:10px; + width:250px; + } + .wrap .content .flowList p{ + padding:0px; + } .content .alignedsummary { margin: 15px; } - pre - { - border: 1px solid #DDDDDD; - -moz-border-radius: 7px 7px 7px 7px; - margin: 0 20px 10px 10px; - padding: 20px 15px 20px 20px; - overflow-x: auto; - } - table, pre - { - -moz-border-radius: 7px 7px 7px 7px; - background-color: #F6F6F6; - border: 1px solid #E6E6E6; - border-collapse: separate; - font-size: 11px; - /*min-width: 395px;*/ - margin-bottom: 25px; - /* display: inline-block;*/ - } - thead - { - margin-top: 5px; - font:600 12px/1.2 Arial; - } - th - { - padding: 5px 15px 5px 15px; - background-color: #E1E1E1; - /* border-bottom: 1px solid #E6E6E6;*/ - border-left: 1px solid #E6E6E6; - /* border-right: 1px solid #E6E6E6;*/ - } - td - { - padding: 3px 15px 3px 20px; - /* border-left: 1px solid #E6E6E6; - border-right: 1px solid #E6E6E6;*/ - } - tr.odd td:hover, tr.even td:hover - { - /* border-right: 1px solid #C3C3C3; - border-left: 1px solid #C3C3C3;*/ - } - - td.rightAlign - { - padding: 3px 5px 3px 10px; - } - table tr.odd - { - border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; - color: #66666E; - } - table tr.even - { - border-left: 1px solid #E6E6E6; - background-color: #ffffff; - color: #66666E; - } - table tr.odd td:hover, table tr.even td:hover - { - background-color: #E6E6E6; - } - - span.comment - { - color: #8B0000; - font-style: italic; - } - span.string, span.char - { - color: #254117; - } + .qmltype { @@ -856,7 +907,6 @@ *.qmlitem p { } - #feedbackBox { display: none; @@ -934,16 +984,14 @@ .toc h3, .generic a { - font: 600 12px/1.2 Arial; + font: bold 12px/1.2 Arial; } .generic{ - /*max-width:75%;*/ } .generic td{ padding:5px; } - .generic .alphaChar{ margin-top:5px; } @@ -991,6 +1039,16 @@ padding-left: 0px; } + .wrap .content .toc h3{ + border-bottom:0px; + margin-top:0px; + } + + .wrap .content .toc h3 a:hover{ + color:#00732F; + text-decoration:none; + } + .wrap .content .toc .level2 { @@ -1007,7 +1065,6 @@ font: normal 10px/1.2 Verdana; background: url(../images/bullet_dn.png) no-repeat 0 5px; } - .relpage { -moz-border-radius: 7px 7px 7px 7px; @@ -1071,6 +1128,24 @@ .functionIndex a{ display:inline-block; } + +/* end content elements */ +/* footer elements */ + + .footer + { + min-height: 100px; + color: #797775; + font: normal 9px/1 Verdana; + text-align: center; + padding-top: 40px; + background-color: #E6E7E8; + margin: 0; + } +/* end footer elements */ + + + /* start index box */ .indexbox @@ -1082,15 +1157,15 @@ .indexboxcont { display: block; - /* overflow: hidden;*/ + } .indexboxbar { background: transparent url(../images/horBar.png ) repeat-x left bottom; margin-bottom: 25px; - /* background-image: none; - border-bottom: 1px solid #e2e2e2;*/ + + } .indexboxcont .section @@ -1141,7 +1216,7 @@ .content .indexboxcont li { - font: normal 600 13px/1 Verdana; + font: normal bold 13px/1 Verdana; } .indexbox a:hover, .indexbox a:visited:hover @@ -1190,87 +1265,285 @@ visibility: hidden; } -.sidebar .search form input.loading -{ - background:url("../images/spinner.gif") no-repeat scroll right center transparent; -} - /* end of screen media */ - -.flowList{ -vertical-align:top; -} -.alphaChar{ -width:100%; -background-color:#F6F6F6; -border:1px solid #E6E6E6; --moz-border-radius: 7px 7px 7px 7px; -font-size:12pt; -padding-left:10px; -margin-top:10px; -margin-bottom:10px; -} -.flowList dl{ -} -.flowList dd{ -display:inline-block; -margin-left:10px; -width:250px; -} -.wrap .content .flowList p{ -padding:0px; -} -pre.highlightedCode { - display: block; - overflow:hidden; -} -.floatingResult{ - z-index:1; - position:relative; - padding-top:0px; - background-color:white; - border:solid 1px black; - height:250px; - width:600px; - overflow-x:hidden; - overflow-y:auto; -} +/* start of offline spec*/ + .offline .wrapper .hd + { + background: url(../images/page.png) no-repeat 0 -15px; + } + .offline .wrapper .bd + { + background: url(../images/bg_l_blank.png) repeat-y 0 0; + } + .offline .wrapper .ft + { + background: url(../images/page.png) no-repeat 0 -90px; + } + .offline .sidebar, + .offline .feedback, + .offline .t_button, + .offline #narrowsearch, + .offline #narrowmenu + { + display: none; + } + .offline .wrap + { + margin: 0 5px 0 5px; + } + .offline .wrap .breadcrumb + { + } - .floatingResult:hover{ - display:block; - } - .floatingResult:hover{ - /*display:none;*/ - } + .offline .wrap .content + { + padding-top: 15px; + } - .wrap .content ol li { - background:none; - font:400 10pt/1 Verdana; - margin-bottom:10px; - margin-left:12px; + +/* end of offline spec*/ + +/* start of creator spec*/ + .creator + { + margin-left:0px; + margin-right:0px; + padding-left:0px; + padding-right:0px; } - .wrap .content ol li { + .creator .wrap .content ol li { list-style-type:decimal; } - .navTop{ - float:right; - display:block; - padding-right:15px; - /*margin-top:10px;*/ + .creator .header .icon, + .creator .feedback, + .creator .t_button, + .creator .feedback, + .creator #feedbackBox, + .creator #feedback, + .creator #blurpage, + .creator .indexbox .indexIcon span, + .creator .wrapper .hd, + .creator .indexbox .indexIcon, + .creator .header #nav-logo, + .creator #offlinemenu, + .creator #offlinesearch, + .creator .header #nav-topright, + .creator .header #shortCut , + .creator .wrapper .hd, + .creator .wrapper .ft, + .creator .sidebar, + .creator .wrap .feedback + { + display:none; + } + + body.creator + { + background: none; + + font: normal 13px/1.2 Verdana; + color: #363534; + background-color: #FFFFFF; + } + + + + .creator .header, .footer, .wrapper + { + max-width: 1500px; + margin: 0px; + } + + .creator .wrapper + { + position:relative; + top:50px; + } + .creator .wrapper .bd + { + + background:#FFFFFF; } + + + .creator .header, .footer + { + display: block; + clear: both; + overflow: hidden; + } + .creator .wrap .content p + + { + line-height: 20px; + padding: 5px; + } + + .creator .header .qtref span + { + background:none; + } + + - .wrap .content .toc h3{ - border-bottom:0px; - margin-top:0px; + .creator .footer + { + border-top:1px solid #E5E5E5; + min-height: 100px; + margin:0px; + } + + .creator .wrap + { + + padding:0 5px 0 5px; + margin: 0px; + } + .creator .wrap .toolbar + { + + + border-bottom:1px solid #E5E5E5; + width:100%, + } + .creator .wrap .breadcrumb ul li a + { + /* color: #363534;*/ + color: #00732F; + } + + .creator .wrap .content + { + padding: 0px; + word-wrap:break-word; + } + + .creator .wrap .content ol li { + background:none; + font: inherit; + padding-left: 0px; + } + + .creator .wrap .content .descr ol li { + margin-left: 45px; + + } + .creator .content .alignedsummary + { + margin: 5px; + width:100%; + } + .creator .generic{ + max-width:75%; + } + .creator .generic td{ + padding:0; } + .creator .indexboxbar + { + border-bottom:1px solid #E5E5E5; + margin-bottom: 25px; + background: none; + } - .wrap .content .toc h3 a:hover{ - color:#00732F; - text-decoration:none; + + + .creator .header + { + width: 100%; + margin: 0; + height: auto; + background-color: #ffffff; + padding: 10px 0 5px 0; + overflow: visible; + border-bottom: solid #E5E5E5 1px; + z-index:1; + + + + + + + + + position:fixed; + } + + + .creator .header .content + { + } + .creator .header .qtref + { + color: #00732F; + position: static; + float: left; + margin-left: 5px; + font: bold 18px/1 Arial; + } + + .creator .header .qtref:visited + { + color: #00732F; + } + .creator .header .qtref:hover + { + color: #00732F; + text-decoration:none; + } + .creator .header .qtref span + { + background-image: none; + text-indent: 0; + text-decoration:none; + } + + + + + + + .creator .wrap .toolbar + { + display:block; + padding-top:0px; + } + + + + .creator .wrap .breadcrumb ul li { + font-weight: normal; + } + + .creator .wrap .breadcrumb ul li a { + /*color: #44a51c;*/ + } + + .creator .wrap .breadcrumb ul li.last a { + /*color: #363534;*/ + } + + .creator #narrowmenu ul + { + border-bottom:solid 1px #E5E5E5; + border-left:solid 1px #E5E5E5; + border-right:solid 1px #E5E5E5; } + + .creator #narrowmenu li ul { + margin-top:-15px; + } + + + .creator .toc { + margin:10px 20px 10px 10px; + } +/* end of creator spec*/ +} + /* end of screen media */ /* start of print media */ diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc new file mode 100755 index 0000000..98096a0 --- /dev/null +++ b/doc/src/tutorials/modelview.qdoc @@ -0,0 +1,938 @@ +/**************************************************************************** +** +** 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 modelview.html + + \startpage {index.html}{Qt Reference Documentation} + \nextpage {modelview-part1.html}{Introduction} + + \title Model/View Contents + \brief An introduction to ModelView programming + + This tutorial gives an introduction to ModelView programming using the Qt + cross-platform framework. + + \image treeview.png + + \omit + It doesn't cover everything; the emphasis is on teaching the programming + philosophy of Model/View programming, and Qt's features are introduced as + needed. Some commonly used features are never used in this tutorial. + \endomit + + In the process, we will learn about some basic technologies provided by Qt, + such as: + + \list + \o The difference between standard and model/view widgets + \o Adapters betweeen forms and models + \o Developing a simple model/view application + \o Intermediate topics such as: + \list + \o Tree views + \o Selection + \o Predefined models + \o Delegates + \o Debugging with model test + \endlist + \endlist + + If you are completely new to Qt, please read \l{How to Learn Qt} if you + have not already done so. + + The tutorial's source code is located in Qt's \c examples/tutorials/modelview + directory. + + \list 1 + \o \l{modelview-part1.html}{Introduction} + \o \l{modelview-part2.html}{Developing a Simple Model/View Application} + \o \l{modelview-part3.html}{Intermediate Topics} + \o \l{modelview-part4.html}{Good Sources of Additional Information} + \endlist + + +*/ + +/*! + \page modelview-part1.html + \contentspage {modelview-index.html}{Model/View Contents} + \previouspage {modelview-index.html}{Model/View Contents} + \nextpage {modelview-part2.html}{Developing a Simple Model/View Application} + \title An Introduction to Model/View Programming + + \section1 1. Introduction + + Model/View is a technology used to separate data from views in widgets that + handle data sets. Standard widgets are not designed for separating data + from views and this is why Qt 4 has two different types of widgets. Both + types of widgets look the same, but they interact with data differently. + + \table + \row + \o Standard widgets use data that is part of the widget. + \o \image standardwidget.png + \row + \o View classes operate on external data (the model) + \o \image modelview.png + \endtable + + \section2 1.1 Standard Widgets + + Let's have a closer look at a standard table widget. A table widget is a 2D + array of the data elements that the user can change. The table widget can + be integrated into a program flow by reading and writing the data elements + that the table widget provides. This method is very intuitive and useful in + many applications. + + Displaying and editing a database table with a standard table widget can be + problematic. Two copies of the data have to be coordinated: one outside the + widget; one inside the widget. The developer needs to know where up-to-date + data is so the both copies contain the most recent data. The tight coupling + of presentation and data makes it harder to write unit tests. + + \section2 1.2 Model/View to the Rescue + + Model/view stepped up to provide a solution that uses a more versatile + architecture. Model/view eliminates the data consistency problems that may + occur with standard widgets. Model/view also makes it easier to use more + than one view of the same data because one model can be passed on to many + views. The most important difference is that model/view widgets do not + store data behind the table cells. In fact, they operate directly from your + data. Since view classes do not know your data's structure, you need to + provide a wrapper to make your data conform to the QAbstractItemModel + interface. A view uses this interface to read from and write to your data + and any class that implements QAbstractItemModel is a model. Once the view + receives a pointer to a model, it will read and display its content and be + its editor. + + \section2 1.3 Overview of the Model/View Widgets + + Here is an overview of the model/view widgets and their corresponding + standard widgets. + + \table + \header + \o Widget + \o Standard Widget (a convenience class with data in + the widget) + \o Model/View View Class (for use with external data) + \row + \o \inlineimage listview.png + \o \l QListWidget + \o \l QListView + \row + \o \inlineimage tableview.png + \o \l QTableWidget + \o \l QTableView + \row + \o \inlineimage treeview.png + \o \l QTreeWidget + \o \l QTreeView + \row + \o \inlineimage columnview.png + \o + \o \l QColumnView shows a tree as a hierarchy of lists + \row + \o \inlineimage combobox.png + \o {2, 1} \l QComboBox can work as both a view class and also + as a traditional widget + \endtable + + \section2 1.4 Using Adapters between Forms and Models + + Having adapters between forms and models can come in handy. + + We often prefer editing data stored in tables (e.g. in database tables) in + forms rather than in tables. There is no direct model/view counterpart for + separating data and views for widgets that operate on one value instead of + a dataset, so we need an adapter in order to connect the form to the source + of data. + + \l QDataWidgetMapper is a great solution because it maps form widgets to a + table row and it makes it very easy to build forms for database tables. + + \image widgetmapper.png + + Another example of an adapter is QCompleter. Qt has QCompleter for + providing auto-completions in Qt widgets such as QComboBox and, as shown + below, QLineEdit. QCompleter uses a model as its data source, so QCompleter, + in itself, is a very handy adapter. + + \image qcompleter.png +*/ + +/*! + \page modelview-part2-main-cpp.html + \title main.cpp + \quotefile tutorials/modelview/1_readonly/main.cpp +*/ + +/*! + \page modelview-part2.html + \contentspage {modelview-index.html}{Model/View Contents} + \previouspage {modelview-part1.html}{Introduction} + \nextpage {modelview-part3.html}{Intermediate Topics} + \title Model/View Chapter 2 - A Simple Model/View Application + + \section1 2. A Simple Model/View Application + + If you want to develop a model/view application, where should you start? We + recommend starting with a simple example and extending it step-by-step. + This makes understanding the architecture a lot easier. Trying to + understand the model/view architecture in detail before invoking the IDE + has proven to be less convenient for many developers. It is substantially + easier to start with a simple model/view application that has demo data. + Give it a try! Simply replace the data in the examples below with your own. + + Below are 7 very simple and independent applications that show different + sides of model/view programming. The source code can be found inside the + \c{examples/tutorials/modelview} directory. + + \section2 2.1 A Read Only Table + + We start with an application that uses a QTableView to show data. We will + add editing capabilities later. + + \snippet examples/tutorials/modelview/1_readonly/main.cpp Quoting ModelView Tutorial + + We have the usual \l {modelview-part2-main-cpp.html}{main()} function: + + \snippet examples/tutorials/modelview/1_readonly/modelview.h Quoting ModelView Tutorial + + The application is a \l QMainWindow that holds a \l QTableView. + + \snippet examples/tutorials/modelview/1_readonly/modelview.cpp Quoting ModelView Tutorial + + Here is the interesting part: We use + \l{QTableView::setModel()}{tableView->setModel(new MyModel(this));} to + instantiate the Model and pass its pointer to \l {QTableView}{tableView()}. + \l{QTableView}{tableView} will invoke the methods of the pointer it has + received to find out two things: + + \list + \o How many rows and columns should be displayed + \o What content should be printed into each cell. + \endlist + + The model needs some code to respond to this. + + We have a table data set, so let's start with QAbstractTableModel since it + is easier to use. + + \snippet examples/tutorials/modelview/1_readonly/mymodel.h Quoting ModelView Tutorial + + QAbstractTableModel requires the implementation of three abstract methods. + + \snippet examples/tutorials/modelview/1_readonly/mymodel.cpp Quoting ModelView Tutorial + + The number of rows and columns is set by + \l{QAbstractItemModel::rowCount()}{MyModel::rowCount()} and + \l{QAbstractItemModel::columnCount()}{MyModel::columnCount()}. + When the view has to know what the cell's text is, it calls the method. + Row and column information is specified with parameter \c index and the + role is set to \l{Qt::ItemDataRole}{Qt::DisplayRole}. Other roles are + covered in the next section. In our example, the data that should be + displayed is generated. In a real application, \c MyModel would have a + member called \c MyData, which serves as the target for all reading and + writing operations. + + This small example demonstrates the passive nature of a model. The model + does not know when it will be used or which data is needed. It simply + provides data each time the view requests it. + + What happens when the model 's data needs to be changed? How does the view + know when data changes and needs to be read again? The model has to emit a + signal that indicates what range of cells has changed. This will be + demonstrated in section 2.3. + + \section2 2.2 Extending the Read Only Example with Roles + + In addition to controlling what text the view displays, the model also + controls the text's appearance. When we slightly change the model, we get + the following result: \image readonlytable_role.png + + In fact, nothing except for the \l{QAbstractItemModel::}{data()} + method needs to be changed to set fonts, background colour, alignment and a + checkbox. + Here is the \l{QAbstractItemModel::data()}{data()} method that produces the + result shown above: + + \snippet examples/tutorials/modelview/2_formatting/mymodel.cpp Quoting ModelView Tutorial + + Each formatting property will be requested from the model with a separate + call to the \l{QAbstractItemModel::data()}{data()} method. The \c role + parameter is used to let the model know which property is being requested: + + \table + \header + \o Role (enum Qt::ItemDataRole ) + \o Meaning + \o Type + \row + \o \l{Qt::ItemDataRole}{Qt::DisplayRole} + \o text + \o QString + \row + \o Qt::FontRole + \o font + \o QFont + \row + \o Qt::BackgroundRole + \o brush for the background of the cell + \o QBrush + \row + \o Qt::TextAlignmentRole + \o text alignment + \o enum Qt::AlignmentFlag + \row + \o {1, 3} Qt::CheckStateRole + \o {1, 3} suppresses checkboxes with \l{QVariant}{QVariant()}, + sets checkboxes with Qt::Checked or Qt::Unchecked + \o {1, 3} \l{Qt::ItemDataRole}{enum Qt::ItemDataRole} + \endtable + + Refer to the Qt namespace documentation to learn more about the + Qt::ItemDataRole enum's capabilities. + + Now we need to determine how using a seperated model impacts the + application's performance, so let's trace how often the view calls the + \l{QAbstractItemModel::}{data()} method. In order to track how often + the view calls the model, we have put a debug statement in the + \l{QAbstractItemModel::}{data()} method, which logs onto stdio. In + our small example, \l{QAbstractItemModel::}{data()} will be called 42 + times. + Each time you hover the cursor over the field, + \l{QAbstractItemModel::}{data()} will be called again \mdash 7 times for + each cell. That's why it is important to make sure that your data is + available when \l{QAbstractItemModel::}{data()} is invoked and expensive + lookup operations are cached. + + \section2 2.3 A Clock inside a Table Cell + + \image clock.png + + We still have a read only table, but this time the content changes every + second because we are showing the current time. + + \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_QVariant + + Something is missing to make the clock tick. We need to tell the view every + second that the time has changed and that it needs to be read again. We do + this with a timer. In the constructor, we set its interval to 1 second and + connect its timeout signal. + + \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_a + + Here is the corresponding slot: + + \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_b + + We ask the view to read the data in the top left cell again by emitting the + \l{QAbstractItemModel::}{dataChanged()} signal. Note that we did not + explicitly connect the \l{QAbstractItemModel::}{dataChanged()} signal to + the view. This happened automatically when we called + \l{QTableView::}{setModel()}. + + \section2 2.4 Setting up Headers for Columns and Rows + + Headers can be hidden via a view method: \c{tableView->verticalHeader()->hide();} + \image header.png + + The header content, however, is set via the model, so we reimplement the + \l{QAbstractItemModel::headerData()}{headerData()} method: + + \snippet examples/tutorials/modelview/4_headers/mymodel.cpp quoting mymodel_c + + + \section2 2.5 The Minimal Editing Example + + In this example, we are going to build an application that automatically + populates a window title with content by repeating values entered into + table cells. + + The model decides whether editing capabilities are available . We only have + to modify the model in order for the available editing capabilities to be + enabled. This is done by reimplementing the following virtual methods: + \l{QAbstractItemModel::}{setData()} and \l{QAbstractItemModel::}{flags()}. + + \snippet examples/tutorials/modelview/5_edit/mymodel.h Quoting ModelView Tutorial + + We use \c QStringList m_gridData to store our data. This makes + \c m_gridData the core of MyModel. The rest of \c MyModel acts like a + wrapper and adapts \c m_gridData to the QAbstractItemModel interface. We + have also introduced the \c editCompleted() signal, + which makes it possible to transfer the modified text to the window title. + + \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_d + + In the constructor, we fill \c QStringList gridData with 6 items (one item + for every field in the table): + + \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_e + + \l{QAbstractItemModel::setData()}{setData()} will be called each time the + user edits a cell. The \c index parameter tells us which field has been + edited and \c value provides the result of the editing process. The role + will always be set to \c Qt::EditRole because our cells only contain text. + If a checkbox were present and user permissions are set to allow the + checkbox to be selected, calls would also be made with the role set to + \c Qt::CheckStateRole. + + \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_f + + Various properties of a cell can be adjusted with + \l{QAbstractItemModel::flags()}{flags()}. Returning + \c Qt::ItemIsEditable | \c Qt::ItemIsEnabled is enough to show an editor + that a cell has been selected. If editing one cell modifies more data than + the data in that particular cell, the model must emit a + \l{QAbstractItemModel::}{dataChanged()} signal in order for the data that + has been changed to be read. +*/ + +/*! + \page modelview-part3.html + \contentspage {modelview-index.html}{Model/View Contents} + \previouspage {modelview-part2.html}{Developing a Simple Model/View Application} + \nextpage {modelview-part4.html}{Good Sources of Additional Information} + \title Model/View Chapter 3 - Intermediate Topics + + \section1 3. Intermediate Topics + + \section2 3.1 TreeView + + You can convert the example above into an application with a tree view. + Simply replace QTableView with QTreeView, which results in a read/write + tree. No changes have to be made to the model. The tree won't have any + hierarchies because there aren't any hierarchies in the model itself. + \image dummy_tree.png + + + QListView, QTableView and QTreeView all use a model abstraction, which is a + merged list, table and tree. This makes it possible to use several different + types of view classes from the same model. + \image list_table_tree.png + + + This is how our example model looks so far: + \image example_model.png + + + We want to present a real tree. We have wrapped our data in the examples + above in order to make a model. This time we use QStandardItemModel, which + is a container for hierarchical data that also implements + QAbstractItemModel. To show a tree, QStandardItemModel must be populated + with \l{QStandardItem}{QStandardItems}, which are able to hold all the + standard properties of items like text, fonts, checkboxes or brushes. + \image tree_2_with_algorithm.png + + \snippet examples/tutorials/modelview/6_treeview/modelview.cpp Quoting ModelView Tutorial + + We simply instantiate a QStandardItemModel and add a couple of + \l{QStandardItem}{QStandardItems} to the constructor. We can then make a + hierarchical data structure because a QStandardItem can hold other + \l{QStandardItem}{QStandardItems}. Nodes are collapsed and expanded within + the view. + + \section2 3.2 Working with Selections + + We want to access a selected item's content in order to output it into the + window title together with the hierarchy level. + \image selection2.png + + So let's create a couple of items: + + \snippet examples/tutorials/modelview/7_selections/modelview.cpp quoting modelview_a + + Views manage selections within a separate selection model, which can be + retrieved with the \l{QAbstractItemView::}{selectionModel()} + method. We retrieve the selection Model in order to connect a slot to its + \l{QAbstractItemView::}{selectionChanged()} signal. + + \snippet examples/tutorials/modelview/7_selections/modelview.cpp quoting modelview_b + + We get the model index that corresponds to the selection by calling + \l{QItemSelectionModel::currentIndex()}{treeView->selectionModel()->currentIndex()} + and we get the the field's string by using the model index. Then we just + calculate the item's \c hierarchyLevel. Top level items do not have + parents and the \l{QAbstractItemModel::}{parent()} method will return a + default constructed \l{QModelIndex}{QModelIndex()}. This is why we use the + \l{QAbstractItemModel::}{parent()} method to iterate to the top level while + counting the steps performed during iteration. + + The selection model (as shown above) can be retrieved, but it can also be + set with \l{QAbstractItemView}{QAbstractItemView::setSelectionModel}. This + is how it's possible to have 3 view classes with synchronised selections + because only one instance of a selection model is used. The instance of a + selection model is retrieved from the first view class with + \l{QAbstractItemView::}{selectionModel()} and the result is assigned to the + second and third view class with \l{QAbstractItemView::}{setSelectionModel()}. + + \section2 3.3 Predefined Models + + The typical way to use model/view is to wrap specific data to make it + usable with view classes. Qt, however, also provides predefined models for + common underlying data structures. If one of the available data structures + is suitable for your application, a predefined model can be a good choice. + + \table + \row + \o QStringListModel + \o Stores a list of strings + \row + \o QStandardItemModel + \o Stores arbitrary hierarchical items + \row + \o QFileSystemModel\br + QDirModel + \o Encapsulate the local file system + \row + \o QSqlQueryModel + \o Encapsulate an SQL result set + \row + \o QSqlTableModel + \o Encapsulates an SQL table + \row + \o QSqlRelationalTableModel + \o Encapsulates an SQL table with foreign keys + \row + \o QSortFilterProxyModel + \o Sorts and/or filters another model + + \endtable + + \section2 3.4 Delegates + + In all examples so far, data is presented as text or a checkbox in a cell + and is edited as text or a checkbox. The component that provides these + presentation and editing services is called a \e delegate. We are only just + beginning to work with the delegate because the view uses a default + delegate. But imagine that we want to have a different editor.(e.g. a + slider or a drop down list) Or imagine that we want to present data as + graphics. Let's take a look at an example called + \l{Star Delegate Example}{Star Delegate}, in which stars are used to show + a rating: + \image stardelegate.png + + The view has a method that replaces the default delegate and installs a + custom delegate. This method is called + \l{QAbstractItemView::}{setItemDelegate()}. A new delegate can be written + by creating a class that inherits from QStyledItemDelegate. In order to + write a delegate that displays stars and has no input capabilities, we only + need to overwrite 2 methods. + + \code + class StarDelegate : public QStyledItemDelegate + { + Q_OBJECT + public: + StarDelegate(QWidget *parent = 0); + void paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index) const; + QSize sizeHint(const QStyleOptionViewItem &option, + const QModelIndex &index) const; + }; + \endcode + + \l{QStyledItemDelegate::}{paint()} draws stars depending on the content + of the underlying data. The data can be looked up with parameter + \l{QModelIndex::data()}{index.data()}. + \l{QAbstractItemDelegate::}{sizeHint()} specifies each star's dimensions + so the the cell will provide enough height and width to accommodate the + stars. + + Writing custom delegates is the right choice if you want to show your data + with a custom graphical representation inside the grid of the view class. + If you want to leave the grid, you can write a custom view class. + + \section2 3.5 Debugging with ModelTest + + The passive nature of models provides new challenges for programmers. + Inconsistencies in the model can cause the application to crash. Since the + model is hit by numerous calls from the view, it is hard to find out which + call has crashed the application and which operation has introduced the + problem. + + Qt provides software called + \l{http://labs.qt.nokia.com/page/Projects/Itemview/Modeltest}{ModelTest}, + which checks models while your programming is running. Every time the model + is changed, ModelTest scans the model and reports errors with an assert. + This is especially important for tree models, since their hierarchical + nature leaves many possibilities for subtle inconsistencies. + + Unlike view classes, ModelTest uses out of range indexes to test the model. + This means your application may crash with ModelTest even if it runs + perfectly without it. So you also need to handle all of the indexes that + are out of range when using ModelTest. + + + \section2 3.6 Model/View NG + + \raw HTML + <table style="background-color:white;border:none;font: normal 13px/1.2 Verdana;"> + <tr><td align="left" valign="top" style="background-color:white;border:none;padding:5px;"> + \endraw + + \raw HTML + <!-- wrap content table p has 0 padding and the padding for p outside of the table is 5px--> + \endraw + + Model/View was introduced in Qt 4.0 and is a frequently used technology. + Feedback from developers and new development trends have shown that there + is a need to further develop the model/view technology. Therefore a + research project originated at Nokia is looking into ways to go beyond the + current implementation. + + One limitation of model/view is that view classes are basically all fixed + grids. It is possible, but really hard to make a list view with icons + placed on a curve; or cells expanding on mouse over events to show + additional information. + In order to achieve graphically rich view experiences, Model/View NG will + use QGraphicsView to render elements. Nodel/View NG also aims to make + model/view programming more intuitive. One way to achieve this is to have + separate models for lists, tables and trees. The current model abstraction + is complex because it is capable of representing a list, a table or a tree. + + Model/View NG is a research project. You are welcome to checkout the source + code, monitor progress and take part in discussions at the following + address: \l{http://labs.qt.nokia.com/page/Projects/Itemview/ItemviewsNG} + + \raw HTML + </td><td align="right" valign="top"> + \endraw + + \inlineimage path.png + + \raw HTML + </td></tr></table> + \endraw +*/ + +/*! + \page modelview-part4.html + \contentspage {modelview-index.html}{Model/View Contents} + \previouspage {modelview-part3.html}{Intermediate Topics} + \title Model/View Chapter 4 - Good Sources of Additional Information + + \section1 4. Good Sources of Additional Information + + \section2 4.1 Books + + Model/View programming is covered quite extensively in the documentation of + Qt but also in several good books. + + \list 1 + \o \bold{C++ GUI Programming with Qt 4} / Jasmin Blanchette, Mark Summerfield, + \e{Prentice Hall, 2nd edition}, ISBN 0-13-235416-0. Also available in + German: C++ GUI Programmierung mit Qt 4: Die offizielle Einführung, + \e{Addison-Wesley}, ISBN 3-827327-29-6 + \o \bold{The Book of Qt4, The Art of Building Qt Applications} / Daniel Molkentin, + \e{Open Source Press}, ISBN 1-59327-147-6. + Translated from \bold{Qt 4, Einführung in die Applikationsentwicklung}, + \e{Open Source Press}, ISBN 3-937514-12-0. + \o \bold{Foundations of Qt Development} / Johan Thelin, \e{Apress}, ISBN 1-59059-831-8. + \endlist + + More information about these books is available on the + \l{Books about Qt Programming}{Qt Web site}. + + The following list provides an overview of example programs contained in the + books above. Some of them make very good templates for developing similar + applications. + + \table + \header + \o example name + \o view class used + \o model used + \o aspects touched + \o + \row + \o Team Leaders + \o QListview + \o QStringListModel + \o + \o Book 1, Chapter 10, Figure 10.6 + \row + \o Directory Viewer + \o QTreeView + \o QDirModel + \o + \o Book 1, Chapter 10, Figure 10.7 + \row + \o Color Names + \o QListView + \o QSortFilterProxyModel + applied to QStringListModel + \o + \o Book 1, Chapter 10, Figure 10.8 + \row + \o Currencies + \o QTableView + \o custom model based on + QAbstractTableModel + \o read only + \o Book 1, Chapter 10, Figure 10.10 + \row + \o Cities + \o QTableView + \o custom model based on + QAbstractTableModel + \o read / write + \o Book 1, Chapter 10, Figure 10.12 + \row + \o Boolean Parser + \o QTreeView + \o custom model based on + QAbstractItemModel + \o read only + \o Book 1, Chapter 10, Figure 10.14 + \row + \o Track Editor + \o {2, 1} QTableWidget + \o custom delegate providing a custom editor + \o Book 1, Chapter 10, Figure 10.15 + + \row + \o Four directory views + \o QListView + QTableView + QTreeView + \o QDirModel + \o demonstrates the use of multiple views + \o Book2, Chapter 8.2 + \row + \o Address Book + \o QListView + QTableView + QTreeView + \o custom model based on + QAbstractTableModel + \o read / write + \o Book2, Chapter 8.4 + \row + \o Address Book with sorting + \o + \o QProxyModel + \o introducing sort and filter capabilities + \o Book2, Chapter 8.5 + \row + \o Address Book + with checkboxes + \o + \o + \o introducing checkboxes in model/view + \o Book2, Chapter 8.6 + \row + \o Address Book with transposed grid + \o + \o custom proxy Model based on QAbstractProxyModel + \o introducing a custom model + \o Book2, Chapter 8.7 + \row + \o Address Book with drag and drop + \o + \o + \o introducing drag and drop support + \o Book2, Chapter 8.8 + \row + \o Address Book with custom editor + \o + \o + \o introducing custom delegates + \o Book2, Chapter 8.9 + \row + \o Views + \o QListView + QTableView + QTreeView + \o QStandardItemModel + \o read only + \o Book 3, Chapter 5, figure 5-3 + \row + \o Bardelegate + \o QTableView + \o + \o custom delegate for presentation based on QAbstractItemDelegate + \o Book 3, Chapter 5, figure 5-5 + \row + \o Editdelegate + \o QTableView + \o + \o custom delegate for editing based on QAbstractItemDelegate + \o Book 3, Chapter 5, figure 5-6 + \row + \o Singleitemview + \o custom view based on QAbstractItemView + \o + \o custom view + \o Book 3, + Chapter 5, + figure 5-7 + \row + \o listmodel + \o QTableView + \o custom Model based on QAbstractTableModel + \o read only + \o Book 3, Chapter 5, Figure 5-8 + \row + \o treemodel + \o QTreeView + \o custom Model based on QAbstractItemModel + \o read only + \o Book 3, Chapter 5, Figure 5-10 + \row + \o edit integers + \o QListView + \o custom Model based on QAbstractListModel + \o read / write + \o Book 3, Chapter 5, Listing 5-37, Figure 5-11 + \row + \o sorting + \o QTableView + \o QSortFilterProxyModel applied to QStringListModel + \o demonstrates sorting + \o Book 3, Chapter 5, Figure 5-12 + \endtable + + + \section2 4.2 Qt Documentation + + Qt 4.7 comes with 17 examples and 2 Demonstrations for model/view. + The examples can be found here: \l{Item Views Examples} + \table + \header + \o Example name + \o View class used + \o Model used + \o Aspects touched + \row + \o Address Book + \o QTableView + \o QAbstractTableModel + QSortFilterProxyModel + \o usage of QSortFilterProxyModel to generate different + subsets from one data pool + \row + \o Basic Sort/Filter Model + \o QTreeView + \o QStandardItemModel + QSortFilterProxyModel + \o + \row + \o Chart + \o custom view + \o QStandardItemModel + \o designing custom views that cooperate with selection models + \row + \o Color Editor Factory + \o {2, 1} QTableWidget + \o enhancing the standard delegate with a new custom editor to choose colours + \row + \o Combo Widget Mapper + \o QDataWidgetMapper to map QLineEdit, QTextEdit and QComboBox + \o QStandardItemModel + \o shows how a QComboBox can serve as a view class + \row + \o Custom Sort/Filter Model + \o QTreeView + \o QStandardItemModel + QSortFilterProxyModel + \o subclass QSortFilterProxyModel for advanced sorting and filtering + \row + \o Dir View + \o QTreeView + \o QDirModel + \o very small example to demonstrate how to assign a model to a view + \row + \o Editable Tree Model + \o QTreeView + \o custom tree model + \o comprehensive example for working with trees, demonstrates + editing cells and tree structure with an underlying custom + model + \row + \o Fetch More + \o QListView + \o custom list model + \o dynamically changing model + \row + \o Frozen Column + \o QTableView + \o QStandardItemModel + \o + \row + \o Pixelator + \o QTableView + \o custom table model + \o implementation of a custom delegate + \row + \o Puzzle + \o QListView + \o custom list model + \o model/view with drag and drop + \row + \o Simple DOM Model + \o QTreeView + \o custom tree model + \o read only example for a custom tree model + \row + \o Simple Tree Model + \o QTreeView + \o custom tree model + \o read only example for a custom tree model + \row + \o Simple Widget Mapper + \o QDataWidgetMapper to map QLineEdit, QTextEdit and QSpinBox + \o QStandardItemModel + \o basic QDataWidgetMapper usage + \row + \o Spin Box Delegate + \o QTableView + \o QStandardItemModel + \o custom delegate that uses a spin box as a cell editor + \row + \o Star Delegate + \o {2, 1} QTableWidget + \o comprehensive custom delegate example. + \endtable + + \l{Qt Demonstrations}{Demonstrations} are similar to examples except + that no walkthrough is provided for the code. Demonstrations are also + sometimes more feature rich. + + \list + \o The \bold Interview demonstration shows the same model and + selection being shared between three different views. + \o Demonstration \bold Spreadsheet demonstrates the use of a + table view as a spreadsheet, using custom delegates to render + each item according to the type of data it contains. + \endlist + + A \l{Model/View Programming}{reference document} for model/view technology + is also available. +*/ |