diff options
author | Jerome Pasion <jerome.pasion@nokia.com> | 2011-02-07 14:45:09 (GMT) |
---|---|---|
committer | Jerome Pasion <jerome.pasion@nokia.com> | 2011-02-07 14:45:09 (GMT) |
commit | d7a91cfe8683309883694fbbf508e5fc42d44165 (patch) | |
tree | 95e248d34d10015778f7a00477c59e265501d443 /doc | |
parent | b7aa20e56b3ed45cf00d8a57696e6d8ac803f9b4 (diff) | |
parent | c39b3d42dda26b1f9576906cd001236c9d96e06a (diff) | |
download | Qt-d7a91cfe8683309883694fbbf508e5fc42d44165.zip Qt-d7a91cfe8683309883694fbbf508e5fc42d44165.tar.gz Qt-d7a91cfe8683309883694fbbf508e5fc42d44165.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Conflicts:
doc/src/declarative/propertybinding.qdoc
src/declarative/util/qdeclarativeview.cpp
Diffstat (limited to 'doc')
28 files changed, 615 insertions, 79 deletions
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index 3d3d814..055f437 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -66,10 +66,16 @@ To dynamically load a component defined in a QML file, call the This function takes the URL of the QML file as its only argument and creates a \l Component object from this URL. -Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of -the component. This function takes exactly one argument, which is the parent for the new item. Since graphical items will -not appear on the scene without a parent, it is recommended that you set the parent this way. However, if you wish to set -the parent later you can safely pass \c null to this function. +Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of +the component. This function can take one or two arguments: +\list +\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is + recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to + this function. +\o The second is optional and is a script which assigns values to the item's properties during creation. This avoids warnings + when certain properties have been bound to before they have been set by the code. Additionally, there are small performance + benefits when instantiating objects in this way. +\endlist Here is an example. First there is \c Sprite.qml, which defines a simple QML component: diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index e03557b..be2d0c7 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -136,7 +136,8 @@ The examples can be found in Qt's \c examples/declarative directory. \section2 Positioners \list -\o \l{declarative/positioners}{Example} +\o \l{declarative/positioners/addandremove}{Adding and Removing Items} +\o \l{declarative/positioners/layoutdirection}{Layout Direction} \endlist \section2 Key Interaction diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 8c6e68a..0cbdd11 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -116,6 +116,75 @@ Person { \l {Extending QML - Adding Types Example} shows the complete code used to create the \c Person type. +\section1 QML Type Versioning + +In C++ adding a new method or property cannot break old applications. +In QML, however, new methods and properties can change what a name previously +resolved to to within a scope chain. + +For example, consider these two QML files + +\code +// main.qml +import QtQuick 1.0 +Item { + id: root + MyComponent {} +} +\endcode + +\code +// MyComponent.qml +import MyModule 1.0 +CppItem { + value: root.x +} +\endcode + +where CppItem maps to the C++ class QCppItem. + +If the author of QCppItem adds a "root" property to QCppItem in a new version of the module, +it will break the above program as \c root.x now resolves to a different value. +The solution is to allow the author of QCppItem to state that the new \c root property is +only available from a particular version of QCppItem onwards. This permits new properties +and features to be added to existing elements without breaking existing programs. + +QML enables this by allowing the properties, methods and signals of a class to be tagged with +a particular \e revision, so that they are only accessible if the relevant module version +is imported. In this case, the author can tag the \c root property as being added in +\e {revision 1} of the class, and register that revision in version 1.1 of the module. + +The REVISION tag is used to mark the \c root property as added in revision 1 of the class. +Methods such as Q_INVOKABLE's, signals and slots can also be tagged for a +revision using the \c Q_REVISION(x) macro: + +\code +class CppItem : public QObject +{ + Q_OBJECT + Q_PROPERTY(int root READ root WRITE setRoot NOTIFY rootChanged REVISION 1) + +signals: + Q_REVISION(1) void rootChanged(); +}; +\endcode + +To register the new class revision to a particular version the following function is used: + +\code +template<typename T, int metaObjectRevision> +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +\endcode + +To register \c CppItem version 1 for \c {MyModule 1.1}: + +\code +qmlRegisterType<QCppItem,1>("MyModule", 1, 1, "CppItem") +\endcode + +\c root is only available when MyModule 1.1 is imported. + + \section1 Object and List Property Types \snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0 diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index 2568f81..85a3a25 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -141,8 +141,9 @@ using the Offline Storage API. \section3 db = openDatabaseSync(identifier, version, description, estimated_size, callback(db)) Returns the database identified by \e identifier. If the database does not already exist, it -is created with the properties \e description and \e estimated_size and the function \e callback -is called with the database as a parameter. +is created, and the function \e callback is called with the database as a parameter. \e description +and \e estimated_size are written to the INI file (described below), but are otherwise currently +unused. May throw exception with code property SQLException.DATABASE_ERR, or SQLException.VERSION_ERR. @@ -153,7 +154,7 @@ When a database is first created, an INI file is also created specifying its cha \row \o Name \o The name of the database passed to \c openDatabase() \row \o Version \o The version of the database passed to \c openDatabase() \row \o Description \o The description of the database passed to \c openDatabase() -\row \o EstimatedSize \o The estimated size of the database passed to \c openDatabase() +\row \o EstimatedSize \o The estimated size (in bytes) of the database passed to \c openDatabase() \row \o Driver \o Currently "QSQLITE" \endtable diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc index d221205..65877f9 100644 --- a/doc/src/declarative/javascriptblocks.qdoc +++ b/doc/src/declarative/javascriptblocks.qdoc @@ -200,37 +200,12 @@ Likewise, the \l {Component::onDestruction} attached property is triggered on component destruction. -\section1 Property Assignment vs Property Binding +\section1 JavaScript and Property Binding -When working with both QML and JavaScript, it is important to differentiate between -QML \l {Property Binding} and JavaScript value assignment. In QML, a property -binding is created using the \e {property: value} syntax: +Property bindings can be created in JavaScript by assigning the property with a \c function +that returns the required value. -\code -Rectangle { - width: otherItem.width -} -\endcode - -The \c width of the above \l Rectangle is updated whenever \c otherItem.width changes. On the other -hand, take the following JavaScript code snippet, that runs when the \l Rectangle is created: - -\code -Rectangle { - - Component.onCompleted: { - width = otherItem.width; - } -} -\endcode - -The \c width of this \l Rectangle is \e assigned the value of \c otherItem.width using the -\e {property = value} syntax in JavaScript. Unlike the QML \e {property: value} syntax, this -does not invoke QML property binding; the \c rectangle.width property is set to the value -of \c otherItem.width at the time of the assignment and will not be updated if that value -changes. - -See \l {Property Binding} for more information. +See \l {Binding Properties from JavaScript} for details. \section1 Receiving QML Signals in JavaScript @@ -315,10 +290,13 @@ This restriction exists as the QML environment is not yet fully established. To run code after the environment setup has completed, refer to \l {Running JavaScript at Startup}. -\o The value of \c this is currently undefined in QML +\o The value of \c this is currently undefined in QML in the majority of contexts + +The \c this keyword is supported when \l {Binding Properties from JavaScript} +{binding properties from JavaScript}. In all other situations, the value of +\c this is undefined in QML. -The value of \c this is undefined in QML. To refer to any element, provide -an \c id. For example: +To refer to any element, provide an \c id. For example: \qml Item { diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index a93c830..27653bd 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -229,6 +229,7 @@ Accessing the aliasing property is similar to accessing a regular property. In addition, the optional \c default keyword indicates that the aliasing property is a \l{Default Properties}{default property}. +<<<<<<< HEAD \snippet doc/src/snippets/declarative/Button.qml property alias When importing the component as a \c Button, the \c buttonlabel is directly accessible through the \c label property. diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 7d89056..70228b1 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -166,7 +166,7 @@ while QAbstractItemModel provides a more flexible solution for more complex models. -\section2 QStringList +\section2 QStringList-based model A model may be a simple QStringList, which provides the contents of the list via the \e modelData role. @@ -187,7 +187,7 @@ have changed. If the QStringList changes, it will be necessary to reset the model by calling QDeclarativeContext::setContextProperty() again. -\section2 QList<QObject*> +\section2 QObjectList-based model A list of QObject* values can also be used as a model. A QList<QObject*> provides the properties of the objects in the list as roles. diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc index e3afd43..2e3cdc7 100644 --- a/doc/src/declarative/qmlviewer.qdoc +++ b/doc/src/declarative/qmlviewer.qdoc @@ -192,6 +192,9 @@ Rectangle { } \endqml +\note Since Qt Quick 1.1 this information is accessible outside of the QML Viewer, +through the \c active property of the \l {QML:Qt::application}{Qt.application} object. + \row \o \c runtime.orientation diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index e8a1c24..4a6f6a9 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -85,6 +85,21 @@ Returns the QML type id. + There are two forms of this template function: + + \code + template<typename T> + int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName); + + template<typename T, int metaObjectRevision> + int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName); + \endcode + + The former is the standard form which registers the type \e T as a new type. + The latter allows a particular revision of a class to be registered in + a specified version (see \l {QML Type Versioning}). + + For example, this registers a C++ class \c MySliderItem as a QML type named \c Slider for version 1.0 of a \l{QML Modules}{module} called "com.mycompany.qmlcomponents": diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc index a3ba522..f4359f9 100644 --- a/doc/src/declarative/whatsnew.qdoc +++ b/doc/src/declarative/whatsnew.qdoc @@ -29,7 +29,113 @@ \title What's new in Qt Quick \page qtquick-whatsnew.html -\section1 4.7.1 +\section1 Qt 4.7.3 includes QtQuick 1.1 + +QtQuick 1.1 is a minor feature update. + +\section2 PinchArea + +PinchArea provides support for the common two finger pinch gesture. + +\section2 Text + +Added the following properties: +\list +\o lineSpacing +\o lineCount +\o maximumLineCount +\o truncated +\endlist + +horizontalAlignment now accepts Text.AlignJustify alignment mode. + +\section2 TextEdit + +Added the following properties, methods and signal handlers: +\list +\o canPaste +\o lineCount +\o deselect() +\o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word +\o onLinkActivated(string link) +\endlist + +\section2 TextInput + +Added the following properties and methods: +\list +\o canPaste +\o deselect() +\o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word +\endlist + +\section2 Image, BorderImage and AnimatedImage + +Added the following properties: +\list +\o cache +\o mirror +\endlist + +\section2 Item + +Added the following properties: +\list +\o implicitWidth and implicitHeight +\endlist + +\section2 Flickable + +Added the following methods: +\list +\o resizeContent(qreal w, qreal h, QPointF center) +\o returnToBounds() +\endlist + +\section2 ListView and GridView + +Added the following methods: +\list +\o positionViewAtBeginning() +\o positionViewAtEnd() +\endlist + +\section2 Flow, Grid, Row + +Added the following properties: +\list +\o layoutDirection +\endlist + +\section2 Repeater + +Added the following methods and signal handlers: +\list +\o onItemAdded() +\o onItemRemoved() +\o itemAt(int index) +\endlist + +\section2 Component + +The createObject() method now accepts a map of initial property values for the created object. + +\section2 Qt + +Added the following properties and methods: +\list +\o application.layoutDirection +\o application.active +\endlist + +\section2 Other changes + +\list +\o Functions can be assigned to properties from JavaScript to create property bindings +\endlist + + +\section1 Qt 4.7.1 \section2 QtQuick namespace diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index c33e777..9a46ea8 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -555,7 +555,8 @@ \c qmake output will be a Makefile. \o \c -project \BR \c qmake output will be a project file. \BR -\bold{Note:} It is likely that the created file will need to be edited for example adding the \c QT variable to suit what modules are required for the project. + \bold{Note:} It is likely that the created file will need to be edited; for example, + adding the \c QT variable to suit what modules are required for the project. \endlist The following \c options are used to specify both general and mode-specific diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc index 34429ae..8924bdb 100644 --- a/doc/src/development/qtestlib.qdoc +++ b/doc/src/development/qtestlib.qdoc @@ -130,7 +130,7 @@ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 1 - If you are using other buildtools, make sure that you add the location + If you are using other build tools, make sure that you add the location of the QTestLib header files to your include path (usually \c{include/QtTest} under your Qt installation directory). If you are using a release build of Qt, link your test to the \c QtTest library. For debug builds, use diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc index 11b99f3..0110e29 100644 --- a/doc/src/examples/basicgraphicslayouts.qdoc +++ b/doc/src/examples/basicgraphicslayouts.qdoc @@ -133,19 +133,19 @@ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 2 - The reimplementation of {QGraphicsItem::boundingRect()}{boundingRect()} + The reimplementation of \l{QGraphicsItem::}{boundingRect()} will set the top left corner at (0,0), and the size of it will be the size of the layout items - {QGraphicsLayoutItem::geometry()}{geometry()}. This is the area that + \l{QGraphicsLayoutItem::}{geometry()}. This is the area that we paint within. \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 3 - The reimplementation of {QGraphicsLayoutItem::setGeometry()}{setGeometry()} + The reimplementation of \l{QGraphicsLayoutItem::setGeometry()}{setGeometry()} simply calls its baseclass implementation. However, since this will change the boundingRect we must also call - {QGraphicsItem::prepareGeometryChange()}{prepareGeometryChange()}. + \l{QGraphicsItem::prepareGeometryChange()}{prepareGeometryChange()}. Finally, we move the item according to \c geom.topLeft(). \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 4 diff --git a/doc/src/examples/concentriccircles.qdoc b/doc/src/examples/concentriccircles.qdoc index dc17871..315469b 100644 --- a/doc/src/examples/concentriccircles.qdoc +++ b/doc/src/examples/concentriccircles.qdoc @@ -192,7 +192,7 @@ \snippet examples/painting/concentriccircles/window.h 0 - We declare the various components of the main window, i.e the text + We declare the various components of the main window, i.e., the text labels and a double array that will hold reference to the four \c {CircleWidget}s. In addition we declare the private \c createLabel() function to simplify the constructor. diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc index bc45db3..8739270 100644 --- a/doc/src/examples/drilldown.qdoc +++ b/doc/src/examples/drilldown.qdoc @@ -444,7 +444,7 @@ Finally, we store the location ID that this particular record is associated with as well as a z-value. In the \l {Graphics View Framework}, an item's z-value determines its position in the item - stack. An item of high Z-value will be drawn on top of an item + stack. An item of high z-value will be drawn on top of an item with a lower z-value if they share the same parent item. We also provide an \c updateItemPosition() function to refresh the view when required. diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc index d6676e8..bba6d90 100644 --- a/doc/src/examples/elasticnodes.qdoc +++ b/doc/src/examples/elasticnodes.qdoc @@ -77,12 +77,12 @@ function is called to calculate the forces that push and pull on this node and its neighbors. - The \c Node class also reimplements - \l{QGraphicsItem::itemChange()}{itemChange()} to react to state changes (in - this case, position changes), and - \l{QGraphicsItem::mousePressEvent()}{mousePressEvent()} and - \l{QGraphicsItem::mouseReleaseEvent()}{mouseReleaseEvent()} to update the - item's visual appearance. + The \c Node class also reimplements + \l{QGraphicsItem::itemChange()}{itemChange()} to react to state changes (in + this case, position changes), and + \l{QGraphicsItem::mousePressEvent()}{mousePressEvent()} and + \l{QGraphicsItem::mouseReleaseEvent()}{mouseReleaseEvent()} to update the + item's visual appearance. We will start reviewing the \c Node implementation by looking at its constructor: @@ -242,7 +242,7 @@ The \c adjust() function repositions the edge, and the item also implements \l{QGraphicsItem::boundingRect()}{boundingRect()} and - \{QGraphicsItem::paint()}{paint()}. + \l{QGraphicsItem::paint()}{paint()}. We will now review its implementation. diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc index 4121904..b46903d 100644 --- a/doc/src/examples/fancybrowser.qdoc +++ b/doc/src/examples/fancybrowser.qdoc @@ -118,7 +118,7 @@ using CSS. \snippet examples/webkit/fancybrowser/mainwindow.cpp 8 - + The \c rotateImages() function rotates the images on the current web page. Webkit supports CSS transforms and this JavaScript code looks up all \e {img} elements and rotates the images 180 degrees @@ -127,7 +127,7 @@ \snippet examples/webkit/fancybrowser/mainwindow.cpp 9 The remaining four methods remove different elements from the current web - page. \c removeGifImages() removes all Gif images on the page by looking up + page. \c removeGifImages() removes all GIF images on the page by looking up the \e {src} attribute of all the elements on the web page. Any element with a \e {gif} file as its source is removed. \c removeInlineFrames() removes all \e {iframe} or inline elements. \c removeObjectElements() removes all diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index dd1206b..85b87ea 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -270,16 +270,26 @@ */ /*! - \title Positioners Example - \example declarative/positioners + \title Positioners: Adding and Removing Items Example + \example declarative/positioners/addandremove - This example shows how to use positioner elements such as \l Row, \l Column, - \l Grid and \l Flow. + This example shows how to use the positioner elements such as \l Row, \l Column, + \l Grid and \l Flow, in particular how to add and remove items with appropriate transitions. \image qml-positioners-example.png */ /*! + \title Positioners: Layout Direction Example + \example declarative/positioners/layoutdirection + + This example shows how to control the horizontal layout direction of + \l Row, \l Grid and \l Flow positioners. + + \image qml-positioners-layoutdirection-example.png +*/ + +/*! \title Key Interaction: Focus Example \example declarative/keyinteraction/focus diff --git a/doc/src/examples/qml-folderlistmodel.qdoc b/doc/src/examples/qml-folderlistmodel.qdoc index c9d248e..0a01ce0 100644 --- a/doc/src/examples/qml-folderlistmodel.qdoc +++ b/doc/src/examples/qml-folderlistmodel.qdoc @@ -41,10 +41,15 @@ making the model available to QML. \section1 Usage from QML -The type we are creating can be used from QML like this: +The FolderListModel can be used from QML like this: \snippet doc/src/snippets/declarative/folderlistmodel.qml 0 +This displays a list of all subfolders and QML files in the current folder. + +The FolderListModel \c folder property can be set to change the folder that +is currently displayed. + \section1 Defining the Model We are subclassing QAbstractListModel which will allow us to give data to QML and diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index d39bb39..c906f84 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -1298,3 +1298,290 @@ We hope you will enjoy using Qt. \sa {Known Issues} */ + +/*! + \page configure-options.html + \title Configure options for Qt + \ingroup installation + \brief Brief description of available options building Qt. + + This page gives a brief description of the different options + available when building Qt using configure. To build Qt using + default options, just call configure from the command line like + showed below. If you would like to customize your build, please + use the options listed in the following tables. + + \c {.\configure.exe} + + \section2 Cross platform options: + + \table + \header \o Option \o Description \o Note + \row \o \c {-buildkey } <key> \o Build the Qt library and plugins + using the specified \o + \row \o \c {<key>} \o When the library loads plugins, it will only + load those that have a matching <key>. \o + \row \o \c {-release } \o Compile and link Qt with debugging turned off. \o + \row \o \c {-debug } \o Compile and link Qt with debugging turned on. + \o Defualt value. + \row \o \c {-debug-and-release} \o Compile and link two Qt libraries, + with and without debugging turned on. \o This option denotes a default + value and needs to be evaluated. If the evaluation succeeds, the + feature is included. + \row \o \c {-opensource} \o Compile and link the Open-Source Edition + of Qt. \o + \row \o \c {-commercial } \o Compile and link the Commercial Edition + of Qt. \o + \row \o \c {-developer-build} \o Compile and link Qt with Qt developer + options including auto-tests exporting) \o + \row \o \c {-shared} \o Create and use shared Qt libraries. \o Defualt + value. + \row \o \c {-static} \o Create and use static Qt libraries. \o + \row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release + builds only. + \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Defualt + value. + \row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for + all project files. \o Defualt value. + \row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for + library and subdirectory targets. \o All other Makefiles are created as + wrappers which will in turn run qmake. + \row \o \c {-no-exceptions} \o Disable exceptions on platforms that support + it. \o + \row \o \c {-exceptions} \o Enable exceptions on platforms that support it. + \o Defualt value. + \row \o \c {-no-accessibility} \o Do not compile Windows Active + Accessibility support. \o + \row \o \c {-accessibility} \o Compile Windows Active Accessibility + support. \o Defualt value. + \row \o \c {-no-stl} \o Do not compile STL support. \o + \row \o \c {-stl} \o Compile STL support. \o Defualt value. + \row \o \c {-no-sql-<driver>} \o Disable SQL <driver> entirely, by default + none are turned on. \o + \row \o \c {-qt-sql-<driver>} \o Enable a SQL <driver> in the Qt Library. + \o + \row \o \c {-plugin-sql-<driver>} \o Enable SQL <driver> as a plugin to be + linked to at run time. \o Available values for <driver>: mysql, psql, + oci, odbc, tds, db2, sqlite, sqlite2, ibase. Drivers marked with a + '+' during configure have been detected as available on this system. + \row \o \c {-system-sqlite} \o Use sqlite from the operating system. \o + \row \o \c {-no-qt3support} \o Disables the Qt 3 support functionality. \o + \row \o \c {-no-opengl} \o Disables OpenGL functionality \o + \row \o \c {-opengl <api>} \o Enable OpenGL support with specified API + version. \o Available values for <api>: desktop - Enable support for + Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common + Profile, es2 - Enable support for OpenGL ES 2.0. + \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Defualt value. + \row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL + support, typically supplied by an OpenGL or other graphics + implementation. + \row \o \c {-platform <spec> } \o The operating system and compiler you + are building on. \o The default value is %QMAKESPEC%. + \row \o \c {-xplatform <spec> } \o The operating system and compiler you + are cross compiling to. \o See the README file for a list of supported + operating systems and compilers. + \row \o \c {-qtnamespace <namespace>} \o Wraps all Qt library code in + 'namespace name {..} \o + \row \o \c {-qtlibinfix <infix>} \o Renames all Qt* libs to Qt*<infix> + \o + \row \o \c {-D <define>} \o Add an explicit define to the preprocessor. + \o + \row \o \c {-I <includepath>} \o Add an explicit include path. \o + \row \o \c {-L <librarypath>} \o Add an explicit library path. \o + \row \o \c {-l <libraryname>} \o Add an explicit library name, residing + in a librarypath. \o + \row \o \c {-graphicssystem <sys>} \o Specify which graphicssystem should + be used. \o Available values for <sys>: * raster - Software rasterizer, + opengl - Using OpenGL acceleration, experimental!, openvg - Using + OpenVG acceleration, experimental! + \row \o \c {-help, -h, -?} \o Display this information. \o + \endtable + + \section2 Third Party Libraries: + \table + \header \o Option \o Description \o Note + \row \o \c {-qt-zlib} \o Use the zlib bundled with Qt. \o + \row \o \c {-system-zlib} \o Use zlib from the operating system. + \o See http://www.gzip.org/zlib + \row \o \c {-no-gif} \o Do not compile GIF reading support. + \o This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-qt-gif} \o Compile GIF reading support. \o See also + src/gui/image/qgifhandler_p.h + \row \o \c {-no-libpng} \o Do not compile PNG support. \o + \row \o \c {-qt-libpng} \o Use the libpng bundled with Qt. + \o This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-system-libpng} \o Use libpng from the operating system. + \o See http://www.libpng.org/pub/png + \row \o \c {-no-libmng} \o Do not compile MNG support. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o + \row \o \c {-system-libmng} \o Use libmng from the operating system. + \o See See http://www.libmng.com + \row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-qt-libtiff} \o Use the libtiff bundled with Qt. \o + \row \o \c {-system-libtiff} \o Use libtiff from the operating system. + \o See http://www.libtiff.org + \row \o \c {-no-libjpeg} \o Do not compile JPEG support. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-qt-libjpeg} \o Use the libjpeg bundled with Qt. \o + \row \o \c {-system-libjpeg} \o Use libjpeg from the operating system. + \o See http://www.ijg.org. This option denotes a default value and + needs to be evaluated. If the evaluation succeeds, the feature is + included. + \endtable + + \section2 Qt for Windows only: + \table + \header \o Option \o Description \o Note + \row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o + \row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc". + \o Defualt value. + \row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o + \row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform + "win32-msvc.net". \o Defualt value. + \row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution + commands to custom build steps. \o + \row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands + to custom build steps. This will distribute MOC and UIC steps, and other + custom buildsteps which are added to the INCREDIBUILD_XGE variable. + \o The IncrediBuild distribution commands are only added to Visual Studio + projects. This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o + \row \o \c {-plugin-manifests} \o Embed manifests in plugins. + \o Defualt value. + \row \o \c {-no-qmake} \o Do not compile qmake. \o + \row \o \c {-qmake} \o Compile qmake. \o Defualt value + \row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This + will override -no-fast if specified. \o + \row \o \c {-process} \o Generate Makefiles/Project files. \o Defualt value. + \row \o \c {-no-rtti} \o Do not compile runtime type information. \o + \row \o \c {-rtti} \o Compile runtime type information. \o Defualt value. + \row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o + \row \o \c {-mmx} \o Compile with use of MMX instructions \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-3dnow} \o Do not compile with use of 3DNOW instructions \o + \row \o \c {-3dnow} \o Compile with use of 3DNOW instructions \o This + option denotes a default value and needs to be evaluated. If the + evaluation succeeds, the feature is included. + \row \o \c {-no-sse} \o Do not compile with use of SSE instructions \o + \row \o \c {-sse} \o Compile with use of SSE instructions \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-sse2} \o Do not compile with use of SSE2 instructions \o + \row \o \c {-sse2} \o Compile with use of SSE2 instructions \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-openssl} \o Do not compile in OpenSSL support \o + \row \o \c {-openssl} \o Compile in run-time OpenSSL support \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-openssl-linked} \o Compile in linked OpenSSL support \o + \row \o \c {-no-dbus} \o Do not compile in D-Bus support \o + \row \o \c {-dbus} \o Compile in D-Bus support and load libdbus-1 dynamically. + \o This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-dbus-linked} \o Compile in D-Bus support and link to + libdbus-1 \o + \row \o \c {-no-phonon} \o Do not compile in the Phonon module \o + \row \o \c {-phonon} \o Compile the Phonon module. \o Phonon is built if a + decent C++ compiler is used. This option denotes a default value and needs + to be evaluated. If the evaluation succeeds, the feature is included. + \row \o \c {-no-phonon-backend} \o Do not compile the platform-specific + Phonon backend-plugin \o + \row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon + backend-plugin \o Defualt value. + \row \o \c {-no-multimedia} \o Do not compile the multimedia module \o + \row \o \c {-multimedia} \o Compile in multimedia module \o Defualt value. + \row \o \c {-no-audio-backend} \o Do not compile in the platform audio + backend into QtMultimedia \o + \row \o \c {-audio-backend} \o Compile in the platform audio backend into + QtMultimedia \o This option denotes a default value and needs to be + evaluated. If the evaluation succeeds, the feature is included. + \row \o \c {-no-webkit} \o Do not compile in the WebKit module \o + \row \o \c {-webkit} \o Compile in the WebKit module \o WebKit is built + if a decent C++ compiler is used. This option denotes a default value + and needs to be evaluated. If the evaluation succeeds, the feature is + included. + \row \o \c {-webkit-debug} \o Compile in the WebKit module with debug + symbols. \o + \row \o \c {-no-script} \o Do not build the QtScript module. \o + \row \o \c {-script} \o Build the QtScript module. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-scripttools} \o Do not build the QtScriptTools module. \o + \row \o \c {-scripttools} \o Build the QtScriptTools module. \o This + option denotes a default value and needs to be evaluated. If the + evaluation succeeds, the feature is included. + \row \o \c {-no-declarative} \o Do not build the declarative module \o + \row \o \c {-declarative} \o Build the declarative module \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-declarative-debug} \o Do not build the declarative debugging + support \o + \row \o \c {-declarative-debug} \o Build the declarative debugging support + \o Defualt value. + \row \o \c {-arch <arch>} \o Specify an architecture. \o Available values for + <arch>: * windows, windowsce, symbian, boundschecker, generic. + \row \o \c {-no-style-<style>} \o Disable <style> entirely. \o + \row \o \c {-qt-style-<style>} \o Enable <style> in the Qt Library. + \o Available styles: * windows, + windowsxp, + windowsvista, + * plastique, * cleanlooks, * motif, * cde, windowsce, windowsmobile, + s60 + \row \o \c {-no-native-gestures} \o Do not use native gestures on Windows 7. + \o + \row \o \c {-native-gestures} \o Use native gestures on Windows 7. + \o Defualt value. + \row \o \c {-no-mp} \o Do not use multiple processors for compiling with MSVC + \o Defualt value. + \row \o \c {-mp} \o Use multiple processors for compiling with MSVC (-MP) \o + \row \o \c {-loadconfig <config>} \o Run configure with the parameters from file + configure_<config>.cache. \o + \row \o \c {-saveconfig <config>} \o Run configure and save the parameters in + file configure_<config>.cache. \o + \row \o \c {-redo} \o Run configure with the same parameters as last time. \o +\endtable + +\section2 Qt for Windows CE only: + \table + \header \o Option \o Description \o Note + \row \o \c {-no-iwmmxt} \o Do not compile with use of IWMMXT instructions \o + \row \o \c {-iwmmxt} \o Do compile with use of IWMMXT instructions. \o This is + for Qt for Windows CE on Arm only. This option denotes a default value and + needs to be evaluated. If the evaluation succeeds, the feature is included. + \row \o \c {-no-crt} \o Do not add the C runtime to default deployment rules. + \o Defualt value. + \row \o \c {-qt-crt} \o Qt identifies C runtime during project generation \o + \row \o \c {-crt <path>} \o Specify path to C runtime used for project + generation. \o + \row \o \c {-no-cetest} \o Do not compile Windows CE remote test application \o + \row \o \c {-cetest} \o Compile Windows CE remote test application \o This + option denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-signature <file>} \o Use file for signing the target project \o + \row \o \c {-phonon-wince-ds9} \o Enable Phonon Direct Show 9 backend for + Windows CE \o Defualt value + \endtable + + \section2 Qt for Symbian OS only: + \table + \header \o Option \o Description \o Note + \row \o \c {-no-freetype} \o Do not compile in Freetype2 support. + \o Defualt value. + \row \o \c {-qt-freetype} \o Use the libfreetype bundled with Qt. \o + \row \o \c {-fpu <flags>} \o VFP type on ARM, supported options: + softvfp(default) |vfpv2 | softvfp+vfpv2 \o + \row \o \c {-no-s60} \o Do not compile in S60 support. \o + \row \o \c {-s60} \o Compile with support for the S60 UI Framework + \o Defualt value. + \row \o \c {-no-usedeffiles} \o Disable the usage of DEF files. \o + \row \o \c {-usedeffiles} \o Enable the usage of DEF files. \o + \endtable +*/ diff --git a/doc/src/images/qml-positioners-layoutdirection-example.png b/doc/src/images/qml-positioners-layoutdirection-example.png Binary files differnew file mode 100644 index 0000000..2c42b09 --- /dev/null +++ b/doc/src/images/qml-positioners-layoutdirection-example.png diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc index b5fdbee..862d22b 100644 --- a/doc/src/porting/porting4.qdoc +++ b/doc/src/porting/porting4.qdoc @@ -3609,7 +3609,7 @@ \row \o \c PE_WindowFrame \o QStyle::PE_FrameWindow \row \o \c PE_CheckListController \o QStyle::PE_Q3CheckListController \row \o \c PE_CheckListIndicator \o QStyle::PE_Q3CheckListIndicator - \row \o \c PE_CheckListExclusiveIndicato\o QStyle::PE_Q3CheckListExclusiveIndicator + \row \o \c PE_CheckListExclusiveIndicator \o QStyle::PE_Q3CheckListExclusiveIndicator \row \o \c PE_PanelGroupBox \o QStyle::PE_FrameGroupBox \row \o \c PE_TreeBranch \o QStyle::PE_IndicatorBranch \row \o \c PE_RubberBand \o QStyle::CE_RubberBand \o uses QStyle::drawControl() diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 6effbfa..3cabb1c 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -328,7 +328,7 @@ With Qt 4, the Qt class has become the Qt namespace. If you want to access a constant that is part of the Qt namespace, prefix it - with \c Qt:: (e.g., \c{Qt::yellow}), or add the directive + with \c{Qt::} (e.g., \c{Qt::yellow}), or add the directive \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 7 @@ -341,7 +341,7 @@ in Qt 3, it was legal to write \c QWidget::yellow instead of \c Qt::yellow, because QWidget inherited from Qt. This won't work in Qt 4; you must write \c Qt::yellow or add the "using namespace" - directive and drop the \c Qt:: prefix. + directive and drop the \c{Qt::} prefix. The \l{qt3to4 - The Qt 3 to 4 Porting Tool}{qt3to4} porting tool automates this conversion. diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp index 2494eb2..11f5163 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp @@ -75,7 +75,7 @@ QString result = future.result(); //! [4] // call 'QList<QByteArray> QByteArray::split(char sep) const' in a separate thread -QByteArray bytearray = "hello world; +QByteArray bytearray = "hello world"; QFuture<QList<QByteArray> > future = QtConcurrent::run(bytearray, &QByteArray::split), ','); ... QList<QByteArray> result = future.result(); diff --git a/doc/src/snippets/declarative/application.qml b/doc/src/snippets/declarative/application.qml new file mode 100644 index 0000000..06f83f2 --- /dev/null +++ b/doc/src/snippets/declarative/application.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** 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: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$ +** +****************************************************************************/ + +//! [document] +import QtQuick 1.1 + +Rectangle { + width: 300; height: 55 + color: Qt.application.active ? "white" : "lightgray" + Text { + text: "Application " + (Qt.application.active ? "active" : "inactive") + opacity: Qt.application.active ? 1.0 : 0.5 + anchors.centerIn: parent + } +} +//! [document] diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js index c29a1f9..cf59777 100644 --- a/doc/src/snippets/declarative/componentCreation.js +++ b/doc/src/snippets/declarative/componentCreation.js @@ -17,15 +17,11 @@ function createSpriteObjects() { //![local] component = Qt.createComponent("Sprite.qml"); - sprite = component.createObject(appWindow); + sprite = component.createObject(appWindow, {"x": 100, "y": 100}); if (sprite == null) { // Error Handling console.log("Error creating object"); - } else { - sprite.x = 100; - sprite.y = 100; - // ... } //![local] diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml index 3bddefb..8aeb72c 100644 --- a/doc/src/snippets/declarative/folderlistmodel.qml +++ b/doc/src/snippets/declarative/folderlistmodel.qml @@ -43,15 +43,19 @@ import QtQuick 1.0 import Qt.labs.folderlistmodel 1.0 ListView { + width: 200; height: 400 + FolderListModel { - id: foldermodel + id: folderModel nameFilters: ["*.qml"] } + Component { - id: filedelegate + id: fileDelegate Text { text: fileName } } - model: foldermodel - delegate: filedelegate + + model: folderModel + delegate: fileDelegate } //![0] diff --git a/doc/src/snippets/qabstractsliderisnippet.cpp b/doc/src/snippets/qabstractsliderisnippet.cpp index 6b684e9..cb0f8cc 100644 --- a/doc/src/snippets/qabstractsliderisnippet.cpp +++ b/doc/src/snippets/qabstractsliderisnippet.cpp @@ -50,7 +50,7 @@ QAbstractSliderPrivate::~QAbstractSliderPrivate() { } -oid QAbstractSlider::setRange(int min, int max) +void QAbstractSlider::setRange(int min, int max) { Q_D(QAbstractSlider); int oldMin = d->minimum; |