From 12ebf6c45428e303e0f238d59f144f3b4816ec3b Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 17 Aug 2010 15:15:41 +0200 Subject: Doc: Added a small note about using .pro files in SUBDIRS. Details: Found while trying to fix example .pro files. Reviewed-by: Trust Me --- doc/src/development/qmake-manual.qdoc | 109 +++++++++++++++++----------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index baa30fc..44658bc 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1079,27 +1079,27 @@ \target BLD_INF_RULES \section1 BLD_INF_RULES - + \e {This is only used on the Symbian platform.} - + Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables. The section of \c bld.inf file where each rule goes is appended to \c BLD_INF_RULES with a dot. - + For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146 - + This will add the specified statements to the \c prj_exports section of the generated \c bld.inf file. - + It is also possible to add multiple rows in a single block. Each double quoted string will be placed on a new row in the generated \c bld.inf file. - + For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 143 - + Any rules you define will be added after automatically generated rules in each section. @@ -1274,7 +1274,7 @@ the contents of the \l{#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA} variable. These options only have an effect on the Symbian platform: - + \table 95% \header \o Option \o Description \row \o stdbinary \o Builds an Open C binary (i.e. STDDLL, STDEXE, or STDLIB, @@ -1286,7 +1286,7 @@ Note that this only affects automatically generated bld.inf content; the content added via \c BLD_INF_RULES variable is not affected. \endtable - + These options have an effect on Linux/Unix platforms: \table 95% @@ -1353,7 +1353,7 @@ The default deployment target path for Windows CE is \c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to \c{\Program Files\target}. For the Symbian platform, the default target -is the application private directory on the drive it is installed to. + is the application private directory on the drive it is installed to. It is also possible to specify multiple \c sources to be deployed on target \c paths. In addition, different variables can be used for @@ -1366,7 +1366,7 @@ is the application private directory on the drive it is installed to. \note In Windows CE all linked Qt libraries will be deployed to the path specified by \c{myFiles.path}. On Symbian platform all libraries and executables will always be deployed to the \\sys\\bin of the installation drive. - + Since the Symbian platform build system automatically moves binaries to certain directories under the epoc32 directory, custom plugins, executables or dynamically loadable libraries need special handling. When deploying @@ -1389,7 +1389,7 @@ is the application private directory on the drive it is installed to. \c pkg_postrules or \c pkg_prerules are not parsed by qmake, so they should be in a format understood by Symbian package generation tools. Please consult the Symbian platform documentation for correct syntax. - + For example, to deploy DLL and add a new dependency: \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 140 @@ -1397,7 +1397,7 @@ is the application private directory on the drive it is installed to. Please note that \c pkg_prerules can also replace default statements in pkg file. If no pkg_prerules is defined, qmake makes sure that PKG file syntax is correct and it contains all mandatory statements such as: - + \list \o languages, for example \BR &EN,FR @@ -1407,7 +1407,7 @@ is the application private directory on the drive it is installed to. %{"Vendor-EN", ..., "Vendor-FR"} :"Unique vendor name" \endlist - + If you decide to override any of these statements, you need to pay attention that also other statements stay valid. For example if you override languages statement, you must override also package-header @@ -1419,7 +1419,7 @@ is the application private directory on the drive it is installed to. - e.g. if a specific device is required to run the application or more languages need to be supported by the package file. The supported \c default_deployment rules that can be disabled are: - + \list \o pkg_depends_qt \o pkg_depends_webkit @@ -1427,9 +1427,9 @@ is the application private directory on the drive it is installed to. \endlist For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 141 - + On the Symbian platform, you can use \c{DEPLOYMENT.installer_header} variable to generate smart installer wrapper for your application. If you specify just UID of the installer package as the value, then @@ -1454,10 +1454,10 @@ is the application private directory on the drive it is installed to. \note In Windows CE, No plugins will be deployed automatically. If the application depends on plugins, these plugins have to be specified manually. - + \note On the Symbian platform, all plugins supported by this variable -will be deployed by default with Qt libraries, so generally using this -variable is not needed. + will be deployed by default with Qt libraries, so generally using this + variable is not needed. For example: @@ -1561,14 +1561,14 @@ variable is not needed. \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 34 See also \l{#SOURCES}{SOURCES}. - + \target ICON \section1 ICON - + This variable is used only in MAC and the Symbian platform to set the application icon. Please see \l{Setting the Application Icon}{the application icon documentation} for more information. - + \target INCLUDEPATH \section1 INCLUDEPATH @@ -1657,7 +1657,7 @@ variable is not needed. file name suffix. \bold{Note:} On the Symbian platform, the build system makes a -distinction between shared and + distinction between shared and static libraries. In most cases, qmake will figure out which library you are refering to, but in some cases you may have to specify it explicitly to get the expected behavior. This typically happens if you are building a @@ -1702,28 +1702,28 @@ distinction between shared and \target MMP_RULES \section1 MMP_RULES - + \e {This is only used on the Symbian platform.} - + Generic MMP file content can be specified with this variable. - + For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 137 - + This will add the specified statement to the end of the generated MMP file. - + It is also possible to add multiple rows in a single block. Each double quoted string will be placed on a new row in the generated MMP file. - + For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 138 - + If you need to include a hash (\c{#}) character inside the \c MMP_RULES statement, it can be done with the variable \c LITERAL_HASH as follows: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 139 There is also a convenience function for adding conditional rules @@ -2031,8 +2031,8 @@ distinction between shared and respectively. \bold{Note:} On the Symbian platform, this variable can be used to pass -architecture specific options to each compiler in the Symbian build system. -For example: + architecture specific options to each compiler in the Symbian build system. + For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 131 @@ -2374,10 +2374,10 @@ For example: \section1 QMAKE_LFLAGS_RPATH \e {This is used on Unix platforms only.} - + Library paths in this definition are added to the executable at link time so that the added paths will be preferentially searched at runtime. - + \section1 QMAKE_LFLAGS_QT_DLL This variable contains link flags when building programs that @@ -2716,7 +2716,7 @@ For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 45 \section1 QMAKE_RPATH - + \e {This is used on Unix platforms only.} Is equivalent to \l QMAKE_LFLAGS_RPATH. @@ -2870,30 +2870,30 @@ For example: This variable contains the name of the resource file for the application. The value of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - + \target RSS_RULES \section1 RSS_RULES - + \e {This is only used on the Symbian platform.} - + Generic RSS file content can be specified with this variable. The syntax is similar to \c MMP_RULES and \c BLD_INF_RULES. - + For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 144 - + This will add the specified statement to the end of the \c APP_REGISTRATION_INFO resource struct in the generated registration resource file. As an impact of this statement, the application will not be visible in application shell. - + It is also possible to add multiple rows in a single block. Each double quoted string will be placed on a new row in the registration resource file. - + For example: - + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 145 - + This example will install the application to MyFolder in the Symbian platform application shell. In addition it will make the application to be launched in background. @@ -2933,7 +2933,7 @@ For example: \section1 S60_VERSION \e {This is only used on the Symbian platform.} - + Contains the version number of the underlying S60 SDK; e.g. "5.0". \target SIGNATURE_FILE @@ -2969,8 +2969,9 @@ For example: \section1 SUBDIRS This variable, when used with the \l{#TEMPLATE}{\c subdirs template} - contains the names of all subdirectories that contain parts of the project - that need be built. Each subdirectory must contain its own project file. + contains the names of all subdirectories or project files that contain + parts of the project that need be built. Each subdirectory specified + using this variable must contain its own project file. For example: -- cgit v0.12 From 86c3fed122b8a6e47904d958f8c50fa19e668434 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 17 Aug 2010 15:31:48 +0200 Subject: Doc: Started work to tidy up existing QML docs. Reviewed-by: Trust Me --- doc/src/declarative/qml-intro.qdoc | 38 +++++----------- .../snippets/declarative/qml-intro/anchors1.qml | 14 ++++++ .../snippets/declarative/qml-intro/anchors2.qml | 16 +++++++ .../snippets/declarative/qml-intro/anchors3.qml | 25 +++++++++++ .../declarative/qml-intro/basic-syntax.qml | 8 ++++ .../declarative/qml-intro/hello-world1.qml | 11 +++++ .../declarative/qml-intro/hello-world2.qml | 16 +++++++ .../declarative/qml-intro/hello-world3.qml | 17 +++++++ .../declarative/qml-intro/hello-world4.qml | 21 +++++++++ .../declarative/qml-intro/hello-world5.qml | 23 ++++++++++ .../declarative/qml-intro/number-animation1.qml | 22 +++++++++ .../declarative/qml-intro/number-animation2.qml | 24 ++++++++++ .../snippets/declarative/qml-intro/rectangle.qml | 8 ++++ .../qml-intro/sequential-animation1.qml | 23 ++++++++++ .../qml-intro/sequential-animation2.qml | 33 ++++++++++++++ .../qml-intro/sequential-animation3.qml | 46 +++++++++++++++++++ doc/src/snippets/declarative/qml-intro/states1.qml | 52 ++++++++++++++++++++++ .../declarative/qml-intro/transformations1.qml | 38 ++++++++++++++++ 18 files changed, 409 insertions(+), 26 deletions(-) create mode 100644 doc/src/snippets/declarative/qml-intro/anchors1.qml create mode 100644 doc/src/snippets/declarative/qml-intro/anchors2.qml create mode 100644 doc/src/snippets/declarative/qml-intro/anchors3.qml create mode 100644 doc/src/snippets/declarative/qml-intro/basic-syntax.qml create mode 100644 doc/src/snippets/declarative/qml-intro/hello-world1.qml create mode 100644 doc/src/snippets/declarative/qml-intro/hello-world2.qml create mode 100644 doc/src/snippets/declarative/qml-intro/hello-world3.qml create mode 100644 doc/src/snippets/declarative/qml-intro/hello-world4.qml create mode 100644 doc/src/snippets/declarative/qml-intro/hello-world5.qml create mode 100644 doc/src/snippets/declarative/qml-intro/number-animation1.qml create mode 100644 doc/src/snippets/declarative/qml-intro/number-animation2.qml create mode 100644 doc/src/snippets/declarative/qml-intro/rectangle.qml create mode 100644 doc/src/snippets/declarative/qml-intro/sequential-animation1.qml create mode 100644 doc/src/snippets/declarative/qml-intro/sequential-animation2.qml create mode 100644 doc/src/snippets/declarative/qml-intro/sequential-animation3.qml create mode 100644 doc/src/snippets/declarative/qml-intro/states1.qml create mode 100644 doc/src/snippets/declarative/qml-intro/transformations1.qml diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc index 69dd500..13c8e4f 100644 --- a/doc/src/declarative/qml-intro.qdoc +++ b/doc/src/declarative/qml-intro.qdoc @@ -320,7 +320,7 @@ from \l Item. The rotation property is a real number that specifies the angle in a clockwise direction for the rotation of the object. Here is the code for our animated rotating image. -\quotefile doc/src/snippets/declarative/number-animation1.qml +\quotefile doc/src/snippets/declarative/qml-intro/number-animation1.qml The \c {transformOrigin: Item.Center} is redundant since this is the default axis of rotation anyway. But if you change \c Center to \c BottomRight you @@ -333,7 +333,7 @@ combination. For example, if the task had been to animate the rotation about the y-axis passing through the center of the image then the following code would do it. -\quotefile doc/src/snippets/declarative/number-animation2.qml +\quotefile doc/src/snippets/declarative/qml-intro/number-animation2.qml Here there is a rectangle 600 by 400 pixels. Placed within that rectangle is an image 100 by 100 pixels. It is rotated about the center of the image @@ -362,7 +362,7 @@ will be animating the position and the size of the image. First create two images -\quotefile doc/src/snippets/declarative/sequential-animation1.qml +\quotefile doc/src/snippets/declarative/qml-intro/sequential-animation1.qml We will add to 'image1' a SequentialAnimation from x = 20 to the target of x = 450. The 'from' values will be used because we will be repeating the @@ -375,7 +375,7 @@ between the x values and over a given duration. After the NumberAnimation there will be a PauseAnimation that will pause the animation for 500 milliseconds (half a second) simply for the visual effect. -\snippet doc/src/snippets/declarative/sequential-animation2.qml adding a sequential animation +\snippet doc/src/snippets/declarative/qml-intro/sequential-animation2.qml adding a sequential animation A similar block of code is written for the animation of the 'y' value of the position. @@ -390,7 +390,7 @@ and image1 to 1 and image2 to 2 then image2 will be in the foreground and image1 in the background. When image1 passes image2 it will pass behind it. The completed code looks like -\quotefile doc/src/snippets/declarative/sequential-animation3.qml +\quotefile doc/src/snippets/declarative/qml-intro/sequential-animation3.qml The \c {easing.type} has many options, expressed as a string. It specifies the kind of equation that describes the acceleration of the property value, not @@ -439,9 +439,6 @@ delivers some of the best examples that illustrate these new elements. \endtable - - - \section1 Using States A state is a defined set of values in the configuration of an object and @@ -471,7 +468,7 @@ will be the default state. We will just go to 'night' by clicking and holding the left mouse button down, releasing the mouse button will reverse the process -\quotefile doc/src/snippets/declarative/states1.qml +\quotefile doc/src/snippets/declarative/qml-intro/states1.qml Several new things appear in this sample. Firstly, we use a \l MouseArea element to detect mouse clicks in the \e mainRectangle. Secondly, we use @@ -549,15 +546,15 @@ needle_shadow have the same default \e x and \e y values but the rotation origin for the needle is slightly different so that a shadow will be evident as the needle moves. -\snippet ../../examples/declarative/ui-components/dialcontrol/content/Dial.qml needle_shadow +\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle_shadow And the needle -\snippet ../../examples/declarative/ui-components/dialcontrol/content/Dial.qml needle +\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle The final image is the overlay which simply has a position defined. -\snippet ../../examples/declarative/ui-components/dialcontrol/content/Dial.qml overlay +\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml overlay \e {dialcontrol.qml} in the \e {examples/declarative/ui-components/dialcontrol} directory is the main file of the example. It defines the visual environment that the Dial @@ -565,17 +562,14 @@ will fit into. Because the \e Dial component and the images live in the \e content sub-directory we will have to import this into \e dialcontrol.qml. So the start of the file looks like - \code - import Qt 4.7 - import "content" - \endcode +\snippet examples/declarative/ui-components/dialcontrol/dialcontrol.qml imports The visual space is bound by a 300 by 300 pixel \l Rectangle which is given a gray color. Inside this rectangle is our component \e Dial and a \l Rectangle. Inside the rectangle called 'container' is another rectangle with the interesting name 'slider'. -\snippet ../../examples/declarative/ui-components/dialcontrol/dialcontrol.qml 0 +\snippet examples/declarative/ui-components/dialcontrol/dialcontrol.qml 0 The Dial component, named 'dial, is \e anchored to the center of the main rectangle. The \c value attribute of 'dial' is set to a value based on the @@ -584,15 +578,7 @@ rectangle. The \c value attribute of 'dial' is set to a value based on the the rotation of the needle image. Notice this piece of code in Dial where the change in \c value modifies the position of the needle. - \code - angle: Math.min(Math.max(-130, root.value*2.6 - 130), 133) - Behavior on angle { - SpringAnimation { - spring: 1.4 - damping: .15 - } - } - \endcode +\snippet examples/declarative/ui-components/dialcontrol/Dial.qml needle angle This is part of the \c needleRotation that rotates the needle and causes the rotation of its shadow. \l SpringAnimation is an element that modifies the value diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/qml-intro/anchors1.qml new file mode 100644 index 0000000..320d0e7 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/anchors1.qml @@ -0,0 +1,14 @@ +import Qt 4.7 + +Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + } +} diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/qml-intro/anchors2.qml new file mode 100644 index 0000000..bb9ed75 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/anchors2.qml @@ -0,0 +1,16 @@ +import Qt 4.7 + +Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 10 + } +} diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml new file mode 100644 index 0000000..99d2ceb --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/anchors3.qml @@ -0,0 +1,25 @@ +import Qt 4.7 + +Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 10 + } + +//! [adding some text] + Text { + text: "

The Qt Logo

" + anchors.bottom: image1.top + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 15 + } +//! [adding some text] +} diff --git a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml new file mode 100644 index 0000000..b241500 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml @@ -0,0 +1,8 @@ +// Note: this file is not intended to be run. + +//! [basic syntax] +SomeElement { + id: myObject + ... some other things here ... +} +//! [basic syntax] diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/declarative/qml-intro/hello-world1.qml new file mode 100644 index 0000000..244175c --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/hello-world1.qml @@ -0,0 +1,11 @@ +import Qt 4.7 + +Rectangle { + id: myRectangle + width: 500 + height: 400 + + Text { text: "Hello World!" } + + color: "lightgray" +} diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml new file mode 100644 index 0000000..73b2f8c --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/hello-world2.qml @@ -0,0 +1,16 @@ +import Qt 4.7 + +Rectangle { + id: myRectangle + width: 500 + height: 400 + +//! [updated text] + Text { + text: "

Hello World

"; color: "darkgreen" + x: 100; y:100 + } +//! [updated text] + + color: "lightgray" +} diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml new file mode 100644 index 0000000..112f775 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/hello-world3.qml @@ -0,0 +1,17 @@ +import Qt 4.7 + +Rectangle { + id: myRectangle + width: 500 + height: 400 + +//! [updated text] + Text { + text: "

Hello world again

" + color: "#002288" + x: 100; y: 100 + } +//! [updated text] + + color: "lightgray" +} diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/qml-intro/hello-world4.qml new file mode 100644 index 0000000..c97334e --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/hello-world4.qml @@ -0,0 +1,21 @@ +import Qt 4.7 + +Rectangle { + id: myRectangle + width: 500 + height: 400 + + Text { + text: "

Hello world again

" + color: "#002288" + x: 100; y: 100 + } + +//! [added an image] + Image { + source: "images/qt-logo.png" + } +//! [added an image] + + color: "lightgray" +} diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/qml-intro/hello-world5.qml new file mode 100644 index 0000000..74a612a --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/hello-world5.qml @@ -0,0 +1,23 @@ +import Qt 4.7 + +Rectangle { + id: myRectangle + width: 500 + height: 400 + + Text { + text: "

Hello world again

" + color: "#002288" + x: 100; y: 100 + } + +//! [positioning the image] + Image { + source: "images/qt-logo.png" + x: 100; y: 150 + width: 150; height: 150 + } +//! [positioning the image] + + color: "lightgray" +} diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/qml-intro/number-animation1.qml new file mode 100644 index 0000000..d80a8dc --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/number-animation1.qml @@ -0,0 +1,22 @@ +import Qt 4.7 + +Rectangle { + id: mainRec + width: 600 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + x: 200; y: 100 + width: 100; height: 100 + + // Animate a rotation + transformOrigin: Item.Center + NumberAnimation on rotation { + from: 0; to: 360 + duration: 2000 + loops: Animation.Infinite + } + } +} diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml new file mode 100644 index 0000000..beb3114 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml @@ -0,0 +1,24 @@ +import Qt 4.7 + +Rectangle { + id: mainRec + width: 600 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + x: 200; y: 100 + width: 100; height: 100 + + // Animate a rotation + transform: Rotation { + origin.x: 50; origin.y: 50; axis {x:0; y:1; z:0} angle:0 + NumberAnimation on angle { + from: 0; to: 360; + duration: 3000; + loops: Animation.Infinite + } + } + } +} diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/doc/src/snippets/declarative/qml-intro/rectangle.qml new file mode 100644 index 0000000..7235e9b --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/rectangle.qml @@ -0,0 +1,8 @@ +import Qt 4.7 + +// This is a comment. And below myRectangle is defined. +Rectangle { + id: myRectangle + width: 500 + height: 400 +} diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml new file mode 100644 index 0000000..125f99f --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml @@ -0,0 +1,23 @@ +import Qt 4.7 + +Rectangle { + id: mainRec + width: 600 + height: 400 + z: 0 + + Image { + id: image1 + source: "images/qt-logo.png" + x: 20; y: 20 ; z: 1 + width: 100; height: 100 + } + + Image { + id: image2 + source: "images/qt-logo.png" + width: 100; height: 100 + x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 + z: 2 + } +} diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml new file mode 100644 index 0000000..08c598b --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml @@ -0,0 +1,33 @@ +import Qt 4.7 + +Rectangle { + id: mainRec + width: 600 + height: 400 + z: 0 + +//! [adding a sequential animation] + Image { + id: image1 + source: "images/qt-logo.png" + width: 100; height: 100 + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { + from: 20; to: 450; easing.type: "InOutQuad"; + duration: 2000 + } + PauseAnimation { duration: 500 } + } + } +//! [adding a sequential animation] + + Image { + id: image2 + source: "images/qt-logo.png" + width: 100; height: 100 + x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 + z: 2 + } +} diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml new file mode 100644 index 0000000..5e7b400 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml @@ -0,0 +1,46 @@ +Rectangle { + id: mainRec + width: 600 + height: 400 + z: 0 + + Image { + id: image2 + source: "images/qt-logo.png" + width: 100; height: 100 + x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 + z: 2 + } + + Image { + id: image1 + source: "images/qt-logo.png" + x: 20; y: 20 ; z: 1 + width: 100; height: 100 + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { + from: 20; to: 450 + easing.type: "InOutQuad"; duration: 2000 + } + PauseAnimation { duration: 500 } + } + + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { + from: 20; to: 250 + easing.type: "InOutQuad"; duration: 2000 + } + PauseAnimation { duration: 500 } + } + + SequentialAnimation on scale { + loops: Animation.Infinite + NumberAnimation { from: 1; to: 0.5; duration: 1000 } + NumberAnimation { from: 0.5; to: 1; duration: 1000 } + PauseAnimation { duration: 500 } + } + } +} diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/qml-intro/states1.qml new file mode 100644 index 0000000..fcd3f53 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/states1.qml @@ -0,0 +1,52 @@ +import Qt 4.7 + +Rectangle { + id: mainRectangle + width: 600 + height: 400 + color: "black" + + Rectangle { + id: sky + width: 600 + height: 200 + y: 0 + color: "lightblue" + } + + Rectangle { + id: ground + width: 600; height: 200 + y: 200 + color: "green" + } + + MouseArea { + id: mousearea + anchors.fill: mainRectangle + } + + states: [ State { + name: "night" + when: mousearea.pressed == true + PropertyChanges { target: sky; color: "darkblue" } + PropertyChanges { target: ground; color: "black" } + }, + State { + name: "daylight" + when: mousearea.pressed == false + PropertyChanges { target: sky; color: "lightblue" } + PropertyChanges { target: ground; color: "green" } + } + ] + + transitions: [ Transition { + from: "daylight"; to: "night" + ColorAnimation { duration: 1000 } + }, + Transition { + from: "night"; to: "daylight" + ColorAnimation { duration: 500 } + } + ] +} diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/qml-intro/transformations1.qml new file mode 100644 index 0000000..1504729 --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/transformations1.qml @@ -0,0 +1,38 @@ +import Qt 4.7 + +Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 10 + + transform: Rotation { + origin.x: 75; origin.y: 75 + axis{ x: 0; y: 0; z:1 } angle: -90 + } + + } + + Text { + text: "

The Qt Logo -- taking it easy

" + anchors.bottom: image1.top + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 15 + + transform: [ + Scale { xScale: 1.5; yScale: 1.2 } , + + Rotation { + origin.x: 75; origin.y: 75 + axis{ x: 0; y: 0; z:1 } angle: -45 + } + ] + } +} -- cgit v0.12 From cd1b5d933575fb801ad3014f3d7fd7c268a362d1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 17 Aug 2010 15:49:01 +0200 Subject: Doc: Reworded a brief description for clarity. Reviewed-by: Trust Me --- src/gui/graphicsview/qgraphicsitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 0b3b164..882def7 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -10918,8 +10918,8 @@ QVariant QGraphicsSimpleTextItem::extension(const QVariant &variant) const /*! \class QGraphicsItemGroup - \brief The QGraphicsItemGroup class provides treating a group of items as - one. + \brief The QGraphicsItemGroup class provides a container that treats + a group of items as a single item. \since 4.2 \ingroup graphicsview-api -- cgit v0.12 From 1b802532809a430cb994e1c05bd5f62fdd2ab2b0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 13:43:06 +0200 Subject: Doc: Made more improvements to the QML documentation. --- doc/src/images/qml-borderimage-normal-image.png | Bin 0 -> 5282 bytes doc/src/images/qml-borderimage-scaled.png | Bin 0 -> 5580 bytes doc/src/images/qml-borderimage-tiled.png | Bin 0 -> 5889 bytes doc/src/snippets/declarative/animatedimage.qml | 61 +++++++++++++++ doc/src/snippets/declarative/borderimage.qml | 69 ----------------- .../declarative/borderimage/borderimage-scaled.qml | 81 ++++++++++++++++++++ .../declarative/borderimage/borderimage-tiled.qml | 81 ++++++++++++++++++++ .../declarative/borderimage/normal-image.qml | 77 +++++++++++++++++++ .../declarative/borderimage/pics/borderframe.png | Bin 0 -> 3411 bytes .../declarative/borderimage/pics/borderframe.svg | 82 +++++++++++++++++++++ doc/src/snippets/declarative/image.qml | 45 +++++++++++ doc/src/snippets/declarative/pics/qtlogo.png | Bin 0 -> 2991 bytes .../declarative/qml-documents/inline-component.qml | 57 ++++++++++++++ .../qml-documents/inline-text-component.qml | 55 ++++++++++++++ .../declarative/qml-documents/non-trivial.qml | 62 ++++++++++++++++ .../declarative/qml-documents/qmldocuments.qml | 66 +++++++++++++++++ doc/src/snippets/declarative/qmldocuments.qml | 66 ----------------- 17 files changed, 667 insertions(+), 135 deletions(-) create mode 100644 doc/src/images/qml-borderimage-normal-image.png create mode 100644 doc/src/images/qml-borderimage-scaled.png create mode 100644 doc/src/images/qml-borderimage-tiled.png create mode 100644 doc/src/snippets/declarative/animatedimage.qml delete mode 100644 doc/src/snippets/declarative/borderimage.qml create mode 100644 doc/src/snippets/declarative/borderimage/borderimage-scaled.qml create mode 100644 doc/src/snippets/declarative/borderimage/borderimage-tiled.qml create mode 100644 doc/src/snippets/declarative/borderimage/normal-image.qml create mode 100644 doc/src/snippets/declarative/borderimage/pics/borderframe.png create mode 100644 doc/src/snippets/declarative/borderimage/pics/borderframe.svg create mode 100644 doc/src/snippets/declarative/image.qml create mode 100644 doc/src/snippets/declarative/pics/qtlogo.png create mode 100644 doc/src/snippets/declarative/qml-documents/inline-component.qml create mode 100644 doc/src/snippets/declarative/qml-documents/inline-text-component.qml create mode 100644 doc/src/snippets/declarative/qml-documents/non-trivial.qml create mode 100644 doc/src/snippets/declarative/qml-documents/qmldocuments.qml delete mode 100644 doc/src/snippets/declarative/qmldocuments.qml diff --git a/doc/src/images/qml-borderimage-normal-image.png b/doc/src/images/qml-borderimage-normal-image.png new file mode 100644 index 0000000..ae7460a Binary files /dev/null and b/doc/src/images/qml-borderimage-normal-image.png differ diff --git a/doc/src/images/qml-borderimage-scaled.png b/doc/src/images/qml-borderimage-scaled.png new file mode 100644 index 0000000..8035c79 Binary files /dev/null and b/doc/src/images/qml-borderimage-scaled.png differ diff --git a/doc/src/images/qml-borderimage-tiled.png b/doc/src/images/qml-borderimage-tiled.png new file mode 100644 index 0000000..14883d0 Binary files /dev/null and b/doc/src/images/qml-borderimage-tiled.png differ diff --git a/doc/src/snippets/declarative/animatedimage.qml b/doc/src/snippets/declarative/animatedimage.qml new file mode 100644 index 0000000..bf5d611 --- /dev/null +++ b/doc/src/snippets/declarative/animatedimage.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// This snippet should be turned into an example and put in +// examples/declarative/imageelements/animatedimage + +//! [document] +import Qt 4.7 + +Rectangle { + width: animation.width; height: animation.height + 8 + + AnimatedImage { id: animation; source: "animation.gif" } + + Rectangle { + property int frames: animation.frameCount + + width: 4; height: 8 + x: (animation.width - width) * animation.currentFrame / frames + y: animation.height + color: "red" + } +} +//! [document] diff --git a/doc/src/snippets/declarative/borderimage.qml b/doc/src/snippets/declarative/borderimage.qml deleted file mode 100644 index 447ad92..0000000 --- a/doc/src/snippets/declarative/borderimage.qml +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -Rectangle { - id: page - color: "white" - width: 520; height: 280 - - Row { - anchors.centerIn: parent - spacing: 50 -//! [0] -BorderImage { - width: 180; height: 180 - border { left: 30; top: 30; right: 30; bottom: 30 } - horizontalTileMode: BorderImage.Stretch - verticalTileMode: BorderImage.Stretch - source: "content/colors.png" -} - -BorderImage { - width: 180; height: 180 - border { left: 30; top: 30; right: 30; bottom: 30 } - horizontalTileMode: BorderImage.Round - verticalTileMode: BorderImage.Round - source: "content/colors.png" -} -//! [0] - } -} diff --git a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml new file mode 100644 index 0000000..cc3ae2f --- /dev/null +++ b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + id: page + color: "white" + width: 180; height: 180 + +//! [scaled border image] +BorderImage { + width: 180; height: 180 + border { left: 30; top: 30; right: 30; bottom: 30 } + horizontalTileMode: BorderImage.Stretch + verticalTileMode: BorderImage.Stretch + source: "pics/borderframe.png" +} +//! [scaled border image] + + Rectangle { + x: 30; y: 0 + width: 1; height: 180 + color: "gray" + } + + Rectangle { + x: 150; y: 0 + width: 1; height: 180 + color: "gray" + } + + Rectangle { + x: 0; y: 30 + width: 180; height: 1 + color: "gray" + } + + Rectangle { + x: 0; y: 150 + width: 180; height: 1 + color: "gray" + } +} diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml new file mode 100644 index 0000000..575e9fd --- /dev/null +++ b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + id: page + color: "white" + width: 180; height: 180 + +//! [scaled border image] +BorderImage { + width: 180; height: 180 + border { left: 30; top: 30; right: 30; bottom: 30 } + horizontalTileMode: BorderImage.Round + verticalTileMode: BorderImage.Round + source: "pics/borderframe.png" +} +//! [scaled border image] + + Rectangle { + x: 30; y: 0 + width: 1; height: 180 + color: "gray" + } + + Rectangle { + x: 150; y: 0 + width: 1; height: 180 + color: "gray" + } + + Rectangle { + x: 0; y: 30 + width: 180; height: 1 + color: "gray" + } + + Rectangle { + x: 0; y: 150 + width: 180; height: 1 + color: "gray" + } +} diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/declarative/borderimage/normal-image.qml new file mode 100644 index 0000000..adac4f3 --- /dev/null +++ b/doc/src/snippets/declarative/borderimage/normal-image.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + id: page + color: "white" + width: 120; height: 120 + +//! [scaled border image] +Image { + source: "pics/borderframe.png" +} +//! [scaled border image] + + Rectangle { + x: 30; y: 0 + width: 1; height: 120 + color: "gray" + } + + Rectangle { + x: 90; y: 0 + width: 1; height: 120 + color: "gray" + } + + Rectangle { + x: 0; y: 30 + width: 200; height: 1 + color: "gray" + } + + Rectangle { + x: 0; y: 90 + width: 200; height: 1 + color: "gray" + } +} diff --git a/doc/src/snippets/declarative/borderimage/pics/borderframe.png b/doc/src/snippets/declarative/borderimage/pics/borderframe.png new file mode 100644 index 0000000..97a9452 Binary files /dev/null and b/doc/src/snippets/declarative/borderimage/pics/borderframe.png differ diff --git a/doc/src/snippets/declarative/borderimage/pics/borderframe.svg b/doc/src/snippets/declarative/borderimage/pics/borderframe.svg new file mode 100644 index 0000000..9286c82 --- /dev/null +++ b/doc/src/snippets/declarative/borderimage/pics/borderframe.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/declarative/image.qml new file mode 100644 index 0000000..b84cbcb --- /dev/null +++ b/doc/src/snippets/declarative/image.qml @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Image { + source: "qtlogo.png" +} diff --git a/doc/src/snippets/declarative/pics/qtlogo.png b/doc/src/snippets/declarative/pics/qtlogo.png new file mode 100644 index 0000000..4f68e16 Binary files /dev/null and b/doc/src/snippets/declarative/pics/qtlogo.png differ diff --git a/doc/src/snippets/declarative/qml-documents/inline-component.qml b/doc/src/snippets/declarative/qml-documents/inline-component.qml new file mode 100644 index 0000000..9233bbf --- /dev/null +++ b/doc/src/snippets/declarative/qml-documents/inline-component.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Rectangle { + width: 240; height: 320; + + ListView { + anchors.fill: parent + model: contactModel + delegate: Component { + Text { + text: modelData.firstName + " " + modelData.lastName + } + } + } +} +//! [document] diff --git a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml new file mode 100644 index 0000000..83ba213 --- /dev/null +++ b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Rectangle { + width: 240; height: 320; + + ListView { + anchors.fill: parent + model: contactModel + delegate: Text { + text: modelData.firstName + " " + modelData.lastName + } + } +} +//! [document] diff --git a/doc/src/snippets/declarative/qml-documents/non-trivial.qml b/doc/src/snippets/declarative/qml-documents/non-trivial.qml new file mode 100644 index 0000000..eb2364b --- /dev/null +++ b/doc/src/snippets/declarative/qml-documents/non-trivial.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE: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 Qt 4.7 + +Rectangle { + width: 240; height: 320; + + resources: [ + Component { + id: contactDelegate + Text { + text: modelData.firstName + " " + modelData.lastName + } + } + ] + + ListView { + anchors.fill: parent + model: contactModel + delegate: contactDelegate + } +} +//! [document] diff --git a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml new file mode 100644 index 0000000..cd0a1f7 --- /dev/null +++ b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Rectangle { + property alias text: textItem.text + + width: 100; height: 30 + border.width: 1 + radius: 5 + smooth: true + + gradient: Gradient { + GradientStop { position: 0.0; color: "darkGray" } + GradientStop { position: 0.5; color: "black" } + GradientStop { position: 1.0; color: "darkGray" } + } + + Text { + id: textItem + anchors.centerIn: parent + font.pointSize: 20 + color: "white" + } + +} +//! [document] diff --git a/doc/src/snippets/declarative/qmldocuments.qml b/doc/src/snippets/declarative/qmldocuments.qml deleted file mode 100644 index c19a658..0000000 --- a/doc/src/snippets/declarative/qmldocuments.qml +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -//![0] -import Qt 4.7 - -Rectangle { - property alias text: textItem.text - - width: 100; height: 30 - border.width: 1 - radius: 5 - smooth: true - - gradient: Gradient { - GradientStop { position: 0.0; color: "darkGray" } - GradientStop { position: 0.5; color: "black" } - GradientStop { position: 1.0; color: "darkGray" } - } - - Text { - id: textItem - anchors.centerIn: parent - font.pointSize: 20 - color: "white" - } - -} -//![0] -- cgit v0.12 From bdabeaf6e35d6b7602e944ee78e59c57313b80cd Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 13:45:43 +0200 Subject: Doc: Updated licenses to the three clause BSD license. --- doc/src/snippets/declarative/anchorchanges.qml | 53 ++++++++++---------- doc/src/snippets/declarative/behavior.qml | 57 +++++++++++----------- doc/src/snippets/declarative/coloranimation.qml | 57 +++++++++++----------- doc/src/snippets/declarative/component.qml | 57 +++++++++++----------- doc/src/snippets/declarative/listmodel-modify.qml | 53 ++++++++++---------- doc/src/snippets/declarative/listmodel-nested.qml | 53 ++++++++++---------- doc/src/snippets/declarative/listmodel-simple.qml | 53 ++++++++++---------- doc/src/snippets/declarative/numberanimation.qml | 57 +++++++++++----------- doc/src/snippets/declarative/parallelanimation.qml | 57 +++++++++++----------- doc/src/snippets/declarative/parentanimation.qml | 53 ++++++++++---------- doc/src/snippets/declarative/parentchange.qml | 53 ++++++++++---------- doc/src/snippets/declarative/propertyaction.qml | 53 ++++++++++---------- doc/src/snippets/declarative/propertyanimation.qml | 53 ++++++++++---------- doc/src/snippets/declarative/propertychanges.qml | 53 ++++++++++---------- doc/src/snippets/declarative/qtobject.qml | 57 +++++++++++----------- doc/src/snippets/declarative/rotationanimation.qml | 53 ++++++++++---------- .../snippets/declarative/sequentialanimation.qml | 57 +++++++++++----------- doc/src/snippets/declarative/state-when.qml | 57 +++++++++++----------- doc/src/snippets/declarative/state.qml | 57 +++++++++++----------- doc/src/snippets/declarative/states.qml | 57 +++++++++++----------- doc/src/snippets/declarative/systempalette.qml | 57 +++++++++++----------- .../snippets/declarative/transition-from-to.qml | 57 +++++++++++----------- .../snippets/declarative/transition-reversible.qml | 53 ++++++++++---------- doc/src/snippets/declarative/transition.qml | 57 +++++++++++----------- doc/src/snippets/declarative/visualdatamodel.qml | 53 ++++++++++---------- .../declarative/visualdatamodel_rootindex/main.cpp | 57 +++++++++++----------- 26 files changed, 704 insertions(+), 730 deletions(-) diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml index 993618b..3f11421 100644 --- a/doc/src/snippets/declarative/anchorchanges.qml +++ b/doc/src/snippets/declarative/anchorchanges.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/declarative/behavior.qml index 420dfc4..4260e38 100644 --- a/doc/src/snippets/declarative/behavior.qml +++ b/doc/src/snippets/declarative/behavior.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/declarative/coloranimation.qml index 4e35f22..7e8e9fe 100644 --- a/doc/src/snippets/declarative/coloranimation.qml +++ b/doc/src/snippets/declarative/coloranimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/declarative/component.qml index 09c4aa2..a0ab28c 100644 --- a/doc/src/snippets/declarative/component.qml +++ b/doc/src/snippets/declarative/component.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/declarative/listmodel-modify.qml index 03fb314..8f381f7 100644 --- a/doc/src/snippets/declarative/listmodel-modify.qml +++ b/doc/src/snippets/declarative/listmodel-modify.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/declarative/listmodel-nested.qml index 4ae43ff..3d876a3 100644 --- a/doc/src/snippets/declarative/listmodel-nested.qml +++ b/doc/src/snippets/declarative/listmodel-nested.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/declarative/listmodel-simple.qml index 00b8cb0..382fd13 100644 --- a/doc/src/snippets/declarative/listmodel-simple.qml +++ b/doc/src/snippets/declarative/listmodel-simple.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/declarative/numberanimation.qml index 57d23b1..0a1d5a4 100644 --- a/doc/src/snippets/declarative/numberanimation.qml +++ b/doc/src/snippets/declarative/numberanimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/declarative/parallelanimation.qml index d823b4f..a8e80cd 100644 --- a/doc/src/snippets/declarative/parallelanimation.qml +++ b/doc/src/snippets/declarative/parallelanimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/declarative/parentanimation.qml index 7f11a43..506eff4 100644 --- a/doc/src/snippets/declarative/parentanimation.qml +++ b/doc/src/snippets/declarative/parentanimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml index ea50832..c704f12 100644 --- a/doc/src/snippets/declarative/parentchange.qml +++ b/doc/src/snippets/declarative/parentchange.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml index 1a15469..ff299f1 100644 --- a/doc/src/snippets/declarative/propertyaction.qml +++ b/doc/src/snippets/declarative/propertyaction.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml index 059cde5..55ea9f6 100644 --- a/doc/src/snippets/declarative/propertyanimation.qml +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/propertychanges.qml b/doc/src/snippets/declarative/propertychanges.qml index 9f119bf..5959e54 100644 --- a/doc/src/snippets/declarative/propertychanges.qml +++ b/doc/src/snippets/declarative/propertychanges.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/declarative/qtobject.qml index 970fa16..bd48390 100644 --- a/doc/src/snippets/declarative/qtobject.qml +++ b/doc/src/snippets/declarative/qtobject.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/rotationanimation.qml b/doc/src/snippets/declarative/rotationanimation.qml index b56cb3f..a0f6354 100644 --- a/doc/src/snippets/declarative/rotationanimation.qml +++ b/doc/src/snippets/declarative/rotationanimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/declarative/sequentialanimation.qml index a15f7f3..bf73be5 100644 --- a/doc/src/snippets/declarative/sequentialanimation.qml +++ b/doc/src/snippets/declarative/sequentialanimation.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/declarative/state-when.qml index 6d3bb75..8e38f82 100644 --- a/doc/src/snippets/declarative/state-when.qml +++ b/doc/src/snippets/declarative/state-when.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml index ce2653b..5f43947 100644 --- a/doc/src/snippets/declarative/state.qml +++ b/doc/src/snippets/declarative/state.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml index 127e3a7..1f9dc2c 100644 --- a/doc/src/snippets/declarative/states.qml +++ b/doc/src/snippets/declarative/states.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/declarative/systempalette.qml index 98b333e..cf5c902 100644 --- a/doc/src/snippets/declarative/systempalette.qml +++ b/doc/src/snippets/declarative/systempalette.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml index 615de17..09949fc 100644 --- a/doc/src/snippets/declarative/transition-from-to.qml +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml index 8a7b69a..367ad49 100644 --- a/doc/src/snippets/declarative/transition-reversible.qml +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml index 098d509..a79e483 100644 --- a/doc/src/snippets/declarative/transition.qml +++ b/doc/src/snippets/declarative/transition.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/declarative/visualdatamodel.qml index cdde513..231e4dd 100644 --- a/doc/src/snippets/declarative/visualdatamodel.qml +++ b/doc/src/snippets/declarative/visualdatamodel.qml @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp index 174adee..8d8004d 100644 --- a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp @@ -6,35 +6,34 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** +** $QT_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$ ** ****************************************************************************/ -- cgit v0.12 From 6c9e0053d86311741d3e737882cdb6ff882d89ef Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 14:59:25 +0200 Subject: Doc: Updated QML snippets. --- doc/src/snippets/declarative/borderimage/borderimage-tiled.qml | 8 ++++---- doc/src/snippets/declarative/image.qml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml index 575e9fd..e792814 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml @@ -45,15 +45,15 @@ Rectangle { color: "white" width: 180; height: 180 -//! [scaled border image] +//! [tiled border image] BorderImage { width: 180; height: 180 border { left: 30; top: 30; right: 30; bottom: 30 } - horizontalTileMode: BorderImage.Round - verticalTileMode: BorderImage.Round + horizontalTileMode: BorderImage.Repeat + verticalTileMode: BorderImage.Repeat source: "pics/borderframe.png" } -//! [scaled border image] +//! [tiled border image] Rectangle { x: 30; y: 0 diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/declarative/image.qml index b84cbcb..b0ae032 100644 --- a/doc/src/snippets/declarative/image.qml +++ b/doc/src/snippets/declarative/image.qml @@ -41,5 +41,5 @@ import Qt 4.7 Image { - source: "qtlogo.png" + source: "pics/qtlogo.png" } -- cgit v0.12 From 338c408970212211228882e0adc305add694a2d6 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 15:00:09 +0200 Subject: Doc: Used snippets for the Beginning QML document. License update. --- doc/src/declarative/qml-intro.qdoc | 26 +++++++------- .../snippets/declarative/qml-intro/anchors1.qml | 42 ++++++++++++++++++++++ .../snippets/declarative/qml-intro/anchors2.qml | 42 ++++++++++++++++++++++ .../snippets/declarative/qml-intro/anchors3.qml | 40 +++++++++++++++++++++ .../declarative/qml-intro/basic-syntax.qml | 40 +++++++++++++++++++++ .../declarative/qml-intro/hello-world1.qml | 42 ++++++++++++++++++++++ .../declarative/qml-intro/hello-world2.qml | 40 +++++++++++++++++++++ .../declarative/qml-intro/hello-world3.qml | 40 +++++++++++++++++++++ .../declarative/qml-intro/hello-world4.qml | 40 +++++++++++++++++++++ .../declarative/qml-intro/hello-world5.qml | 42 ++++++++++++++++++++++ .../declarative/qml-intro/number-animation1.qml | 42 ++++++++++++++++++++++ .../declarative/qml-intro/number-animation2.qml | 42 ++++++++++++++++++++++ .../snippets/declarative/qml-intro/rectangle.qml | 42 ++++++++++++++++++++++ .../qml-intro/sequential-animation1.qml | 42 ++++++++++++++++++++++ .../qml-intro/sequential-animation2.qml | 40 +++++++++++++++++++++ .../qml-intro/sequential-animation3.qml | 42 ++++++++++++++++++++++ doc/src/snippets/declarative/qml-intro/states1.qml | 42 ++++++++++++++++++++++ .../declarative/qml-intro/transformations1.qml | 42 ++++++++++++++++++++++ 18 files changed, 715 insertions(+), 13 deletions(-) diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc index 13c8e4f..63d6825 100644 --- a/doc/src/declarative/qml-intro.qdoc +++ b/doc/src/declarative/qml-intro.qdoc @@ -47,7 +47,7 @@ Javascript is easier to learn than C++ and can be embedded into the QML files or imported from a separate file. \bold{In QML the types of various 'objects' are referred to as \l {QML -Elements}{ elements}}. +Elements}{elements}}. An element usually has various \e properties that help define the element. For example, if we created an element called Circle then the radius of the circle @@ -56,7 +56,7 @@ would be a property. \section1 A First Look -The basic syntax of an \l {QML Elements}{element} is +The basic syntax of an \l{QML Elements}{element} is \snippet doc/src/snippets/declarative/qml-intro/basic-syntax.qml basic syntax @@ -82,7 +82,7 @@ want a rectangle that is 500 pixels by 400 pixels in the x and y directions We can implement this \l Rectangle with these properties this way -\quotefile doc/src/snippets/declarative/qml-intro/rectangle.qml +\snippet doc/src/snippets/declarative/qml-intro/rectangle.qml document This is a valid QML script. To run it, copy it and save it to a file, say myexample.qml, and on the command line run the following command: @@ -113,7 +113,7 @@ Text is handled by a different element called \l Text. We need to create a property to "Hello World!". So to set the text to "Hello world" and the background colour to light gray, -\quotefile doc/src/snippets/declarative/qml-intro/hello-world1.qml +\snippet doc/src/snippets/declarative/qml-intro/hello-world1.qml document \section1 Hello World Again @@ -172,7 +172,7 @@ text, also make it 150 by 150 pixels in size, Adding the Hello World example, with the text and the image example we can write a simple piece of QML that starts to look a bit better. -\quotefile doc/src/snippets/declarative/qml-intro/hello-world5.qml +\snippet doc/src/snippets/declarative/qml-intro/hello-world5.qml document The result is still quite simple @@ -203,7 +203,7 @@ If we want to position an image at the bottom of the rectangle it is inside. I have to specify that the bottom of the image is also at the bottom of the rectangle -\quotefile doc/src/snippets/declarative/qml-intro/anchors1.qml +\snippet doc/src/snippets/declarative/qml-intro/anchors1.qml document This places the logo at the bottom left of the window. @@ -222,7 +222,7 @@ the bottomMargin property is used. So the new actions for the script are Encoded into QML the script becomes -\quotefile doc/src/snippets/declarative/qml-intro/anchors2.qml +\snippet doc/src/snippets/declarative/qml-intro/anchors2.qml document Run this and resize the window. You will see that now the position of the image adjusts during the resize. @@ -282,7 +282,7 @@ vertically by a factor of 1.5 and by 1.2 horizontally. Using the example above as the basis for this we have, -\quotefile doc/src/snippets/declarative/qml-intro/transformations1.qml +\snippet doc/src/snippets/declarative/qml-intro/transformations1.qml document The code block in \c image1 starting with \c transform specifies that the \l {Item::transform}{transform} property will be a Rotation through -90 @@ -320,7 +320,7 @@ from \l Item. The rotation property is a real number that specifies the angle in a clockwise direction for the rotation of the object. Here is the code for our animated rotating image. -\quotefile doc/src/snippets/declarative/qml-intro/number-animation1.qml +\snippet doc/src/snippets/declarative/qml-intro/number-animation1.qml document The \c {transformOrigin: Item.Center} is redundant since this is the default axis of rotation anyway. But if you change \c Center to \c BottomRight you @@ -333,7 +333,7 @@ combination. For example, if the task had been to animate the rotation about the y-axis passing through the center of the image then the following code would do it. -\quotefile doc/src/snippets/declarative/qml-intro/number-animation2.qml +\snippet doc/src/snippets/declarative/qml-intro/number-animation2.qml document Here there is a rectangle 600 by 400 pixels. Placed within that rectangle is an image 100 by 100 pixels. It is rotated about the center of the image @@ -362,7 +362,7 @@ will be animating the position and the size of the image. First create two images -\quotefile doc/src/snippets/declarative/qml-intro/sequential-animation1.qml +\snippet doc/src/snippets/declarative/qml-intro/sequential-animation1.qml document We will add to 'image1' a SequentialAnimation from x = 20 to the target of x = 450. The 'from' values will be used because we will be repeating the @@ -390,7 +390,7 @@ and image1 to 1 and image2 to 2 then image2 will be in the foreground and image1 in the background. When image1 passes image2 it will pass behind it. The completed code looks like -\quotefile doc/src/snippets/declarative/qml-intro/sequential-animation3.qml +\snippet doc/src/snippets/declarative/qml-intro/sequential-animation3.qml document The \c {easing.type} has many options, expressed as a string. It specifies the kind of equation that describes the acceleration of the property value, not @@ -468,7 +468,7 @@ will be the default state. We will just go to 'night' by clicking and holding the left mouse button down, releasing the mouse button will reverse the process -\quotefile doc/src/snippets/declarative/qml-intro/states1.qml +\snippet doc/src/snippets/declarative/qml-intro/states1.qml document Several new things appear in this sample. Firstly, we use a \l MouseArea element to detect mouse clicks in the \e mainRectangle. Secondly, we use diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/qml-intro/anchors1.qml index 320d0e7..09ef3b2 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors1.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors1.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -12,3 +53,4 @@ Rectangle { anchors.bottom: myWin.bottom } } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/qml-intro/anchors2.qml index bb9ed75..ef0ec1f 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors2.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors2.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -14,3 +55,4 @@ Rectangle { anchors.bottomMargin: 10 } } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml index 99d2ceb..008ad1a 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors3.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors3.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import Qt 4.7 Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml index b241500..686a927 100644 --- a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml +++ b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + // Note: this file is not intended to be run. //! [basic syntax] diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/declarative/qml-intro/hello-world1.qml index 244175c..9b91049 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world1.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world1.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -9,3 +50,4 @@ Rectangle { color: "lightgray" } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml index 73b2f8c..ddc1017 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world2.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world2.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import Qt 4.7 Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml index 112f775..f1102c2 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world3.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world3.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import Qt 4.7 Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/qml-intro/hello-world4.qml index c97334e..c18fe15 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world4.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import Qt 4.7 Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/qml-intro/hello-world5.qml index 74a612a..bde8dc3 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world5.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -21,3 +62,4 @@ Rectangle { color: "lightgray" } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/qml-intro/number-animation1.qml index d80a8dc..8d8d747 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation1.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -20,3 +61,4 @@ Rectangle { } } } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml index beb3114..d556c21 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -22,3 +63,4 @@ Rectangle { } } } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/doc/src/snippets/declarative/qml-intro/rectangle.qml index 7235e9b..0078813 100644 --- a/doc/src/snippets/declarative/qml-intro/rectangle.qml +++ b/doc/src/snippets/declarative/qml-intro/rectangle.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 // This is a comment. And below myRectangle is defined. @@ -6,3 +47,4 @@ Rectangle { width: 500 height: 400 } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml index 125f99f..e68de20 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -21,3 +62,4 @@ Rectangle { z: 2 } } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml index 08c598b..31835a1 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import Qt 4.7 Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml index 5e7b400..f83a966 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] Rectangle { id: mainRec width: 600 @@ -44,3 +85,4 @@ Rectangle { } } } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/qml-intro/states1.qml index fcd3f53..9619eb7 100644 --- a/doc/src/snippets/declarative/qml-intro/states1.qml +++ b/doc/src/snippets/declarative/qml-intro/states1.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -50,3 +91,4 @@ Rectangle { } ] } +//! [document] diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/qml-intro/transformations1.qml index 1504729..af39e69 100644 --- a/doc/src/snippets/declarative/qml-intro/transformations1.qml +++ b/doc/src/snippets/declarative/qml-intro/transformations1.qml @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] import Qt 4.7 Rectangle { @@ -36,3 +77,4 @@ Rectangle { ] } } +//! [document] -- cgit v0.12 From ee7e17bb48c7f6ca0c74f1df3e146e99f56f2060 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 15:01:38 +0200 Subject: Doc: Started to reorganize the QML documentation structure. --- doc/src/declarative/declarativeui.qdoc | 97 +++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index ed8b734..506d774 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -32,28 +32,36 @@ \brief Qt Quick provides a declarative framework for building highly dynamic, custom user interfaces. -Qt Quick provides a declarative framework for building highly dynamic, -custom user interfaces from a rich set of \l{QML Elements}{QML elements}. -Qt Quick helps programmers and designers collaborate to -build the fluid user interfaces that are becoming common in portable -consumer devices, such as mobile phones, media players, set-top boxes -and netbooks. Qt Quick consists of the QtDeclarative C++ module, QML, and -the integration of both of these into the Qt Creator IDE. Using the QtDeclarative -C++ module, you can load and interact with QML files from your Qt application. - -QML is an extension to \l{About JavaScript}{JavaScript}, that provides -a mechanism to declaratively build an object tree of -\l{QML Elements}{QML elements}. QML improves the integration between -JavaScript and Qt's existing QObject-based type system, adds support for -automatic \l{Property Binding}{property bindings} and provides +\section1 Introduction + +Qt Quick is a collection of technologies that are designed to help +developers create the kind of intuitive, modern-looking, fluid user +interfaces that are increasingly used on mobile phones, media players, +set-top boxes and other portable devices. + +Qt Quick consists of a rich set of user interface elements, a declarative +language for describing user interfaces and a language runtime. A collection +of C++ APIs is used to integrate these high level features with classic +Qt applications. + +\section2 QML, Elements and the QtDeclarative Module + +User interfaces and their behavior are described using QML, an extension to +\l{About JavaScript}{JavaScript} that lets developers and designers +use a declarative syntax to specify each user interface in terms of +\l{QML Elements}{QML elements}. These elements are a sophisticated set of +graphical and behavioral building blocks that can be combined together in +\l{QML Documents}{QML documents} to build components ranging in complexity +from simple buttons and sliders, to complete Internet-enabled applications. + +QML improves the integration between JavaScript and Qt's existing +QObject-based type system, adds support for automatic +\l{Property Binding}{property bindings} and provides \l{Network Transparency}{network transparency} at the language level. -The \l{QML Elements}{QML elements} are a sophisticated set of -graphical and behavioral building blocks. These different elements -are combined together in \l{QML Documents}{QML documents} to build -components ranging in complexity from simple buttons and sliders, to -complete Internet-enabled applications like a photo browser for the -popular \l{http://www.flickr.com}{Flickr} photo-sharing site. +The QtDeclarative module implements the interface between the QML language +and the elements available to it. It also provides a C++ API that can be +used to load and interact with QML files from within Qt applications. Qt Quick builds on \l{QML for Qt programmers}{Qt's existing strengths}. QML can be be used to incrementally extend an existing application or @@ -65,33 +73,53 @@ Module. \list \o \l{Introduction to the QML language} -\o \l{QML Tutorial}{Tutorial: 'Hello World'} -\o \l{QML Advanced Tutorial}{Tutorial: 'Same Game'} -\o \l{QML Examples and Demos} \o \l{QML for Qt Programmers} \o \l{Getting Started Programming with QML} \o \l{Beginning Qt Quick} \endlist -\section1 Core QML Features +\list +\o \l{QML Tutorial}{Tutorial: "Hello World"} +\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"} +\o \l{QML Examples and Demos} +\endlist + +\section1 QML Concepts + \list \o \l{QML Documents} \o \l{Property Binding} -\o \l{Network Transparency} \o \l{QML Scope} -\o \l{Integrating JavaScript} -\o \l{Data Models} +\o \l{QML Modules} \o \l{Anchor-based Layout in QML} +\endlist + +\section1 User Interaction + +\list +\o \l{Keyboard Focus in QML} \o \l{QML States} \o \l{QML Animation} -\o \l{Keyboard Focus in QML} -\o \l{QML Modules} +\endlist + +\section1 Handling Data + +\list +\o \l{Data Models} +\o \l{Network Transparency} +\endlist + +\section1 Architecture + +\list +\o \l{Qt Declarative UI Runtime} +\o \l{Integrating JavaScript} \o \l{Extending types from QML} \o \l{Dynamic Object Management in QML} -\o \l{Qt Declarative UI Runtime} \endlist \section1 Using QML with C++ + \list \o \l{Using QML in C++ Applications} \o \l{Integrating QML with existing Qt UI code} @@ -100,6 +128,7 @@ Module. \endlist \section1 Reference + \list \o \l{QML Elements} \o \l{QML Global Object} @@ -111,4 +140,12 @@ Module. \o \l{QML Performance} \o \l{QML Coding Conventions} \endlist + +\section1 Online Examples + +\list +\o Forum Nokia: +\l{http://wiki.forum.nokia.com/index.php/Qt_Quick_examples_for_porting}{Qt Quick +examples for porting} +\endlist */ -- cgit v0.12 From 74833a2377a7570a910d970c272b846043ae3206 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 15:03:31 +0200 Subject: Doc: Moved the inline code into snippet files. --- doc/src/declarative/qdeclarativedocument.qdoc | 67 ++++----------------------- 1 file changed, 10 insertions(+), 57 deletions(-) diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc index 068297a..4aed63f 100644 --- a/doc/src/declarative/qdeclarativedocument.qdoc +++ b/doc/src/declarative/qdeclarativedocument.qdoc @@ -28,34 +28,17 @@ /*! \page qdeclarativedocuments.html \title QML Documents +\brief A description of QML documents and the kind of content they contain. -A QML document is a block of QML source code. QML documents generally correspond to files -stored on a disk or network resource, but can also be constructed directly from text data. +\section1 Introduction -Here is a simple QML document: +A QML document is a block of QML source code. QML documents generally correspond to files +stored on a disk or at a location on a network, but they can also be constructed directly +from text data. -\code -import Qt 4.7 +Here is a simple QML document: -Rectangle { - width: 240; height: 320; - - resources: [ - Component { - id: contactDelegate - Text { - text: modelData.firstName + " " + modelData.lastName - } - } - ] - - ListView { - anchors.fill: parent - model: contactModel - delegate: contactDelegate - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-documents/non-trivial.qml document QML documents are always encoded in UTF-8 format. @@ -96,7 +79,7 @@ Each instance is created with a different value for its \c text property: \o application.qml \row -\o \snippet doc/src/snippets/declarative/qmldocuments.qml 0 +\o \snippet doc/src/snippets/declarative/qmldocuments.qml document \o \qml import Qt 4.7 @@ -153,39 +136,9 @@ These final two examples are behaviorally identical to the original document. \table \row \o -\code -import Qt 4.7 - -Rectangle { - width: 240; height: 320; - - ListView { - anchors.fill: parent - model: contactModel - delegate: Component { - Text { - text: modelData.firstName + " " + modelData.lastName - } - } - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-documents/inline-component.qml document \o -\code -import Qt 4.7 - -Rectangle { - width: 240; height: 320; - - ListView { - anchors.fill: parent - model: contactModel - delegate: Text { - text: modelData.firstName + " " + modelData.lastName - } - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-documents/inline-text-component.qml document \endtable \sa QDeclarativeComponent -- cgit v0.12 From 23737d8df57ee77127c4b891e25339a3f73d0fca Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 15:05:48 +0200 Subject: Doc: Started to improve QML reference documentation. --- .../declarative/borderimage/normal-image.qml | 4 +- .../graphicsitems/qdeclarativeanimatedimage.cpp | 57 +++++------ .../graphicsitems/qdeclarativeborderimage.cpp | 108 ++++++++++++++++++--- .../graphicsitems/qdeclarativeimage.cpp | 46 +++++---- 4 files changed, 152 insertions(+), 63 deletions(-) diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/declarative/borderimage/normal-image.qml index adac4f3..76ec6e2 100644 --- a/doc/src/snippets/declarative/borderimage/normal-image.qml +++ b/doc/src/snippets/declarative/borderimage/normal-image.qml @@ -45,11 +45,11 @@ Rectangle { color: "white" width: 120; height: 120 -//! [scaled border image] +//! [normal image] Image { source: "pics/borderframe.png" } -//! [scaled border image] +//! [normal image] Rectangle { x: 30; y: 0 diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index e0a2149..16d1777 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -63,35 +63,32 @@ QT_BEGIN_NAMESPACE \inherits Image \since 4.7 \ingroup basic-visual-elements - - The AnimatedImage element provides for playing animations stored as images containing a series of frames, - such as GIF files. - + + The AnimatedImage element extends the features of the \l Image element, providing + a way to play animations stored as images containing a series of frames, + such as those stored in GIF files. + + Information about the current frame and totla length of the animation can be + obtained using the \l currentFrame and \l frameCount properties. You can + start, pause and stop the animation by changing the values of the \l playing + and \l paused properties. + The full list of supported formats can be determined with QMovie::supportedFormats(). - \table - \row - \o \image animatedimageitem.gif - \o - \qml - import Qt 4.7 + \section1 Example Usage - Rectangle { - width: animation.width; height: animation.height + 8 + \beginfloatleft + \image animatedimageitem.gif + \endfloat - AnimatedImage { id: animation; source: "animation.gif" } + The following QML shows how to display an animated image and obtain information + about its state, such as the current frame and total number of frames. + The result is an animated image with a simple progress indicator underneath it. - Rectangle { - property int frames: animation.frameCount + \clearfloat + \snippet doc/src/snippets/declarative/animatedimage.qml document - width: 4; height: 8 - x: (animation.width - width) * animation.currentFrame / frames - y: animation.height - color: "red" - } - } - \endqml - \endtable + \sa BorderImage, Image */ QDeclarativeAnimatedImage::QDeclarativeAnimatedImage(QDeclarativeItem *parent) @@ -109,7 +106,8 @@ QDeclarativeAnimatedImage::~QDeclarativeAnimatedImage() \qmlproperty bool AnimatedImage::paused This property holds whether the animated image is paused. - Defaults to false, and can be set to true when you want to pause. + By default, this property is false. Set it to true when you want to pause + the animation. */ bool QDeclarativeAnimatedImage::isPaused() const { @@ -133,7 +131,8 @@ void QDeclarativeAnimatedImage::setPaused(bool pause) \qmlproperty bool AnimatedImage::playing This property holds whether the animated image is playing. - Defaults to true, so as to start playing immediately. + By defaults, this property is true, meaning that the animation + will start playing immediately. */ bool QDeclarativeAnimatedImage::isPlaying() const { @@ -161,9 +160,11 @@ void QDeclarativeAnimatedImage::setPlaying(bool play) \qmlproperty int AnimatedImage::currentFrame \qmlproperty int AnimatedImage::frameCount - currentFrame is the frame that is currently visible. Watching when this changes can - allow other things to animate at the same time as the image. frameCount is the number - of frames in the animation. For some animation formats, frameCount is unknown and set to zero. + currentFrame is the frame that is currently visible. By monitoring this property + for changes, you can animate other items at the same time as the image. + + frameCount is the number of frames in the animation. For some animation formats, + frameCount is unknown and has a value of zero. */ int QDeclarativeAnimatedImage::currentFrame() const { diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index e0c7fc2..5a9a18d 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -56,27 +56,97 @@ QT_BEGIN_NAMESPACE \brief The BorderImage element provides an image that can be used as a border. \inherits Item \since 4.7 - \ingroup qm-basic-visual-elements + \ingroup qml-basic-visual-elements - A BorderImage breaks an image into 9 sections, as shown below: + The BorderImage element is used to create borders out of images by scaling or tiling + parts of each image. + + A BorderImage element breaks a source image, specified using the \l url property, + into 9 regions, as shown below: \image declarative-scalegrid.png - When the image is scaled: + When the image is scaled, regions of the source image are scaled or tiled to + create the displayed border image in the following way: + \list - \i the corners (sections 1, 3, 7, and 9) are not scaled at all - \i sections 2 and 8 are scaled according to \l{BorderImage::horizontalTileMode}{horizontalTileMode} - \i sections 4 and 6 are scaled according to \l{BorderImage::verticalTileMode}{verticalTileMode} - \i the middle (section 5) is scaled according to both \l{BorderImage::horizontalTileMode}{horizontalTileMode} and \l{BorderImage::verticalTileMode}{verticalTileMode} + \i The corners (regions 1, 3, 7, and 9) are not scaled at all. + \i Regions 2 and 8 are scaled according to + \l{BorderImage::horizontalTileMode}{horizontalTileMode}. + \i Regions 4 and 6 are scaled according to + \l{BorderImage::verticalTileMode}{verticalTileMode}. + \i The middle (region 5) is scaled according to both + \l{BorderImage::horizontalTileMode}{horizontalTileMode} and + \l{BorderImage::verticalTileMode}{verticalTileMode}. \endlist - Examples: - \snippet snippets/declarative/borderimage.qml 0 + The regions of the image are defined using the \l border property group, which + describes the distance from each edge of the source image to use as a border. + + \section1 Example Usage + + The following examples show the effects of the different modes on an image. + Guide lines are overlaid onto the image to show the different regions of the + image as described above. + + \beginfloatleft + \image qml-borderimage-normal-image.png + \endfloat + + An unscaled image is displayed using an Image element. The \l border property is + used to determine the parts of the image that will lie inside the unscaled corner + areas and the parts that will be stretched horizontally and vertically. + + \snippet doc/src/snippets/declarative/borderimage/normal-image.qml normal image + + \clearfloat + \beginfloatleft + \image qml-borderimage-scaled.png + \endfloat + + A BorderImage element is used to display the image, and it is given a size that is + larger than the original image. Since the \l horizontalTileMode property is set to + \l{BorderImage::horizontalTileMode}{BorderImage.Stretch}, the parts of image in + regions 2 and 8 are stretched horizontally. Since the \l verticalTileMode property + is set to \l{BorderImage::verticalTileMode}{BorderImage.Stretch}, the parts of image + in regions 4 and 6 are stretched vertically. + + \snippet doc/src/snippets/declarative/borderimage/borderimage-scaled.qml scaled border image - \image BorderImage.png + \clearfloat + \beginfloatleft + \image qml-borderimage-tiled.png + \endfloat - The \l{declarative/imageelements/borderimage}{BorderImage example} shows how a BorderImage can be used to simulate a shadow effect on a - rectangular item. + Again, a large BorderImage element is used to display the image. With the + \l horizontalTileMode property set to \l{BorderImage::horizontalTileMode}{BorderImage.Repeat}, + the parts of image in regions 2 and 8 are tiled so that they fill the space at the + top and bottom of the element. Similarly, the \l verticalTileMode property is set to + \l{BorderImage::verticalTileMode}{BorderImage.Repeat}, the parts of image in regions + 4 and 6 are tiled so that they fill the space at the left and right of the element. + + \snippet doc/src/snippets/declarative/borderimage/borderimage-tiled.qml tiled border image + + \clearfloat + In some situations, the width of regions 2 and 8 may not be an exact multiple of the width + of the corresponding regions in the source image. Similarly, the height of regions 4 and 6 + may not be an exact multiple of the height of the corresponding regions. It can be useful + to use \l{BorderImage::horizontalTileMode}{BorderImage.Round} instead of + \l{BorderImage::horizontalTileMode}{BorderImage.Repeat} in cases like these. + + The \l{declarative/imageelements/borderimage}{BorderImage example} shows how a BorderImage + can be used to simulate a shadow effect on a rectangular item. + + \section1 Quality and Performance + + By default, any scaled regions of the image are rendered without smoothing to improve + rendering speed. Setting the \l smooth property improves rendering quality of scaled + regions, but may slow down rendering. + + The source image may not be loaded instantaneously, depending on its original location. + Loading progress can be monitored with the \l progress property. + + \sa Image, AnimatedImage */ /*! @@ -127,6 +197,8 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() the image is displayed at its natural size, this property has no visual or performance effect. + By default, this property is set to false. + \note Generally scaling artifacts are only visible if the image is stationary on the screen. A common pattern when animating an image is to disable smooth filtering at the beginning of the animation and reenable it at the conclusion. @@ -251,17 +323,21 @@ void QDeclarativeBorderImage::load() \qmlproperty int BorderImage::border.top \qmlproperty int BorderImage::border.bottom - The 4 border lines (2 horizontal and 2 vertical) break the image into 9 sections, as shown below: + The 4 border lines (2 horizontal and 2 vertical) break the image into 9 sections, + as shown below: \image declarative-scalegrid.png - Each border line (left, right, top, and bottom) specifies an offset in pixels from the respective side. + Each border line (left, right, top, and bottom) specifies an offset in pixels + from the respective edge of the source image. By default, each border line has + a value of 0. + + For example, the following definition sets the bottom line 10 pixels up from + the bottom of the image: - For example: \qml border.bottom: 10 \endqml - sets the bottom line 10 pixels up from the bottom of the image. The border lines can also be specified using a \l {BorderImage::source}{.sci file}. diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 47a410c..eb8b00e 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -51,34 +51,46 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Image QDeclarativeImage \since 4.7 - \ingroup qml-vasic-visual-elements - - \brief The Image element allows you to add bitmaps to a scene. + \ingroup qml-basic-visual-elements + \brief The Image element displays an image in a declarative user interface \inherits Item - An Image element displays a specified \l source image: + The Image element is used to display images in a declarative user interface. - \table - \row - \o \image declarative-qtlogo.png - \o \qml - import Qt 4.7 + The source of the image is specified as a URL using the \l source property. + Images can be supplied in any of the standard image formats supported by Qt, + including bitmap formats such as PNG and JPEG, and vector graphics formats + such as SVG. If you need to display animated images, use the \l AnimatedImage + element. - Image { source: "qtlogo.png" } - \endqml - \endtable + If the \l{Item::width}{width} and \l{Item::height}{height} properties are not + specified, the Image element automatically uses the size of the loaded image. + By default, specifying the width and height of the element causes the image + to be scaled to that size. This behavior can be changed by setting the + \l fillMode property, allowing the image to be stretched and tiled instead. + + \section1 Example Usage + + The following example shows the simplest usage of the Image element. + + \snippet doc/src/snippets/declarative/image.qml + + \beginfloatleft + \image declarative-qtlogo.png + \endfloat + + \clearfloat - If the \l {Item::width}{width} and \l{Item::height}{height} properties are not specified, - the Image element is automatically sized to the loaded image. Image elements can be - stretched and tiled using the \l fillMode property. + \section1 Performance By default, locally available images are loaded immediately, and the user interface is blocked until loading is complete. If a large image is to be loaded, it may be preferable to load the image in a low priority thread, by enabling the \l asynchronous property. - If the image is from a network rather than a local resource, it is automatically loaded - asynchronously, and the \l progress and \l status properties are updated as appropriate. + If the image is obtained from a network rather than a local resource, it is + automatically loaded asynchronously, and the \l progress and \l status properties + are updated as appropriate. Images are cached and shared internally, so if several Image elements have the same \l source, only one copy of the image will be loaded. -- cgit v0.12 From 8785254d4e2b245106ef169fa0bc3d793f1d6507 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 23 Aug 2010 15:06:51 +0200 Subject: Doc: Fixed incorrect use of commands to mark documentation. --- src/declarative/graphicsitems/qdeclarativetext.cpp | 1 - src/declarative/graphicsitems/qdeclarativetextedit.cpp | 1 - src/declarative/util/qdeclarativelistmodel.cpp | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index fcd112e..51d6e8f 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -194,7 +194,6 @@ QSet QTextDocumentWithImageResources::errors; /*! \internal \class QDeclarativeText - \qmlclass Text \brief The QDeclarativeText class provides a formatted text item that you can add to a QDeclarativeView. diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index b8e8726..acc8589 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -106,7 +106,6 @@ TextEdit { /*! \internal \class QDeclarativeTextEdit - \qmlclass TextEdit \brief The QDeclarativeTextEdit class provides an editable formatted text item that you can add to a QDeclarativeView. diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 1f66f0f..8f9b725 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -769,7 +769,7 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) } /*! - \qmlclass ListElement + \qmlclass ListElement QDeclarativeListElement \ingroup qml-working-with-data \since 4.7 \brief The ListElement element defines a data item in a ListModel. -- cgit v0.12 From e566660e222ea194c97c19c26dcb69b5d29ea90c Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Tue, 24 Aug 2010 13:49:31 +1000 Subject: add ofono support and fix crashes ofono support is needed to know what kind of cellular networks are available. --- src/plugins/bearer/connman/connman.pro | 2 + src/plugins/bearer/connman/qconnmanengine.cpp | 162 ++-- src/plugins/bearer/connman/qconnmanengine.h | 3 +- .../bearer/connman/qconnmanservice_linux.cpp | 9 +- .../bearer/connman/qconnmanservice_linux_p.h | 1 + src/plugins/bearer/connman/qofonoservice_linux.cpp | 940 +++++++++++++++++++++ src/plugins/bearer/connman/qofonoservice_linux_p.h | 332 ++++++++ 7 files changed, 1393 insertions(+), 56 deletions(-) create mode 100644 src/plugins/bearer/connman/qofonoservice_linux.cpp create mode 100644 src/plugins/bearer/connman/qofonoservice_linux_p.h diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro index 4be752b..dec408c 100644 --- a/src/plugins/bearer/connman/connman.pro +++ b/src/plugins/bearer/connman/connman.pro @@ -4,12 +4,14 @@ include(../../qpluginbase.pri) QT = core network dbus HEADERS += qconnmanservice_linux_p.h \ + qofonoservice_linux_p.h \ qconnmanengine.h \ ../qnetworksession_impl.h \ ../qbearerengine_impl.h SOURCES += main.cpp \ qconnmanservice_linux.cpp \ + qofonoservice_linux.cpp \ qconnmanengine.cpp \ ../qnetworksession_impl.cpp diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp index 341f7cd..a8b8911 100644 --- a/src/plugins/bearer/connman/qconnmanengine.cpp +++ b/src/plugins/bearer/connman/qconnmanengine.cpp @@ -41,6 +41,7 @@ #include "qconnmanengine.h" #include "qconnmanservice_linux_p.h" +#include "qofonoservice_linux_p.h" #include "../qnetworksession_impl.h" #include @@ -109,7 +110,6 @@ void QConnmanEngine::initialize() QList QConnmanEngine::getConfigurations() { QMutexLocker locker(&mutex); - // foundConfigurations.clear(); getNetworkListing(); QList fetchedConfigurations; QNetworkConfigurationPrivate* cpPriv = 0; @@ -131,7 +131,6 @@ QList QConnmanEngine::getConfigurations() delete config; } return fetchedConfigurations; -// return foundConfigurations; } void QConnmanEngine::getNetworkListing() @@ -149,7 +148,6 @@ void QConnmanEngine::getNetworkListing() } } - void QConnmanEngine::doRequestUpdate() { connmanManager->requestScan(""); @@ -184,11 +182,24 @@ void QConnmanEngine::connectToId(const QString &id) void QConnmanEngine::disconnectFromId(const QString &id) { QMutexLocker locker(&mutex); - QConnmanServiceInterface serv(serviceFromId(id)); + QString servicePath = serviceFromId(id); + QConnmanServiceInterface serv(servicePath); if(!serv.isValid()) { emit connectionError(id, DisconnectionError); } else { - serv.disconnect(); + if(serv.getType() != "cellular") { + serv.disconnect(); + } else { + QOfonoManagerInterface ofonoManager(0); + QString modemPath = ofonoManager.currentModem().path(); + QOfonoDataConnectionManagerInterface dc(modemPath,0); + foreach(const QDBusObjectPath dcPath,dc.getPrimaryContexts()) { + if(dcPath.path().contains(servicePath.section("_",-1))) { + QOfonoPrimaryDataContextInterface primaryContext(dcPath.path(),0); + primaryContext.setActive(false); + } + } + } } } @@ -324,7 +335,6 @@ QString QConnmanEngine::getServiceForNetwork(const QString &netPath) return QString(); } - void QConnmanEngine::propertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value) { Q_UNUSED(path); @@ -376,7 +386,7 @@ void QConnmanEngine::servicePropertyChangedContext(const QString &path,const QSt } } -void QConnmanEngine::networkPropertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value) +void QConnmanEngine::networkPropertyChangedContext(const QString &/*path*/,const QString &/*item*/, const QDBusVariant &/*value*/) { QMutexLocker locker(&mutex); } @@ -388,7 +398,6 @@ void QConnmanEngine::devicePropertyChangedContext(const QString &devpath,const Q QConnmanNetworkInterface network(devpath, this); - QDBusArgument arg = qvariant_cast(value.variant()); QStringList remainingNetworks = qdbus_cast(arg); QString devicetype; @@ -502,10 +511,18 @@ QNetworkConfiguration::StateFlags QConnmanEngine::getStateForService(const QStri QMutexLocker locker(&mutex); QConnmanServiceInterface serv(service); QNetworkConfiguration::StateFlags flag = QNetworkConfiguration::Defined; - if(serv.isFavorite()) { - flag = ( flag | QNetworkConfiguration::Discovered); + if( serv.getType() == "cellular") { + if(serv.isSetupRequired()) { + flag = ( flag | QNetworkConfiguration::Defined); + } else { + flag = ( flag | QNetworkConfiguration::Discovered); + } } else { - flag = QNetworkConfiguration::Undefined; + if(serv.isFavorite()) { + flag = ( flag | QNetworkConfiguration::Discovered); + } else { + flag = QNetworkConfiguration::Undefined; + } } if(serv.getState() == "ready" || serv.getState() == "online") { @@ -524,8 +541,7 @@ QNetworkConfiguration::BearerType QConnmanEngine::typeToBearer(const QString &ty if (type == "bluetooth") return QNetworkConfiguration::BearerBluetooth; if (type == "cellular") { - return QNetworkConfiguration::Bearer2G; - // not handled: CDMA2000 HSPA + return ofonoTechToBearerType(type); } if (type == "wimax") return QNetworkConfiguration::BearerWiMAX; @@ -536,6 +552,51 @@ QNetworkConfiguration::BearerType QConnmanEngine::typeToBearer(const QString &ty return QNetworkConfiguration::BearerUnknown; } +QNetworkConfiguration::BearerType QConnmanEngine::ofonoTechToBearerType(const QString &/*type*/) +{ + QOfonoManagerInterface ofonoManager(this); + QOfonoNetworkRegistrationInterface ofonoNetwork(ofonoManager.currentModem().path(),this); + + if(ofonoNetwork.isValid()) { + foreach(const QDBusObjectPath op,ofonoNetwork.getOperators() ) { + QOfonoNetworkOperatorInterface opIface(op.path(),this); + + foreach(const QString opTech, opIface.getTechnologies()) { + + if(opTech == "gsm") { + return QNetworkConfiguration::Bearer2G; + } + if(opTech == "edge"){ + return QNetworkConfiguration::BearerCDMA2000; //wrong, I know + } + if(opTech == "umts"){ + return QNetworkConfiguration::BearerWCDMA; + } + if(opTech == "hspa"){ + return QNetworkConfiguration::BearerHSPA; + } + if(opTech == "lte"){ + return QNetworkConfiguration::BearerWiMAX; //not exact + } + } + } + } + return QNetworkConfiguration::BearerUnknown; +} + +bool QConnmanEngine::isRoamingAllowed(const QString &context) +{ + QOfonoManagerInterface ofonoManager(this); + QString modemPath = ofonoManager.currentModem().path(); + QOfonoDataConnectionManagerInterface dc(modemPath,this); + foreach(const QDBusObjectPath dcPath,dc.getPrimaryContexts()) { + if(dcPath.path().contains(context.section("_",-1))) { + return dc.isRoamingAllowed(); + } + } + return false; +} + void QConnmanEngine::removeConfiguration(const QString &id) { QMutexLocker locker(&mutex); @@ -564,7 +625,6 @@ void QConnmanEngine::removeConfiguration(const QString &id) void QConnmanEngine::addServiceConfiguration(const QString &servicePath) { - QMutexLocker locker(&mutex); QConnmanServiceInterface *serv; serv = new QConnmanServiceInterface(servicePath); @@ -589,36 +649,31 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath) QString networkName = serv->getName(); - if(serv->getType() == "cellular") { - networkName = serv->getAPN(); - if(networkName.isEmpty()) { - networkName = serv->getName(); - } - } - - cpPriv->name = networkName; - cpPriv->isValid = true; - cpPriv->id = id; - cpPriv->type = QNetworkConfiguration::InternetAccessPoint; - - const QString connectionType = serv->getType(); if (connectionType == "ethernet") { cpPriv->bearerType = QNetworkConfiguration::BearerEthernet; } else if (connectionType == "wifi") { cpPriv->bearerType = QNetworkConfiguration::BearerWLAN; } else if (connectionType == "cellular") { - const QString mode = serv->getMode(); - if (mode == "gprs" || mode == "edge") - cpPriv->bearerType = QNetworkConfiguration::Bearer2G; - else if (mode == "umts") - cpPriv->bearerType = QNetworkConfiguration::BearerWCDMA; + cpPriv->bearerType = ofonoTechToBearerType("cellular"); + if(servicePath.isEmpty()) { + networkName = serv->getAPN(); + if(networkName.isEmpty()) { + networkName = serv->getName(); + } + } + cpPriv->roamingSupported = isRoamingAllowed(servicePath); } else if (connectionType == "wimax") { cpPriv->bearerType = QNetworkConfiguration::BearerWiMAX; } else { cpPriv->bearerType = QNetworkConfiguration::BearerUnknown; } + cpPriv->name = networkName; + cpPriv->isValid = true; + cpPriv->id = id; + cpPriv->type = QNetworkConfiguration::InternetAccessPoint; + if(serv->getSecurity() == "none") { cpPriv->purpose = QNetworkConfiguration::PublicPurpose; } else { @@ -635,7 +690,6 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath) foundConfigurations.append(cpPriv); configInterfaces[cpPriv->id] = device.getInterface(); - locker.unlock(); emit configurationAdded(ptr); locker.relock(); @@ -646,7 +700,6 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath) void QConnmanEngine::addNetworkConfiguration(const QString &networkPath) { QMutexLocker locker(&mutex); - if(networkPath.isNull()) return; @@ -662,10 +715,9 @@ void QConnmanEngine::addNetworkConfiguration(const QString &networkPath) id = QString::number(qHash(networkPath)); } else { id = QString::number(qHash(servicePath)); - serv = new QConnmanServiceInterface(servicePath,this); - connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant))); - + serv = new QConnmanServiceInterface(servicePath,this); + connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), + this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant))); } if (!id.isEmpty() && !accessPointConfigurations.contains(id)) { @@ -684,7 +736,6 @@ void QConnmanEngine::addNetworkConfiguration(const QString &networkPath) if(networkName.isEmpty()) networkName = "Hidden Network"; - QNetworkConfiguration::BearerType bearerType; if(servicePath.isEmpty()) { @@ -693,21 +744,14 @@ void QConnmanEngine::addNetworkConfiguration(const QString &networkPath) QConnmanDeviceInterface device(devicePath,this); bearerType = typeToBearer(device.getType()); } else { - bearerType = typeToBearer(serv->getType()); - } - - if (bearerType == QNetworkConfiguration::Bearer2G) { - QString mode = serv->getMode(); - if (mode == "gprs" || mode == "edge") { - bearerType = QNetworkConfiguration::Bearer2G; - } else if (mode == "umts") { - bearerType = QNetworkConfiguration::BearerWCDMA; - } - if(servicePath.isEmpty()) { - networkName = serv->getAPN(); - if(networkName.isEmpty()) { + if(serv->getType() == "cellular") { + bearerType = ofonoTechToBearerType("cellular"); + if(servicePath.isEmpty()) { networkName = serv->getName(); } + cpPriv->roamingSupported = isRoamingAllowed(servicePath); + } else { + bearerType = typeToBearer(serv->getType()); } } @@ -775,7 +819,19 @@ void QConnmanConnectThread::run() if(!serv.isValid()) { emit connectionError(identifier, QBearerEngineImpl::InterfaceLookupError); } else { - serv.connect(); + if(serv.getType() != "cellular") { + serv.connect(); + } else { + QOfonoManagerInterface ofonoManager(0); + QString modemPath = ofonoManager.currentModem().path(); + QOfonoDataConnectionManagerInterface dc(modemPath,0); + foreach(const QDBusObjectPath dcPath,dc.getPrimaryContexts()) { + if(dcPath.path().contains(servicePath.section("_",-1))) { + QOfonoPrimaryDataContextInterface primaryContext(dcPath.path(),0); + primaryContext.setActive(true); + } + } + } } } diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h index 2ee6da5..569bbc7 100644 --- a/src/plugins/bearer/connman/qconnmanengine.h +++ b/src/plugins/bearer/connman/qconnmanengine.h @@ -137,7 +137,8 @@ private: QMap deviceMap; //tech path, device path QMap serviceNetworks; //service, network - + QNetworkConfiguration::BearerType ofonoTechToBearerType(const QString &type); + bool isRoamingAllowed(const QString &context); protected: bool requiresPolling() const; QConnmanConnectThread *connThread; diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp index 3722c43..549a07a 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp +++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp @@ -984,12 +984,17 @@ QConnmanCounterInterface::~QConnmanCounterInterface() quint32 QConnmanCounterInterface::getReceivedByteCount() { -return 0; + return 0; } quint32 QConnmanCounterInterface::getTransmittedByteCount() { -return 0; + return 0; +} + +quint64 QConnmanCounterInterface::getTimeOnline() +{ + return 0; } ///////////////////////////////////////// diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h index a2b1e73..6e6b702 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h +++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h @@ -331,6 +331,7 @@ public: QString getInterface(); quint32 getReceivedByteCount(); quint32 getTransmittedByteCount(); + quint64 getTimeOnline(); private: QConnmanCounterInterfacePrivate *d; diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp new file mode 100644 index 0000000..955f4b1 --- /dev/null +++ b/src/plugins/bearer/connman/qofonoservice_linux.cpp @@ -0,0 +1,940 @@ +/**************************************************************************** +** +** 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 plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qofonoservice_linux_p.h" + + +QT_BEGIN_NAMESPACE +static QDBusConnection dbusConnection = QDBusConnection::systemBus(); + + +QOfonoManagerInterface::QOfonoManagerInterface( QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + QLatin1String(OFONO_MANAGER_PATH), + OFONO_MANAGER_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoManagerInterface::~QOfonoManagerInterface() +{ +} + +QList QOfonoManagerInterface::getModems() +{ + QVariant var = getProperty("Modems"); + return qdbus_cast >(var); +} + +QDBusObjectPath QOfonoManagerInterface::currentModem() +{ + QList modems = getModems(); + foreach(const QDBusObjectPath modem, modems) { + QOfonoModemInterface device(modem.path()); + if(device.isPowered() && device.isOnline()) + return modem;; + } + return QDBusObjectPath(); +} + + +void QOfonoManagerInterface::connectNotify(const char *signal) +{ +if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + QLatin1String(OFONO_MANAGER_PATH), + QLatin1String(OFONO_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + QLatin1String(OFONO_MANAGER_PATH), + QLatin1String(OFONO_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } +} + +void QOfonoManagerInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoManagerInterface::getProperty(const QString &property) +{ + QVariantMap map = getProperties(); + if (map.contains(property)) { + return map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return QVariant(); +} + +QVariantMap QOfonoManagerInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + if(reply.isValid()) + return reply.value(); + else + return QVariantMap(); +} + +QOfonoDBusHelper::QOfonoDBusHelper(QObject * parent) + : QObject(parent) +{ +} + +QOfonoDBusHelper::~QOfonoDBusHelper() +{ +} + +void QOfonoDBusHelper::propertyChanged(const QString &item, const QDBusVariant &var) +{ + QDBusMessage msg = this->message(); + Q_EMIT propertyChangedContext(msg.path() ,item, var); +} + + +QOfonoModemInterface::QOfonoModemInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_MODEM_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoModemInterface::~QOfonoModemInterface() +{ +} + +bool QOfonoModemInterface::isPowered() +{ + QVariant var = getProperty("Powered"); + return qdbus_cast(var); +} + +bool QOfonoModemInterface::isOnline() +{ + QVariant var = getProperty("Online"); + return qdbus_cast(var); +} + +QString QOfonoModemInterface::getName() +{ + QVariant var = getProperty("Name"); + return qdbus_cast(var); +} + +QString QOfonoModemInterface::getManufacturer() +{ + QVariant var = getProperty("Manufacturer"); + return qdbus_cast(var); + +} + +QString QOfonoModemInterface::getModel() +{ + + QVariant var = getProperty("Model"); + return qdbus_cast(var); +} + +QString QOfonoModemInterface::getRevision() +{ + QVariant var = getProperty("Revision"); + return qdbus_cast(var); + +} +QString QOfonoModemInterface::getSerial() +{ + QVariant var = getProperty("Serial"); + return qdbus_cast(var); + +} + +QStringList QOfonoModemInterface::getFeatures() +{ + //sms, sim + QVariant var = getProperty("Features"); + return qdbus_cast(var); +} + +QStringList QOfonoModemInterface::getInterfaces() +{ + QVariant var = getProperty("Interfaces"); + return qdbus_cast(var); +} + +QString QOfonoModemInterface::defaultInterface() +{ + foreach(const QString &modem,getInterfaces()) { + return modem; + } + return QString(); +} + + +void QOfonoModemInterface::connectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_MODEM_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_MODEM_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + }} + +void QOfonoModemInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariantMap QOfonoModemInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + +QVariant QOfonoModemInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + + +QOfonoNetworkRegistrationInterface::QOfonoNetworkRegistrationInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_NETWORK_REGISTRATION_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoNetworkRegistrationInterface::~QOfonoNetworkRegistrationInterface() +{ +} + +QString QOfonoNetworkRegistrationInterface::getStatus() +{ + /* + "unregistered" Not registered to any network + "registered" Registered to home network + "searching" Not registered, but searching + "denied" Registration has been denied + "unknown" Status is unknown + "roaming" Registered, but roaming*/ + QVariant var = getProperty("Status"); + return qdbus_cast(var); +} + +quint16 QOfonoNetworkRegistrationInterface::getLac() +{ + QVariant var = getProperty("LocationAreaCode"); + return var.value(); +} + + +quint32 QOfonoNetworkRegistrationInterface::getCellId() +{ + QVariant var = getProperty("CellId"); + return var.value(); +} + +QString QOfonoNetworkRegistrationInterface::getTechnology() +{ + // "gsm", "edge", "umts", "hspa","lte" + QVariant var = getProperty("Technology"); + return qdbus_cast(var); +} + +QString QOfonoNetworkRegistrationInterface::getOperatorName() +{ + QVariant var = getProperty("Name"); + return qdbus_cast(var); +} + +int QOfonoNetworkRegistrationInterface::getSignalStrength() +{ + QVariant var = getProperty("Strength"); + return qdbus_cast(var); + +} + +QString QOfonoNetworkRegistrationInterface::getBaseStation() +{ + QVariant var = getProperty("BaseStation"); + return qdbus_cast(var); +} + +QList QOfonoNetworkRegistrationInterface::getOperators() +{ + QVariant var = getProperty("Operators"); + return qdbus_cast >(var); +} + +void QOfonoNetworkRegistrationInterface::connectNotify(const char *signal) +{ +if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_NETWORK_REGISTRATION_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_NETWORK_REGISTRATION_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } +} + +void QOfonoNetworkRegistrationInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoNetworkRegistrationInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + +QVariantMap QOfonoNetworkRegistrationInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + + + +QOfonoNetworkOperatorInterface::QOfonoNetworkOperatorInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_NETWORK_OPERATOR_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoNetworkOperatorInterface::~QOfonoNetworkOperatorInterface() +{ +} + +QString QOfonoNetworkOperatorInterface::getName() +{ + QVariant var = getProperty("Name"); + return qdbus_cast(var); +} + +QString QOfonoNetworkOperatorInterface::getStatus() +{ + // "unknown", "available", "current" and "forbidden" + QVariant var = getProperty("Status"); + return qdbus_cast(var); +} + +QString QOfonoNetworkOperatorInterface::getMcc() +{ + QVariant var = getProperty("MobileCountryCode"); + return qdbus_cast(var); +} + +QString QOfonoNetworkOperatorInterface::getMnc() +{ + QVariant var = getProperty("MobileNetworkCode"); + return qdbus_cast(var); +} + +QStringList QOfonoNetworkOperatorInterface::getTechnologies() +{ + QVariant var = getProperty("Technologies"); + return qdbus_cast(var); +} + +void QOfonoNetworkOperatorInterface::connectNotify(const char *signal) +{ +if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_NETWORK_OPERATOR_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_NETWORK_OPERATOR_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } +} + +void QOfonoNetworkOperatorInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoNetworkOperatorInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + +QVariantMap QOfonoNetworkOperatorInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + +QOfonoSimInterface::QOfonoSimInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_SIM_MANAGER_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoSimInterface::~QOfonoSimInterface() +{ +} + +bool QOfonoSimInterface::isPresent() +{ + QVariant var = getProperty("Present"); + return qdbus_cast(var); +} + +QString QOfonoSimInterface::getHomeMcc() +{ + QVariant var = getProperty("MobileCountryCode"); + return qdbus_cast(var); +} + +QString QOfonoSimInterface::getHomeMnc() +{ + QVariant var = getProperty("MobileNetworkCode"); + return qdbus_cast(var); +} + +// QStringList subscriberNumbers(); +// QMap serviceNumbers(); +QString QOfonoSimInterface::pinRequired() +{ + QVariant var = getProperty("PinRequired"); + return qdbus_cast(var); +} + +QString QOfonoSimInterface::lockedPins() +{ + QVariant var = getProperty("LockedPins"); + return qdbus_cast(var); +} + +QString QOfonoSimInterface::cardIdentifier() +{ + QVariant var = getProperty("CardIdentifier"); + return qdbus_cast(var); +} + +void QOfonoSimInterface::connectNotify(const char *signal) +{ +if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_SIM_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_SIM_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } +} + +void QOfonoSimInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoSimInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + +QVariantMap QOfonoSimInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + +QOfonoDataConnectionManagerInterface::QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoDataConnectionManagerInterface::~QOfonoDataConnectionManagerInterface() +{ +} + +QList QOfonoDataConnectionManagerInterface::getPrimaryContexts() +{ + QVariant var = getProperty("PrimaryContexts"); + return qdbus_cast >(var); +} + +bool QOfonoDataConnectionManagerInterface::isAttached() +{ + QVariant var = getProperty("Attached"); + return qdbus_cast(var); +} + +bool QOfonoDataConnectionManagerInterface::isRoamingAllowed() +{ + QVariant var = getProperty("RoamingAllowed"); + return qdbus_cast(var); +} + +bool QOfonoDataConnectionManagerInterface::isPowered() +{ + QVariant var = getProperty("Powered"); + return qdbus_cast(var); +} + +void QOfonoDataConnectionManagerInterface::connectNotify(const char *signal) +{ +if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_DATA_CONNECTION_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_DATA_CONNECTION_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } +} + +void QOfonoDataConnectionManagerInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoDataConnectionManagerInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + +QVariantMap QOfonoDataConnectionManagerInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + +QOfonoPrimaryDataContextInterface::QOfonoPrimaryDataContextInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_DATA_CONTEXT_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoPrimaryDataContextInterface::~QOfonoPrimaryDataContextInterface() +{ +} + +bool QOfonoPrimaryDataContextInterface::isActive() +{ + QVariant var = getProperty("Active"); + return qdbus_cast(var); +} + +QString QOfonoPrimaryDataContextInterface::getApName() +{ + QVariant var = getProperty("AccessPointName"); + return qdbus_cast(var); +} + +QString QOfonoPrimaryDataContextInterface::getType() +{ + QVariant var = getProperty("Type"); + return qdbus_cast(var); +} + +QString QOfonoPrimaryDataContextInterface::getName() +{ + QVariant var = getProperty("Name"); + return qdbus_cast(var); +} + +QVariantMap QOfonoPrimaryDataContextInterface::getSettings() +{ + QVariant var = getProperty("Settings"); + return qdbus_cast(var); +} + +QString QOfonoPrimaryDataContextInterface::getInterface() +{ + QVariant var = getProperty("Interface"); + return qdbus_cast(var); +} + +QString QOfonoPrimaryDataContextInterface::getAddress() +{ + QVariant var = getProperty("Address"); + return qdbus_cast(var); +} + +bool QOfonoPrimaryDataContextInterface::setActive(bool on) +{ +// this->setProperty("Active", QVariant(on)); + + return setProp("Active", qVariantFromValue(on)); +} + +bool QOfonoPrimaryDataContextInterface::setApn(const QString &name) +{ + return setProp("AccessPointName", QVariant::fromValue(name)); +} + +void QOfonoPrimaryDataContextInterface::connectNotify(const char *signal) +{ +if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_DATA_CONTEXT_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_DATA_CONTEXT_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } +} + +void QOfonoPrimaryDataContextInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoPrimaryDataContextInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + +QVariantMap QOfonoPrimaryDataContextInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + +bool QOfonoPrimaryDataContextInterface::setProp(const QString &property, const QVariant &var) +{ + QList args; + args << qVariantFromValue(property) << qVariantFromValue(QDBusVariant(var)); + + QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect, + QLatin1String("SetProperty"), + args); + bool ok = true; + if(reply.type() != QDBusMessage::ReplyMessage) { + qWarning() << reply.errorMessage(); + ok = false; + } + qWarning() << reply.errorMessage(); + return ok; +} + +QOfonoSmsInterface::QOfonoSmsInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_SMS_MANAGER_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoSmsInterface::~QOfonoSmsInterface() +{ +} + +void QOfonoSmsInterface::connectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_SMS_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { + QOfonoDBusHelper *helper; + helper = new QOfonoDBusHelper(this); + + dbusConnection.connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_SMS_MANAGER_INTERFACE), + QLatin1String("PropertyChanged"), + helper,SLOT(propertyChanged(QString,QDBusVariant))); + + + QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), + this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &))); + } + + if (QLatin1String(signal) == SIGNAL(immediateMessage(QString,QVariantMap))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_SMS_MANAGER_INTERFACE), + QLatin1String("ImmediateMessage"), + this,SIGNAL(immediateMessage(QString,QVariantMap )))) { + qWarning() << "PropertyCHanged not connected"; + } + } + + if (QLatin1String(signal) == SIGNAL(incomingMessage(QString,QVariantMap))) { + if(!connection().connect(QLatin1String(OFONO_SERVICE), + this->path(), + QLatin1String(OFONO_SMS_MANAGER_INTERFACE), + QLatin1String("IncomingMessage"), + this,SIGNAL(incomingMessage(QString,QVariantMap)))) { + qWarning() << "PropertyCHanged not connected"; + } + } +} + +void QOfonoSmsInterface::disconnectNotify(const char *signal) +{ + if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { + + } +} + +QVariant QOfonoSmsInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) { + var = map.value(property); + } else { + qDebug() << Q_FUNC_INFO << "does not contain" << property; + } + return var; +} + +QVariantMap QOfonoSmsInterface::getProperties() +{ + QDBusReply reply = this->call(QLatin1String("GetProperties")); + return reply.value(); +} + +void QOfonoSmsInterface::sendMessage(const QString &to, const QString &message) +{ + QDBusReply reply = this->call(QLatin1String("SendMessage"), + QVariant::fromValue(to), + QVariant::fromValue(message)); + bool ok = true; + if(reply.error().type() == QDBusError::InvalidArgs) { + qWarning() << reply.error().message(); + ok = false; + } +} + +QT_END_NAMESPACE diff --git a/src/plugins/bearer/connman/qofonoservice_linux_p.h b/src/plugins/bearer/connman/qofonoservice_linux_p.h new file mode 100644 index 0000000..4892666 --- /dev/null +++ b/src/plugins/bearer/connman/qofonoservice_linux_p.h @@ -0,0 +1,332 @@ +/**************************************************************************** +** +** 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 plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QOFONOSERVICE_H +#define QOFONOSERVICE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define OFONO_SERVICE "org.ofono" +#define OFONO_MANAGER_INTERFACE "org.ofono.Manager" +#define OFONO_MANAGER_PATH "/" +#define OFONO_MODEM_INTERFACE "org.ofono.Modem" +#define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration" +#define OFONO_NETWORK_OPERATOR_INTERFACE "org.ofono.NetworkOperator" +#define OFONO_DATA_CONNECTION_MANAGER_INTERFACE "org.ofono.DataConnectionManager" +#define OFONO_SIM_MANAGER_INTERFACE "org.ofono.SimManager" +#define OFONO_DATA_CONTEXT_INTERFACE "org.ofono.PrimaryDataContext" + +#define OFONO_SMS_MANAGER_INTERFACE "org.ofono.SmsManager" +#define OFONO_PHONEBOOK_INTERFACE "org.ofono.Phonebook" +#define OFONO_MESSAGE_WAITING_INTERFACE "org.ofono.MessageWaiting" + + + +QT_BEGIN_NAMESPACE + +QT_END_NAMESPACE + + +QT_BEGIN_NAMESPACE + +class QOfonoManagerInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoManagerInterface( QObject *parent = 0); + ~QOfonoManagerInterface(); + + QDBusObjectPath path() const; + + QVariantMap getProperties(); + bool setProperty(const QString &name, const QDBusVariant &value); + QList getModems(); + QDBusObjectPath currentModem(); + +Q_SIGNALS: + void propertyChanged(const QString &, const QDBusVariant &value); + void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); + +}; + + +class QOfonoDBusHelper: public QObject, protected QDBusContext + { + Q_OBJECT + public: + QOfonoDBusHelper(QObject *parent = 0); + ~QOfonoDBusHelper(); + + public slots: + void propertyChanged(const QString &, const QDBusVariant &); + Q_SIGNALS: + void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); +}; + +class QOfonoModemInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent = 0); + ~QOfonoModemInterface(); + + QVariantMap getProperties(); + //properties + bool isPowered(); + bool isOnline(); + QString getName(); + QString getManufacturer(); + QString getModel(); + QString getRevision(); + QString getSerial(); + + QStringList getFeatures(); //sms, sim + QStringList getInterfaces(); + QString defaultInterface(); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); +Q_SIGNALS: + void propertyChanged(const QString &, const QDBusVariant &value); + void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); +}; + + +class QOfonoNetworkRegistrationInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent = 0); + ~QOfonoNetworkRegistrationInterface(); + + QVariantMap getProperties(); + + //properties + QString getStatus(); + quint16 getLac(); + quint32 getCellId(); + QString getTechnology(); + QString getOperatorName(); + int getSignalStrength(); + QString getBaseStation(); + QList getOperators(); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); +Q_SIGNALS: + void propertyChanged(const QString &, const QDBusVariant &value); + void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); + +}; + +class QOfonoNetworkOperatorInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: +//modem or operator paths + QOfonoNetworkOperatorInterface(const QString &dbusPathName, QObject *parent = 0); + ~QOfonoNetworkOperatorInterface(); + + QVariantMap getProperties(); + + //properties + QString getName(); + QString getStatus();// "unknown", "available", "current" and "forbidden" + QString getMcc(); + QString getMnc(); + QStringList getTechnologies(); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); +}; + +class QOfonoSimInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoSimInterface(const QString &dbusModemPathName, QObject *parent = 0); + ~QOfonoSimInterface(); + + QVariantMap getProperties(); + + //properties + bool isPresent(); + QString getHomeMcc(); + QString getHomeMnc(); +// QStringList subscriberNumbers(); +// QMap serviceNumbers(); + QString pinRequired(); + QString lockedPins(); + QString cardIdentifier(); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); +}; + + +class QOfonoDataConnectionManagerInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent = 0); + ~QOfonoDataConnectionManagerInterface(); + + QVariantMap getProperties(); + + //properties + QList getPrimaryContexts(); + bool isAttached(); + bool isRoamingAllowed(); + bool isPowered(); + + bool setPower(bool on); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); +}; + + +class QOfonoPrimaryDataContextInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoPrimaryDataContextInterface(const QString &dbusPathName, QObject *parent = 0); + ~QOfonoPrimaryDataContextInterface(); + + QVariantMap getProperties(); + + //properties + bool isActive(); + QString getApName(); + QString getType(); + QString getName(); + QVariantMap getSettings(); + QString getInterface(); + QString getAddress(); + + bool setActive(bool on); + bool setApn(const QString &name); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); + bool setProp(const QString &, const QVariant &var); +}; + +class QOfonoSmsInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoSmsInterface(const QString &dbusModemPathName, QObject *parent = 0); + ~QOfonoSmsInterface(); + + QVariantMap getProperties(); + void sendMessage(const QString &to, const QString &message); + + //properties + QString serviceCenterAddress(); + bool useDeliveryReports(); + QString bearer(); + +protected: + void connectNotify(const char *signal); + void disconnectNotify(const char *signal); + QVariant getProperty(const QString &); + +Q_SIGNALS: + void propertyChanged(const QString &, const QDBusVariant &value); + void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); + void immediateMessage(const QString &message, const QVariantMap &info); + void incomingMessage(const QString &message, const QVariantMap &info); +}; + +#endif //QOFONOSERVICE_H -- cgit v0.12 From ef9cc109f1a6fe84ca27a6c8a53f1783b8bdf14d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 24 Aug 2010 14:11:06 +0200 Subject: Doc: Minor improvements and fixes. --- doc/src/declarative/elements.qdoc | 9 +++++---- doc/src/declarative/extending-tutorial.qdoc | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 94abe10..252b964 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -29,12 +29,13 @@ \page qdeclarativeelements.html \target elements \title QML Elements + \brief A dictionary of standard QML elements. - This is a dictionary of all the QML elements available in the \l - {QtDeclarative} {Qt Declarative} module. + This is a dictionary of all standard QML elements made available + in the QtDeclarative module. - To see the QML elements listed by - functional area, \l{Groups Of Related QML Elements} {look here}. + To see the QML elements listed by functional area, see the + \l{Groups Of Related QML Elements} page. \generatelist qmlclasses diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc index d128d0f..349ac30 100644 --- a/doc/src/declarative/extending-tutorial.qdoc +++ b/doc/src/declarative/extending-tutorial.qdoc @@ -26,7 +26,6 @@ ****************************************************************************/ /*! - \page qml-extending-tutorial-index.html \title Tutorial: Writing QML extensions with C++ -- cgit v0.12 From 1a75b369797c41d37f92950f7527c1eb989f1215 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 27 Aug 2010 18:23:37 +0200 Subject: Doc: More work on the QML documentation. --- doc/src/declarative/anchor-layout.qdoc | 2 +- doc/src/declarative/codingconventions.qdoc | 2 +- doc/src/declarative/declarativeui.qdoc | 3 +- doc/src/declarative/pics/spacing_a.png | Bin 547 -> 0 bytes doc/src/declarative/pics/spacing_b.png | Bin 560 -> 0 bytes doc/src/declarative/qdeclarativemodels.qdoc | 2 +- doc/src/examples/qml-examples.qdoc | 2 +- doc/src/images/qml-flow-snippet.png | Bin 0 -> 10385 bytes doc/src/images/qml-grid-no-spacing.png | Bin 0 -> 416 bytes doc/src/images/qml-grid-spacing.png | Bin 0 -> 421 bytes doc/src/images/qml-repeater-grid-index.png | Bin 0 -> 17964 bytes doc/src/images/qml-row.png | Bin 0 -> 3090 bytes doc/src/snippets/declarative/anchoranimation.qml | 1 + doc/src/snippets/declarative/column/column.qml | 67 ++++ .../column/vertical-positioner-transition.qml | 61 +++ .../declarative/column/vertical-positioner.qml | 50 +++ doc/src/snippets/declarative/flow.qml | 62 +++ doc/src/snippets/declarative/grid/grid-items.qml | 58 +++ .../snippets/declarative/grid/grid-no-spacing.qml | 57 +++ doc/src/snippets/declarative/grid/grid-spacing.qml | 58 +++ doc/src/snippets/declarative/grid/grid.qml | 53 +++ doc/src/snippets/declarative/repeater.qml | 89 ----- .../declarative/repeaters/repeater-grid-index.qml | 61 +++ .../snippets/declarative/repeaters/repeater.qml | 89 +++++ doc/src/snippets/declarative/row.qml | 62 +++ doc/src/snippets/declarative/row/row.qml | 50 +++ doc/src/snippets/declarative/~image-fillmode.qml | 46 +++ .../graphicsitems/qdeclarativeborderimage.cpp | 21 +- .../graphicsitems/qdeclarativepositioners.cpp | 436 ++++++++++++--------- .../graphicsitems/qdeclarativerepeater.cpp | 10 +- 30 files changed, 1044 insertions(+), 298 deletions(-) delete mode 100644 doc/src/declarative/pics/spacing_a.png delete mode 100644 doc/src/declarative/pics/spacing_b.png create mode 100644 doc/src/images/qml-flow-snippet.png create mode 100644 doc/src/images/qml-grid-no-spacing.png create mode 100644 doc/src/images/qml-grid-spacing.png create mode 100644 doc/src/images/qml-repeater-grid-index.png create mode 100644 doc/src/images/qml-row.png create mode 100644 doc/src/snippets/declarative/column/column.qml create mode 100644 doc/src/snippets/declarative/column/vertical-positioner-transition.qml create mode 100644 doc/src/snippets/declarative/column/vertical-positioner.qml create mode 100644 doc/src/snippets/declarative/flow.qml create mode 100644 doc/src/snippets/declarative/grid/grid-items.qml create mode 100644 doc/src/snippets/declarative/grid/grid-no-spacing.qml create mode 100644 doc/src/snippets/declarative/grid/grid-spacing.qml create mode 100644 doc/src/snippets/declarative/grid/grid.qml delete mode 100644 doc/src/snippets/declarative/repeater.qml create mode 100644 doc/src/snippets/declarative/repeaters/repeater-grid-index.qml create mode 100644 doc/src/snippets/declarative/repeaters/repeater.qml create mode 100644 doc/src/snippets/declarative/row.qml create mode 100644 doc/src/snippets/declarative/row/row.qml create mode 100644 doc/src/snippets/declarative/~image-fillmode.qml diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 5c025e5..99f7777 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! -\page anchor-layout.html +\page qml-anchor-layout.html \target anchor-layout \title Anchor-based Layout in QML diff --git a/doc/src/declarative/codingconventions.qdoc b/doc/src/declarative/codingconventions.qdoc index 9403920..aa4feef 100644 --- a/doc/src/declarative/codingconventions.qdoc +++ b/doc/src/declarative/codingconventions.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! -\page codingconventions.html +\page qml-coding-conventions.html \title QML Coding Conventions This document contains the QML coding conventions that we follow in our documentation and examples and recommend that others follow. diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 9609954..ae64e2a 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -107,7 +107,8 @@ Module. \section1 Handling Data \list -\o \l{Data Models} +\o \l{Using QML Positioner and Repeater Items} +\o \l{QML Data Models} \o \l{Network Transparency} \endlist diff --git a/doc/src/declarative/pics/spacing_a.png b/doc/src/declarative/pics/spacing_a.png deleted file mode 100644 index c0fe895..0000000 Binary files a/doc/src/declarative/pics/spacing_a.png and /dev/null differ diff --git a/doc/src/declarative/pics/spacing_b.png b/doc/src/declarative/pics/spacing_b.png deleted file mode 100644 index 24cf640..0000000 Binary files a/doc/src/declarative/pics/spacing_b.png and /dev/null differ diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 173002a..ace0465 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -28,7 +28,7 @@ /*! \page qdeclarativemodels.html \target qmlmodels -\title Data Models +\title QML Data Models QML items such as ListView, GridView and \l Repeater require Data Models that provide the data to be displayed. diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 0d191c9..03bf7bb 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -229,7 +229,7 @@ */ /*! - \title Internationlization Example + \title Internationalization Example \example declarative/i18n This example shows how to enable text translation in QML. diff --git a/doc/src/images/qml-flow-snippet.png b/doc/src/images/qml-flow-snippet.png new file mode 100644 index 0000000..1a2af4b Binary files /dev/null and b/doc/src/images/qml-flow-snippet.png differ diff --git a/doc/src/images/qml-grid-no-spacing.png b/doc/src/images/qml-grid-no-spacing.png new file mode 100644 index 0000000..c2092e0 Binary files /dev/null and b/doc/src/images/qml-grid-no-spacing.png differ diff --git a/doc/src/images/qml-grid-spacing.png b/doc/src/images/qml-grid-spacing.png new file mode 100644 index 0000000..1083bee Binary files /dev/null and b/doc/src/images/qml-grid-spacing.png differ diff --git a/doc/src/images/qml-repeater-grid-index.png b/doc/src/images/qml-repeater-grid-index.png new file mode 100644 index 0000000..44aed24 Binary files /dev/null and b/doc/src/images/qml-repeater-grid-index.png differ diff --git a/doc/src/images/qml-row.png b/doc/src/images/qml-row.png new file mode 100644 index 0000000..30d9caa Binary files /dev/null and b/doc/src/images/qml-row.png differ diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/declarative/anchoranimation.qml index 6c7aaf6..9a7b8ff 100644 --- a/doc/src/snippets/declarative/anchoranimation.qml +++ b/doc/src/snippets/declarative/anchoranimation.qml @@ -37,6 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + //![0] import Qt 4.7 diff --git a/doc/src/snippets/declarative/column/column.qml b/doc/src/snippets/declarative/column/column.qml new file mode 100644 index 0000000..e372cfd --- /dev/null +++ b/doc/src/snippets/declarative/column/column.qml @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Item { + width: 310; height: 170 + + Column { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + spacing: 5 + + Rectangle { color: "lightblue"; radius: 10.0 + width: 300; height: 50 + Text { anchors.fill: parent + font.pointSize: 32; text: "Books" } } + Rectangle { color: "gold"; radius: 10.0 + width: 300; height: 50 + Text { anchors.fill: parent + font.pointSize: 32; text: "Music" } } + Rectangle { color: "lightgreen"; radius: 10.0 + width: 300; height: 50 + Text { anchors.fill: parent + font.pointSize: 32; text: "Movies" } } + } +} +//! [document] diff --git a/doc/src/snippets/declarative/column/vertical-positioner-transition.qml b/doc/src/snippets/declarative/column/vertical-positioner-transition.qml new file mode 100644 index 0000000..7785776 --- /dev/null +++ b/doc/src/snippets/declarative/column/vertical-positioner-transition.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +import Qt 4.7 + +//! [document] +Column { + spacing: 2 + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { id: rect1; color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } + + //![transitions] + add: Transition { + NumberAnimation { properties: "opacity"; duration: 1000 } + } + //![transitions] + + MouseArea { + anchors.fill: parent + onClicked: rect1.opacity = 0 + } +} +//! [document] diff --git a/doc/src/snippets/declarative/column/vertical-positioner.qml b/doc/src/snippets/declarative/column/vertical-positioner.qml new file mode 100644 index 0000000..27b09c1 --- /dev/null +++ b/doc/src/snippets/declarative/column/vertical-positioner.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +//! [document] +Column { + spacing: 2 + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } +} +//! [document] diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/declarative/flow.qml new file mode 100644 index 0000000..c5fbc90 --- /dev/null +++ b/doc/src/snippets/declarative/flow.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE: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 Qt 4.7 + +Rectangle { + color: "lightblue" + width: 300; height: 200 + +//! [flow item] + Flow { + anchors.fill: parent + anchors.margins: 4 + spacing: 10 + + Text { text: "Text"; font.pixelSize: 40 } + Text { text: "items"; font.pixelSize: 40 } + Text { text: "flowing"; font.pixelSize: 40 } + Text { text: "in"; font.pixelSize: 40 } + Text { text: "a"; font.pixelSize: 40 } + Text { text: "Flow"; font.pixelSize: 40 } + Text { text: "item"; font.pixelSize: 40 } + } +//! [flow item] +} diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/declarative/grid/grid-items.qml new file mode 100644 index 0000000..5099758 --- /dev/null +++ b/doc/src/snippets/declarative/grid/grid-items.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 112; height: 112 + color: "#303030" + + Grid { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + columns: 2 + spacing: 6 + + Rectangle { color: "#aa6666"; width: 50; height: 50 } + Rectangle { color: "#aaaa66"; width: 50; height: 50 } + Rectangle { color: "#9999aa"; width: 50; height: 50 } + Rectangle { color: "#6666aa"; width: 50; height: 50 } + } +} diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/declarative/grid/grid-no-spacing.qml new file mode 100644 index 0000000..f04c242 --- /dev/null +++ b/doc/src/snippets/declarative/grid/grid-no-spacing.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 112; height: 112 + color: "#303030" + + Grid { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + columns: 2 + + Rectangle { color: "#aa6666"; width: 50; height: 50 } + Rectangle { color: "#aaaa66"; width: 50; height: 50 } + Rectangle { color: "#9999aa"; width: 50; height: 50 } + Rectangle { color: "#6666aa"; width: 50; height: 50 } + } +} diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid/grid-spacing.qml new file mode 100644 index 0000000..5099758 --- /dev/null +++ b/doc/src/snippets/declarative/grid/grid-spacing.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 112; height: 112 + color: "#303030" + + Grid { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + columns: 2 + spacing: 6 + + Rectangle { color: "#aa6666"; width: 50; height: 50 } + Rectangle { color: "#aaaa66"; width: 50; height: 50 } + Rectangle { color: "#9999aa"; width: 50; height: 50 } + Rectangle { color: "#6666aa"; width: 50; height: 50 } + } +} diff --git a/doc/src/snippets/declarative/grid/grid.qml b/doc/src/snippets/declarative/grid/grid.qml new file mode 100644 index 0000000..d57b4b2 --- /dev/null +++ b/doc/src/snippets/declarative/grid/grid.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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Grid { + columns: 3 + spacing: 2 + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } + Rectangle { color: "cyan"; width: 50; height: 50 } + Rectangle { color: "magenta"; width: 10; height: 10 } +} +//! [document] diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml deleted file mode 100644 index d71fd29..0000000 --- a/doc/src/snippets/declarative/repeater.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//! [import] -import Qt 4.7 -//! [import] - -Row { - -//! [simple] -Row { - Repeater { - model: 3 - Rectangle { - width: 100; height: 40 - border.width: 1 - color: "yellow" - } - } -} -//! [simple] - -//! [index] -Column { - Repeater { - model: 10 - Text { text: "I'm item " + index } - } -} -//! [index] - -//! [modeldata] -Column { - Repeater { - model: ["apples", "oranges", "pears"] - Text { text: "Data: " + modelData } - } -} -//! [modeldata] - -//! [layout] -Row { - Rectangle { width: 10; height: 20; color: "red" } - Repeater { - model: 10 - Rectangle { width: 20; height: 20; radius: 10; color: "green" } - } - Rectangle { width: 10; height: 20; color: "blue" } -} -//! [layout] - -} diff --git a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml new file mode 100644 index 0000000..106550e --- /dev/null +++ b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Rectangle { + width: 400; height: 400; color: "black" + + Grid { + x: 5; y: 5 + rows: 5; columns: 5; spacing: 10 + + Repeater { model: 24 + Rectangle { width: 70; height: 70 + color: "lightgreen" + + Text { text: index + font.pointSize: 30 + anchors.centerIn: parent } } + } + } +} +//! [document] diff --git a/doc/src/snippets/declarative/repeaters/repeater.qml b/doc/src/snippets/declarative/repeaters/repeater.qml new file mode 100644 index 0000000..d71fd29 --- /dev/null +++ b/doc/src/snippets/declarative/repeaters/repeater.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [import] +import Qt 4.7 +//! [import] + +Row { + +//! [simple] +Row { + Repeater { + model: 3 + Rectangle { + width: 100; height: 40 + border.width: 1 + color: "yellow" + } + } +} +//! [simple] + +//! [index] +Column { + Repeater { + model: 10 + Text { text: "I'm item " + index } + } +} +//! [index] + +//! [modeldata] +Column { + Repeater { + model: ["apples", "oranges", "pears"] + Text { text: "Data: " + modelData } + } +} +//! [modeldata] + +//! [layout] +Row { + Rectangle { width: 10; height: 20; color: "red" } + Repeater { + model: 10 + Rectangle { width: 20; height: 20; radius: 10; color: "green" } + } + Rectangle { width: 10; height: 20; color: "blue" } +} +//! [layout] + +} diff --git a/doc/src/snippets/declarative/row.qml b/doc/src/snippets/declarative/row.qml new file mode 100644 index 0000000..bd2db16 --- /dev/null +++ b/doc/src/snippets/declarative/row.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE: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 Qt 4.7 + +Rectangle { + width: 320; height: 110 + color: "#c0c0c0" + + Row { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + spacing: 5 + + Rectangle { width: 100; height: 100; radius: 20.0 + color: "#024c1c" } + Rectangle { width: 100; height: 100; radius: 20.0 + color: "#42a51c" } + Rectangle { width: 100; height: 100; radius: 20.0 + color: "white" } + } +} +//! [document] diff --git a/doc/src/snippets/declarative/row/row.qml b/doc/src/snippets/declarative/row/row.qml new file mode 100644 index 0000000..c863243 --- /dev/null +++ b/doc/src/snippets/declarative/row/row.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Row { + spacing: 2 + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } +} +//! [document] diff --git a/doc/src/snippets/declarative/~image-fillmode.qml b/doc/src/snippets/declarative/~image-fillmode.qml new file mode 100644 index 0000000..cee26c4 --- /dev/null +++ b/doc/src/snippets/declarative/~image-fillmode.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Image { + source: "pics/qtlogo.png" + width: 20; height: 20 +} diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 5a9a18d..832e1cd 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -169,7 +169,8 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() /*! \qmlproperty enumeration BorderImage::status - This property holds the status of image loading. It can be one of: + This property describes the status of image loading. It can be one of: + \list \o BorderImage.Null - no image has been set \o BorderImage.Ready - the image has been loaded @@ -201,18 +202,24 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() \note Generally scaling artifacts are only visible if the image is stationary on the screen. A common pattern when animating an image is to disable smooth - filtering at the beginning of the animation and reenable it at the conclusion. + filtering at the beginning of the animation and enable it at the conclusion. */ /*! \qmlproperty url BorderImage::source - BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt. + This property holds the URL that refers to the source image. + + BorderImage can handle any image format supported by Qt, loaded from any + URL scheme supported by Qt. + + It can also handle .sci files, which are a QML-specific format. A .sci + file uses a simple text-based format that specifies the borders, the + image file and the tile rules. - It can also handle .sci files, which are a QML-specific format. A .sci file uses a simple text-based format that specifies - the borders, the image file and the tile rules. + The following .sci file sets the borders to 10 on each side for the + image \c picture.png: - The following .sci file sets the borders to 10 on each side for the image \c picture.png: \qml border.left: 10 border.top: 10 @@ -356,7 +363,7 @@ QDeclarativeScaleGrid *QDeclarativeBorderImage::border() This property describes how to repeat or stretch the middle parts of the border image. \list - \o BorderImage.Stretch - Scale the image to fit to the available area. + \o BorderImage.Stretch - Scales the image to fit to the available area. \o BorderImage.Repeat - Tile the image until there is no more space. May crop the last image. \o BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped. \endlist diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 4ceb5d9..b653282 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -330,58 +330,65 @@ static inline bool isInvisible(QGraphicsObject *child) /*! \qmlclass Column QDeclarativeColumn - \ingroup qml-positioning-elements - \since 4.7 + \ingroup qml-positioning-elements + \since 4.7 \brief The Column item arranges its children vertically. \inherits Item The Column item positions its child items so that they are vertically - aligned and not overlapping. Spacing between items can be added. + aligned and not overlapping. - The below example positions differently shaped rectangles using a Column. - \table - \row - \o \image verticalpositioner_example.png - \o - \qml -Column { - spacing: 2 - Rectangle { color: "red"; width: 50; height: 50 } - Rectangle { color: "green"; width: 20; height: 50 } - Rectangle { color: "blue"; width: 50; height: 20 } -} - \endqml - \endtable + Spacing between items can be added using the \l spacing property. + Transitions can be used for cases where items managed by a Column are + added or moved. These are stored in the \l add and \l move properties + respectively. + + See \l{Using QML Positioner and Repeater Items} for more details about this item and other + related items. + + \section1 Example Usage + + The following example positions differently shaped rectangles using a Column + item. + + \image verticalpositioner_example.png + + \snippet doc/src/snippets/declarative/column/vertical-positioner.qml document + + \section1 Using Transitions + + Transitions can be used to animate items that are added to, moved within, + or removed from a Column item. The \l add and \l move properties can be set to + the transitions that will be applied when items are added to, removed from, + or re-positioned within a Column item. + + The use of transitions with positioners is described in more detail in the + \l{Using QML Positioner and Repeater Items#Using Transitions}{Using QML + Positioner and Repeater Items} document. - Column also provides for transitions to be set when items are added, moved, - or removed in the positioner. Adding and removing apply both to items which are deleted - or have their position in the document changed so as to no longer be children of the positioner, - as well as to items which have their opacity set to or from zero so as to appear or disappear. + \image verticalpositioner_transition.gif - \table - \row - \o \image verticalpositioner_transition.gif - \o \qml -Column { - spacing: 2 - add: ... - move: ... - ... -} + Column { + spacing: 2 + add: ... + move: ... + ... + } \endqml - \endtable + + \section1 Limitations Note that the positioner assumes that the x and y positions of its children will not change. If you manually change the x or y properties in script, bind the x or y properties, use anchors on a child of a positioner, or have the height of a child depend on the position of a child, then the - positioner may exhibit strange behaviour. If you need to perform any of these + positioner may exhibit strange behavior. If you need to perform any of these actions, consider positioning the items without the use of a Column. Items with a width or height of 0 will not be positioned. - \sa Row, {declarative/positioners}{Positioners example} + \sa Row, Grid, Flow, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Column::add @@ -389,55 +396,47 @@ Column { This property holds the transition to be applied when adding an item to the positioner. The transition will only be applied to the added item(s). Positioner transitions will only affect the - position (x,y) of items. - - Added can mean that either the object has been created or - reparented, and thus is now a child or the positioner, or that the - object has had its opacity increased from zero, and thus is now - visible. + position (x, y) of items. + For a positioner, adding an item can mean that either the object + has been created or reparented, and thus is now a child or the + positioner, or that the object has had its opacity increased from + zero, and thus is now visible. + \sa move */ /*! \qmlproperty Transition Column::move This property holds the transition to apply when moving an item within the positioner. Positioner transitions will only affect - the position (x,y) of items. + the position (x, y) of items. + + This transition can be performed when other items are added or removed + from the positioner, or when items resize themselves. - This can happen when other items are added or removed from the - positioner, or when items resize themselves. + \image positioner-move.gif - \table - \row - \o \image positioner-move.gif - \o \qml -Column { - move: Transition { - NumberAnimation { - properties: "y" - easing.type: Easing.OutBounce + Column { + move: Transition { + NumberAnimation { + properties: "y" + easing.type: Easing.OutBounce + } } } -} \endqml - \endtable + + \sa add, {declarative/positioners}{Positioners example} */ /*! \qmlproperty int Column::spacing - spacing is the amount in pixels left empty between each adjacent - item, and defaults to 0. - - The below example places a \l Grid containing a red, a blue and a - green rectangle on a gray background. The area the grid positioner - occupies is colored white. The top positioner has the default of no spacing, - and the bottom positioner has its spacing set to 2. - - \image spacing_a.png - \image spacing_b.png + The spacing is the amount in pixels left empty between adjacent + items. The default spacing is 0. + \sa Grid::spacing */ /*! \internal @@ -496,29 +495,38 @@ void QDeclarativeColumn::reportConflictingAnchors() /*! \qmlclass Row QDeclarativeRow - \ingroup qml-positioning-elements + \ingroup qml-positioning-elements \since 4.7 \brief The Row item arranges its children horizontally. \inherits Item - The Row item positions its child items so that they are - horizontally aligned and not overlapping. + The Row item positions its child items so that they are horizontally + aligned and not overlapping. Use \l spacing to set the spacing between items in a Row, and use the \l add and \l move properties to set the transitions that should be applied when items are added to, removed from, or re-positioned within the Row. - The below example lays out differently shaped rectangles using a Row. - \qml -Row { - spacing: 2 - Rectangle { color: "red"; width: 50; height: 50 } - Rectangle { color: "green"; width: 20; height: 50 } - Rectangle { color: "blue"; width: 50; height: 20 } -} - \endqml + See \l{Using QML Positioner and Repeater Items} for more details about this item and other + related items. + + \section1 Example Usage + + The following example lays out differently shaped rectangles using a Row. + \image horizontalpositioner_example.png + \snippet doc/src/snippets/declarative/row/row.qml document + + \section1 Using Transitions + + Transitions can be used to animate items that are added to, moved within, + or removed from a Grid item. The \l add and \l move properties can be set to + the transitions that will be applied when items are added to, removed from, + or re-positioned within a Row item. + + \section1 Limitations + Note that the positioner assumes that the x and y positions of its children will not change. If you manually change the x or y properties in script, bind the x or y properties, use anchors on a child of a positioner, or have the @@ -528,56 +536,54 @@ Row { Items with a width or height of 0 will not be positioned. - \sa Column, {declarative/positioners}{Positioners example} + \sa Column, Grid, Flow, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Row::add - This property holds the transition to apply when adding an item to the positioner. - The transition will only be applied to the added item(s). - Positioner transitions will only affect the position (x,y) of items. - - An object is considered to be added to the positioner if it has been - created or reparented and thus is now a child or the positioner, or if the - object has had its opacity increased from zero, and thus is now - visible. + + This property holds the transition to be applied when adding an + item to the positioner. The transition will only be applied to the + added item(s). Positioner transitions will only affect the + position (x, y) of items. + + For a positioner, adding an item can mean that either the object + has been created or reparented, and thus is now a child or the + positioner, or that the object has had its opacity increased from + zero, and thus is now visible. + + \sa move */ /*! \qmlproperty Transition Row::move - This property holds the transition to apply when moving an item - within the positioner. Positioner transitions will only affect - the position (x,y) of items. + This property holds the transition to be applied when moving an + item within the positioner. Positioner transitions will only affect + the position (x, y) of items. - This can happen when other items are added or removed from the - positioner, or when items resize themselves. + This transition can be performed when other items are added or removed + from the positioner, or when items resize themselves. \qml -Row { - id: positioner - move: Transition { - NumberAnimation { - properties: "x" - ease: "easeOutBounce" + Row { + id: positioner + move: Transition { + NumberAnimation { + properties: "x" + ease: "easeOutBounce" + } } } -} \endqml + \sa add, {declarative/positioners}{Positioners example} */ /*! \qmlproperty int Row::spacing - spacing is the amount in pixels left empty between each adjacent - item, and defaults to 0. - - The below example places a \l Grid containing a red, a blue and a - green rectangle on a gray background. The area the grid positioner - occupies is colored white. The top positioner has the default of no spacing, - and the bottom positioner has its spacing set to 2. - - \image spacing_a.png - \image spacing_b.png + The spacing is the amount in pixels left empty between adjacent + items. The default spacing is 0. + \sa Grid::spacing */ /*! \internal @@ -635,47 +641,45 @@ void QDeclarativeRow::reportConflictingAnchors() /*! \qmlclass Grid QDeclarativeGrid - \ingroup qml-positioning-elements + \ingroup qml-positioning-elements \since 4.7 \brief The Grid item positions its children in a grid. \inherits Item The Grid item positions its child items so that they are aligned in a grid and are not overlapping. - - Spacing can be added - between child items. It also provides for transitions to be set when items are - added, moved, or removed in the positioner. Adding and removing apply - both to items which are deleted or have their position in the - document changed so as to no longer be children of the positioner, as - well as to items which have their opacity set to or from zero so - as to appear or disappear. - - A Grid defaults to four columns, and as many rows as - are necessary to fit all child items. The number of rows - and/or the number of columns can be constrained by setting the \l rows - or \l columns properties. The grid positioner calculates a grid with - rectangular cells of sufficient size to hold all items, and then - places the items in the cells, going across then down, and - positioning each item at the (0,0) corner of the cell. The below - example demonstrates this. - - \table - \row - \o \image gridLayout_example.png - \o - \qml -Grid { - columns: 3 - spacing: 2 - Rectangle { color: "red"; width: 50; height: 50 } - Rectangle { color: "green"; width: 20; height: 50 } - Rectangle { color: "blue"; width: 50; height: 20 } - Rectangle { color: "cyan"; width: 50; height: 50 } - Rectangle { color: "magenta"; width: 10; height: 10 } -} - \endqml - \endtable + + A Grid defaults to four columns, and as many rows as are necessary to + fit all child items. The number of rows and columns can be constrained + by setting the \l rows and \l columns properties. The grid positioner + calculates a grid of rectangular cells of sufficient size to hold all + items, placing the items in the cells, from left to right and top to + bottom. Each item is positioned in the top-left corner of its cell + with position (0, 0). + + Spacing can be added between child items by setting the \l spacing + property. The amount of spacing applied will be the same in the + horizontal and vertical directions. + + See \l{Using QML Positioner and Repeater Items} for more details about this item and other + related items. + + \section1 Example Usage + + The following example demonstrates this. + + \image gridLayout_example.png + + \snippet doc/src/snippets/declarative/grid/grid.qml document + + \section1 Using Transitions + + Transitions can be used to animate items that are added to, moved within, + or removed from a Grid item. The \l add and \l move properties can be set to + the transitions that will be applied when items are added to, removed from, + or re-positioned within a Grid item. + + \section1 Limitations Note that the positioner assumes that the x and y positions of its children will not change. If you manually change the x or y properties in script, bind @@ -686,55 +690,62 @@ Grid { Items with a width or height of 0 will not be positioned. - \sa Flow, {declarative/positioners}{Positioners example} + \sa Flow, Row, Column, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Grid::add - This property holds the transition to apply when adding an item to the positioner. - The transition is only applied to the added item(s). - Positioner transitions will only affect the position (x,y) of items, - as that is all the positioners affect. To animate other property change - you will have to do so based on how you have changed those properties. - - An object is considered to be added to the positioner if it has been - created or reparented and thus is now a child or the positioner, or if the - object has had its opacity increased from zero, and thus is now - visible. + + This property holds the transition to be applied when adding an + item to the positioner. The transition will only be applied to the + added item(s). Positioner transitions will only affect the + position (x, y) of items. + + For a positioner, adding an item can mean that either the object + has been created or reparented, and thus is now a child or the + positioner, or that the object has had its opacity increased from + zero, and thus is now visible. + + \sa move */ /*! \qmlproperty Transition Grid::move - This property holds the transition to apply when moving an item within the positioner. - Positioner transitions will only affect the position (x,y) of items. - This can happen when other items are added or removed from the positioner, or - when items resize themselves. + This property holds the transition to be applied when moving an + item within the positioner. Positioner transitions will only affect + the position (x, y) of items. + + This transition can be performed when other items are added or removed + from the positioner, or when items resize themselves. \qml -Grid { - move: Transition { - NumberAnimation { - properties: "x,y" - ease: "easeOutBounce" + Grid { + move: Transition { + NumberAnimation { + properties: "x,y" + ease: "easeOutBounce" + } } } -} \endqml + \sa add, {declarative/positioners}{Positioners example} */ /*! \qmlproperty int Grid::spacing - spacing is the amount in pixels left empty between each adjacent - item, and defaults to 0. + The spacing is the amount in pixels left empty between adjacent + items. The default spacing is 0. The below example places a Grid containing a red, a blue and a green rectangle on a gray background. The area the grid positioner - occupies is colored white. The top positioner has the default of no spacing, - and the bottom positioner has its spacing set to 2. + occupies is colored white. The positioner on the left has the + no spacing (the default), and the positioner on the right has + a spacing of 6. - \image spacing_a.png - \image spacing_b.png + \inlineimage qml-grid-no-spacing.png + \inlineimage qml-grid-spacing.png + \sa rows, columns */ /*! \internal @@ -748,7 +759,9 @@ QDeclarativeGrid::QDeclarativeGrid(QDeclarativeItem *parent) : /*! \qmlproperty int Grid::columns - This property holds the number of columns in the grid. + + This property holds the number of columns in the grid. The default + number of columns is 4. If the grid does not have enough items to fill the specified number of columns, some columns will be of zero width. @@ -930,13 +943,43 @@ void QDeclarativeGrid::reportConflictingAnchors() /*! \qmlclass Flow QDeclarativeFlow - \ingroup qml-positioning-elements + \ingroup qml-positioning-elements \since 4.7 \brief The Flow item arranges its children side by side, wrapping as necessary. \inherits Item - The Flow item positions its child items so that they are side by side and are - not overlapping. + The Flow item positions its child items like words on a page, wrapping them + to create rows or columns of items that do not overlap. + + Spacing between items can be added using the \l spacing property. + Transitions can be used for cases where items managed by a Column are + added or moved. These are stored in the \l add and \l move properties + respectively. + + See \l{Using QML Positioner and Repeater Items} for more details about this item and other + related items. + + \section1 Example Usage + + The following example positions \l Text items within a parent item using + a Flow item. + + \image qml-flow-snippet.png + + \snippet doc/src/snippets/declarative/flow.qml flow item + + \section1 Using Transitions + + Transitions can be used to animate items that are added to, moved within, + or removed from a Flow item. The \l add and \l move properties can be set to + the transitions that will be applied when items are added to, removed from, + or re-positioned within a Flow item. + + The use of transitions with positioners is described in more detail in the + \l{Using QML Positioner and Repeater Items#Using Transitions}{Using QML + Positioner and Repeater Items} document. + + \section1 Limitations Note that the positioner assumes that the x and y positions of its children will not change. If you manually change the x or y properties in script, bind @@ -947,38 +990,46 @@ void QDeclarativeGrid::reportConflictingAnchors() Items with a width or height of 0 will not be positioned. - \sa Grid, {declarative/positioners}{Positioners example} + \sa Column, Row, Grid, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Flow::add - This property holds the transition to apply when adding an item to the positioner. - The transition will only be applied to the added item(s). - Positioner transitions will only affect the position (x,y) of items. - - An object is considered to be added to the positioner if it has been - created or reparented and thus is now a child or the positioner, or if the - object has had its opacity increased from zero, and thus is now - visible. + + This property holds the transition to be applied when adding an + item to the positioner. The transition will only be applied to the + added item(s). Positioner transitions will only affect the + position (x, y) of items. + + For a positioner, adding an item can mean that either the object + has been created or reparented, and thus is now a child or the + positioner, or that the object has had its opacity increased from + zero, and thus is now visible. + + \sa move */ /*! \qmlproperty Transition Flow::move - This property holds the transition to apply when moving an item within the positioner. - Positioner transitions will only affect the position (x,y) of items. - This can happen when other items are added or removed from the positioner, or when items resize themselves. + This property holds the transition to be applied when moving an + item within the positioner. Positioner transitions will only affect + the position (x, y) of items. + + This transition can be performed when other items are added or removed + from the positioner, or when items resize themselves. \qml -Flow { - id: positioner - move: Transition { - NumberAnimation { - properties: "x,y" - ease: "easeOutBounce" + Flow { + id: positioner + move: Transition { + NumberAnimation { + properties: "x,y" + ease: "easeOutBounce" + } } } -} \endqml + \sa add, {declarative/positioners}{Positioners example} */ /*! \qmlproperty int Flow::spacing @@ -986,6 +1037,7 @@ Flow { spacing is the amount in pixels left empty between each adjacent item, and defaults to 0. + \sa Grid::spacing */ class QDeclarativeFlowPrivate : public QDeclarativeBasePositionerPrivate diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index 4a951a2..c4052bb 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -78,9 +78,9 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() The following Repeater creates three instances of a \l Rectangle item within a \l Row: - \snippet doc/src/snippets/declarative/repeater.qml import + \snippet doc/src/snippets/declarative/repeaters/repeater.qml import \codeline - \snippet doc/src/snippets/declarative/repeater.qml simple + \snippet doc/src/snippets/declarative/repeaters/repeater.qml simple \image repeater-simple.png @@ -92,7 +92,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() a Repeater to be used inside a layout. For example, the following Repeater's items are stacked between a red rectangle and a blue rectangle: - \snippet doc/src/snippets/declarative/repeater.qml layout + \snippet doc/src/snippets/declarative/repeaters/repeater.qml layout \image repeater.png @@ -106,7 +106,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \table \row - \o \snippet doc/src/snippets/declarative/repeater.qml index + \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml index \o \image repeater-index.png \endtable @@ -115,7 +115,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \table \row - \o \snippet doc/src/snippets/declarative/repeater.qml modeldata + \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml modeldata \o \image repeater-modeldata.png \endtable -- cgit v0.12 From 2cac8ca88c9b5b2f9d3040b1543d88ecee52da99 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 27 Aug 2010 18:27:50 +0200 Subject: Doc: Fixed links and markup. --- doc/src/getting-started/gettingstartedqml.qdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index a19d281..771f92e 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -820,11 +820,11 @@ The \c files list property is a list of all the filtered files in a directory. The \c Directory class is implemented to filter out invalid text files; only - files with a \c .txt extension are valid. Further, \l {QLists}{QLists} can be - used in QML files by declaring them as a \c QDeclarativeListProperty in C++. - The templated object needs to inherit from a \l {QObject}{QObject}, therefore, - the \c File class must also inherit from \c QObject. In the \c Directory class, - the list of \c File objects is stored in a \c QList called \c m_fileList. + files with a \c .txt extension are valid. Further, \l{QList}s can be + used in QML files by declaring them as a QDeclarativeListProperty in C++. + The templated object needs to inherit from a QObject, therefore, + the \c File class must also inherit from QObject. In the \c Directory class, + the list of \c File objects is stored in a QList called \c m_fileList. \code class File : public QObject{ -- cgit v0.12 From 2e8419e43ce4d5be64bddf1b5b5f5ea9e28c55de Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Sep 2010 12:32:07 +0200 Subject: Doc: More work on QML documentation and snippets. --- doc/src/images/qml-flow-snippet.png | Bin 10385 -> 11465 bytes doc/src/images/qml-flow-text1.png | Bin 0 -> 9647 bytes doc/src/images/qml-flow-text2.png | Bin 0 -> 10870 bytes doc/src/snippets/declarative/flow-diagram.qml | 75 +++++++++++++++++++++ doc/src/snippets/declarative/flow.qml | 4 +- doc/src/snippets/declarative/grid/grid-spacing.qml | 2 + .../graphicsitems/qdeclarativepositioners.cpp | 11 +-- 7 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 doc/src/images/qml-flow-text1.png create mode 100644 doc/src/images/qml-flow-text2.png create mode 100644 doc/src/snippets/declarative/flow-diagram.qml diff --git a/doc/src/images/qml-flow-snippet.png b/doc/src/images/qml-flow-snippet.png index 1a2af4b..af873d1 100644 Binary files a/doc/src/images/qml-flow-snippet.png and b/doc/src/images/qml-flow-snippet.png differ diff --git a/doc/src/images/qml-flow-text1.png b/doc/src/images/qml-flow-text1.png new file mode 100644 index 0000000..99ce752 Binary files /dev/null and b/doc/src/images/qml-flow-text1.png differ diff --git a/doc/src/images/qml-flow-text2.png b/doc/src/images/qml-flow-text2.png new file mode 100644 index 0000000..844e0de Binary files /dev/null and b/doc/src/images/qml-flow-text2.png differ diff --git a/doc/src/snippets/declarative/flow-diagram.qml b/doc/src/snippets/declarative/flow-diagram.qml new file mode 100644 index 0000000..80506b9 --- /dev/null +++ b/doc/src/snippets/declarative/flow-diagram.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + color: "lightblue" + width: 300; height: 200 + +//! [flow item] + Flow { + anchors.fill: parent + anchors.margins: 4 + spacing: 10 + + Repeater { + id: repeater + model: { + var strings = ["Text", "items", "flowing", "inside", "a", + "Flow", "item"]; + strings; + } + + Rectangle { + color: "white" + width: textItem.width + 4 + height: textItem.height + 4 + Text { + id: textItem + anchors.horizontalCenter: parent.horizontalCenter + text: repeater.model[index] + font.pixelSize: 40 + } + } + } + } +//! [flow item] +} diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/declarative/flow.qml index c5fbc90..77db683 100644 --- a/doc/src/snippets/declarative/flow.qml +++ b/doc/src/snippets/declarative/flow.qml @@ -38,6 +38,7 @@ ** ****************************************************************************/ +//! [document] import Qt 4.7 Rectangle { @@ -53,10 +54,11 @@ Rectangle { Text { text: "Text"; font.pixelSize: 40 } Text { text: "items"; font.pixelSize: 40 } Text { text: "flowing"; font.pixelSize: 40 } - Text { text: "in"; font.pixelSize: 40 } + Text { text: "inside"; font.pixelSize: 40 } Text { text: "a"; font.pixelSize: 40 } Text { text: "Flow"; font.pixelSize: 40 } Text { text: "item"; font.pixelSize: 40 } } //! [flow item] } +//! [document] diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid/grid-spacing.qml index 5099758..8715977 100644 --- a/doc/src/snippets/declarative/grid/grid-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-spacing.qml @@ -38,6 +38,7 @@ ** ****************************************************************************/ +//! [document] import Qt 4.7 Rectangle { @@ -56,3 +57,4 @@ Rectangle { Rectangle { color: "#6666aa"; width: 50; height: 50 } } } +//! [document] diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index b653282..149e822 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -649,13 +649,14 @@ void QDeclarativeRow::reportConflictingAnchors() The Grid item positions its child items so that they are aligned in a grid and are not overlapping. + The grid positioner calculates a grid of rectangular cells of sufficient + size to hold all items, placing the items in the cells, from left to right + and top to bottom. Each item is positioned in the top-left corner of its + cell with position (0, 0). + A Grid defaults to four columns, and as many rows as are necessary to fit all child items. The number of rows and columns can be constrained - by setting the \l rows and \l columns properties. The grid positioner - calculates a grid of rectangular cells of sufficient size to hold all - items, placing the items in the cells, from left to right and top to - bottom. Each item is positioned in the top-left corner of its cell - with position (0, 0). + by setting the \l rows and \l columns properties. Spacing can be added between child items by setting the \l spacing property. The amount of spacing applied will be the same in the -- cgit v0.12 From 431cde6aa40a017abc1bfd52b2340e5b1d62d36c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Sep 2010 18:39:29 +0200 Subject: Doc: Fixed autotest breakage caused by snippets. --- .../snippets/declarative/qml-intro/anchors1.qml | 2 +- .../snippets/declarative/qml-intro/anchors2.qml | 2 +- .../snippets/declarative/qml-intro/anchors3.qml | 2 +- .../declarative/qml-intro/basic-syntax.qml | 6 +- .../declarative/qml-intro/hello-world4.qml | 2 +- .../declarative/qml-intro/hello-world5.qml | 2 +- .../declarative/qml-intro/images/qt-logo.svg | 104 +++++++++++++++++++++ .../declarative/qml-intro/number-animation1.qml | 2 +- .../declarative/qml-intro/number-animation2.qml | 2 +- .../qml-intro/sequential-animation1.qml | 4 +- .../qml-intro/sequential-animation2.qml | 4 +- .../qml-intro/sequential-animation3.qml | 6 +- .../declarative/qml-intro/transformations1.qml | 2 +- 13 files changed, 124 insertions(+), 16 deletions(-) create mode 100644 doc/src/snippets/declarative/qml-intro/images/qt-logo.svg diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/qml-intro/anchors1.qml index 09ef3b2..c1158b8 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors1.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors1.qml @@ -48,7 +48,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 150; height: 150 anchors.bottom: myWin.bottom } diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/qml-intro/anchors2.qml index ef0ec1f..a7d4922 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors2.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors2.qml @@ -48,7 +48,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 150; height: 150 anchors.bottom: myWin.bottom anchors.horizontalCenter: myWin.horizontalCenter diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml index 008ad1a..a2e0f03 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors3.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors3.qml @@ -47,7 +47,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 150; height: 150 anchors.bottom: myWin.bottom anchors.horizontalCenter: myWin.horizontalCenter diff --git a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml index 686a927..0a7d5f8 100644 --- a/doc/src/snippets/declarative/qml-intro/basic-syntax.qml +++ b/doc/src/snippets/declarative/qml-intro/basic-syntax.qml @@ -40,9 +40,11 @@ // Note: this file is not intended to be run. +import Qt 4.7 + //! [basic syntax] -SomeElement { +Item { id: myObject - ... some other things here ... + // ... some other things here ... } //! [basic syntax] diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/qml-intro/hello-world4.qml index c18fe15..9656ff8 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world4.qml @@ -53,7 +53,7 @@ Rectangle { //! [added an image] Image { - source: "images/qt-logo.png" + source: "images/qt-logo.svg" } //! [added an image] diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/qml-intro/hello-world5.qml index bde8dc3..b816e09 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world5.qml @@ -54,7 +54,7 @@ Rectangle { //! [positioning the image] Image { - source: "images/qt-logo.png" + source: "images/qt-logo.svg" x: 100; y: 150 width: 150; height: 150 } diff --git a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg b/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg new file mode 100644 index 0000000..8c018be --- /dev/null +++ b/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg @@ -0,0 +1,104 @@ + + + + + + image/svg+xml + + + + + + SVG generated by Lineform + + + + + + + + + + + + + + + diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/qml-intro/number-animation1.qml index 8d8d747..7b405e4 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation1.qml @@ -48,7 +48,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" x: 200; y: 100 width: 100; height: 100 diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml index d556c21..f109f76 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml @@ -48,7 +48,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" x: 200; y: 100 width: 100; height: 100 diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml index e68de20..7ae2fde 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml @@ -49,14 +49,14 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" x: 20; y: 20 ; z: 1 width: 100; height: 100 } Image { id: image2 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 100; height: 100 x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 z: 2 diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml index 31835a1..ac0f3f5 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml @@ -49,7 +49,7 @@ Rectangle { //! [adding a sequential animation] Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 100; height: 100 SequentialAnimation on x { @@ -65,7 +65,7 @@ Rectangle { Image { id: image2 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 100; height: 100 x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 z: 2 diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml index f83a966..1037b79 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml @@ -38,6 +38,8 @@ ** ****************************************************************************/ +import Qt 4.7 + //! [document] Rectangle { id: mainRec @@ -47,7 +49,7 @@ Rectangle { Image { id: image2 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 100; height: 100 x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 z: 2 @@ -55,7 +57,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" x: 20; y: 20 ; z: 1 width: 100; height: 100 diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/qml-intro/transformations1.qml index af39e69..b4a1692 100644 --- a/doc/src/snippets/declarative/qml-intro/transformations1.qml +++ b/doc/src/snippets/declarative/qml-intro/transformations1.qml @@ -48,7 +48,7 @@ Rectangle { Image { id: image1 - source: "images/qt-logo.png" + source: "images/qt-logo.svg" width: 150; height: 150 anchors.bottom: myWin.bottom anchors.horizontalCenter: myWin.horizontalCenter -- cgit v0.12 From b38fa28a246bd039593bff732ea7c195dc7e5af9 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Sep 2010 19:00:45 +0200 Subject: Doc: Added types to method and signal documentation; other fixes. --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 74 +++++++++++----------- .../graphicsitems/qdeclarativemousearea.cpp | 10 +-- src/declarative/graphicsitems/qdeclarativetext.cpp | 2 +- .../graphicsitems/qdeclarativetextedit.cpp | 4 +- src/declarative/qml/qdeclarativecomponent.cpp | 2 +- src/declarative/qml/qdeclarativeengine.cpp | 4 +- src/declarative/qml/qdeclarativeinclude.cpp | 2 +- src/declarative/qml/qdeclarativetypeloader.cpp | 9 +++ 8 files changed, 58 insertions(+), 49 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index aca2bb7..11f9179 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -830,259 +830,259 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post) */ /*! - \qmlsignal Keys::onPressed(event) + \qmlsignal Keys::onPressed(KeyEvent event) This handler is called when a key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onReleased(event) + \qmlsignal Keys::onReleased(KeyEvent event) This handler is called when a key has been released. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit0Pressed(event) + \qmlsignal Keys::onDigit0Pressed(KeyEvent event) This handler is called when the digit '0' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit1Pressed(event) + \qmlsignal Keys::onDigit1Pressed(KeyEvent event) This handler is called when the digit '1' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit2Pressed(event) + \qmlsignal Keys::onDigit2Pressed(KeyEvent event) This handler is called when the digit '2' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit3Pressed(event) + \qmlsignal Keys::onDigit3Pressed(KeyEvent event) This handler is called when the digit '3' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit4Pressed(event) + \qmlsignal Keys::onDigit4Pressed(KeyEvent event) This handler is called when the digit '4' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit5Pressed(event) + \qmlsignal Keys::onDigit5Pressed(KeyEvent event) This handler is called when the digit '5' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit6Pressed(event) + \qmlsignal Keys::onDigit6Pressed(KeyEvent event) This handler is called when the digit '6' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit7Pressed(event) + \qmlsignal Keys::onDigit7Pressed(KeyEvent event) This handler is called when the digit '7' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit8Pressed(event) + \qmlsignal Keys::onDigit8Pressed(KeyEvent event) This handler is called when the digit '8' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDigit9Pressed(event) + \qmlsignal Keys::onDigit9Pressed(KeyEvent event) This handler is called when the digit '9' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onLeftPressed(event) + \qmlsignal Keys::onLeftPressed(KeyEvent event) This handler is called when the Left arrow has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onRightPressed(event) + \qmlsignal Keys::onRightPressed(KeyEvent event) This handler is called when the Right arrow has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onUpPressed(event) + \qmlsignal Keys::onUpPressed(KeyEvent event) This handler is called when the Up arrow has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDownPressed(event) + \qmlsignal Keys::onDownPressed(KeyEvent event) This handler is called when the Down arrow has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onAsteriskPressed(event) + \qmlsignal Keys::onAsteriskPressed(KeyEvent event) This handler is called when the Asterisk '*' has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onEscapePressed(event) + \qmlsignal Keys::onEscapePressed(KeyEvent event) This handler is called when the Escape key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onReturnPressed(event) + \qmlsignal Keys::onReturnPressed(KeyEvent event) This handler is called when the Return key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onEnterPressed(event) + \qmlsignal Keys::onEnterPressed(KeyEvent event) This handler is called when the Enter key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onDeletePressed(event) + \qmlsignal Keys::onDeletePressed(KeyEvent event) This handler is called when the Delete key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onSpacePressed(event) + \qmlsignal Keys::onSpacePressed(KeyEvent event) This handler is called when the Space key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onBackPressed(event) + \qmlsignal Keys::onBackPressed(KeyEvent event) This handler is called when the Back key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onCancelPressed(event) + \qmlsignal Keys::onCancelPressed(KeyEvent event) This handler is called when the Cancel key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onSelectPressed(event) + \qmlsignal Keys::onSelectPressed(KeyEvent event) This handler is called when the Select key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onYesPressed(event) + \qmlsignal Keys::onYesPressed(KeyEvent event) This handler is called when the Yes key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onNoPressed(event) + \qmlsignal Keys::onNoPressed(KeyEvent event) This handler is called when the No key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onContext1Pressed(event) + \qmlsignal Keys::onContext1Pressed(KeyEvent event) This handler is called when the Context1 key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onContext2Pressed(event) + \qmlsignal Keys::onContext2Pressed(KeyEvent event) This handler is called when the Context2 key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onContext3Pressed(event) + \qmlsignal Keys::onContext3Pressed(KeyEvent event) This handler is called when the Context3 key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onContext4Pressed(event) + \qmlsignal Keys::onContext4Pressed(KeyEvent event) This handler is called when the Context4 key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onCallPressed(event) + \qmlsignal Keys::onCallPressed(KeyEvent event) This handler is called when the Call key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onHangupPressed(event) + \qmlsignal Keys::onHangupPressed(KeyEvent event) This handler is called when the Hangup key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onFlipPressed(event) + \qmlsignal Keys::onFlipPressed(KeyEvent event) This handler is called when the Flip key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onMenuPressed(event) + \qmlsignal Keys::onMenuPressed(KeyEvent event) This handler is called when the Menu key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onVolumeUpPressed(event) + \qmlsignal Keys::onVolumeUpPressed(KeyEvent event) This handler is called when the VolumeUp key has been pressed. The \a event parameter provides information about the event. */ /*! - \qmlsignal Keys::onVolumeDownPressed(event) + \qmlsignal Keys::onVolumeDownPressed(KeyEvent event) This handler is called when the VolumeDown key has been pressed. The \a event parameter provides information about the event. diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index ec01549..5516611 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -250,7 +250,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() */ /*! - \qmlsignal MouseArea::onClicked(mouse) + \qmlsignal MouseArea::onClicked(MouseEvent mouse) This handler is called when there is a click. A click is defined as a press followed by a release, both inside the MouseArea (pressing, moving outside the MouseArea, and then moving back inside and @@ -263,7 +263,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() */ /*! - \qmlsignal MouseArea::onPressed(mouse) + \qmlsignal MouseArea::onPressed(MouseEvent mouse) This handler is called when there is a press. The \l {MouseEvent}{mouse} parameter provides information about the press, including the x and y @@ -277,7 +277,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() */ /*! - \qmlsignal MouseArea::onReleased(mouse) + \qmlsignal MouseArea::onReleased(MouseEvent mouse) This handler is called when there is a release. The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y @@ -287,7 +287,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() */ /*! - \qmlsignal MouseArea::onPressAndHold(mouse) + \qmlsignal MouseArea::onPressAndHold(MouseEvent mouse) This handler is called when there is a long press (currently 800ms). The \l {MouseEvent}{mouse} parameter provides information about the press, including the x and y @@ -297,7 +297,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() */ /*! - \qmlsignal MouseArea::onDoubleClicked(mouse) + \qmlsignal MouseArea::onDoubleClicked(MouseEvent mouse) This handler is called when there is a double-click (a press followed by a release followed by a press). The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index f16af88..fd3a1f7 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1205,7 +1205,7 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event) } /*! - \qmlsignal Text::onLinkActivated(link) + \qmlsignal Text::onLinkActivated(string link) This handler is called when the user clicks on a link embedded in the text. */ diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index b1c0fcd..3ac095c 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -555,7 +555,7 @@ QRectF QDeclarativeTextEdit::positionToRectangle(int pos) const } /*! - \qmlmethod int TextEdit::positionAt(x,y) + \qmlmethod int TextEdit::positionAt(int x, int y) Returns the text position closest to pixel position (\a x, \a y). @@ -1018,7 +1018,7 @@ void QDeclarativeTextEdit::selectWord() } /*! - \qmlmethod void TextEdit::select(start,end) + \qmlmethod void TextEdit::select(int start, int end) Causes the text from \a start to \a end to be selected. diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 75bb5db..73d4d2e 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -573,7 +573,7 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q } /*! - \qmlmethod object Component::createObject(parent) + \qmlmethod object Component::createObject(Item parent) Creates and returns an object instance of this component that will have the given \a parent. Returns null if object creation fails. diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 8461368..82188df 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -272,8 +272,8 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e) } /*! - \qmlmethod url Qt::resolvedUrl(url) - Returns \c url resolved relative to the URL of the caller. + \qmlmethod url Qt::resolvedUrl(url url) + Returns \a url resolved relative to the URL of the caller. */ QUrl QDeclarativeScriptEngine::resolvedUrl(QScriptContext *context, const QUrl& url) { diff --git a/src/declarative/qml/qdeclarativeinclude.cpp b/src/declarative/qml/qdeclarativeinclude.cpp index f26b54f..1e240d7 100644 --- a/src/declarative/qml/qdeclarativeinclude.cpp +++ b/src/declarative/qml/qdeclarativeinclude.cpp @@ -173,7 +173,7 @@ void QDeclarativeInclude::callback(QScriptEngine *engine, QScriptValue &callback } /*! -\qmlmethod object Qt::include(url, callback) +\qmlmethod object Qt::include(string url, jsobject callback) Include another JavaScript file. This method can only be used from within JavaScript files, and not regular QML files. diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index 8c291f2..ed41314 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -65,6 +65,9 @@ The QDeclarativeDataLoader invokes callbacks on the QDeclarativeDataBlob as data /*! \enum QDeclarativeDataBlob::Status +This enum describes the status of the data blob. + +\list \o Null The blob has not yet been loaded by a QDeclarativeDataLoader \o Loading The blob is loading network data. The QDeclarativeDataBlob::setData() callback has not yet been invoked or has not yet returned. @@ -73,13 +76,19 @@ only occurs after the QDeclarativeDataBlob::setData() callback has been made, an dependencies. \o Complete The blob's data has been loaded and all dependencies are done. \o Error An error has been set on this blob. +\endlist */ /*! \enum QDeclarativeDataBlob::Type + +This enum describes the type of the data blob. + +\list \o QmlFile This is a QDeclarativeTypeData \o JavaScriptFile This is a QDeclarativeScriptData \o QmldirFile This is a QDeclarativeQmldirData +\endlist */ /*! -- cgit v0.12 From 23393f9650624bcc82942ee69161b6b916fa801e Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 2 Sep 2010 13:42:39 +1000 Subject: Revert "Restore default if to system default on session close." This reverts commit bce4c42a3d0c7d24009230e09aa58db60db39d40. This change did not have the desired effect on Symbian versions prior to Symbian^3. Conflicts: src/plugins/bearer/symbian/qnetworksession_impl.cpp --- .../bearer/symbian/qnetworksession_impl.cpp | 42 ++++++++-------------- src/plugins/bearer/symbian/qnetworksession_impl.h | 1 - 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 19f13c2..2091898 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -111,13 +111,15 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl() Cancel(); iSocketServ.Close(); - // Restore default interface to system default - restoreDefaultIf(); + // Close global 'Open C' RConnection + // Clears also possible unsetdefaultif() flags. + setdefaultif(0); iConnectionMonitor.Close(); iOpenCLibrary.Close(); #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG - qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and restoreDefaultIf())"; + qDebug() << "QNS this : " << QString::number((uint)this) + << " - destroyed (and setdefaultif(0))"; #endif } @@ -533,8 +535,15 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals) Cancel(); // closes iConnection iSocketServ.Close(); - // Restore default interface to system default - restoreDefaultIf(); + // Close global 'Open C' RConnection. If OpenC supports, + // close the defaultif for good to avoid difficult timing + // and bouncing issues of network going immediately back up + // because of e.g. select() thread etc. + if (iDynamicUnSetdefaultif) { + iDynamicUnSetdefaultif(); + } else { + setdefaultif(0); + } // If UserChoice, go down immediately. If some other configuration, // go down immediately if there is no reports expected from the platform; @@ -1459,29 +1468,6 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne } } -void QNetworkSessionPrivateImpl::restoreDefaultIf() -{ - QNetworkConfigurationPrivatePointer config = engine->defaultConfiguration(); - - QMutexLocker locker(&config->mutex); - - ifreq ifr; - memset(&ifr, 0, sizeof(ifreq)); - - switch (config->type) { - case QNetworkConfiguration::InternetAccessPoint: - strcpy(ifr.ifr_name, config->name.toUtf8().constData()); - break; - case QNetworkConfiguration::ServiceNetwork: - ifr.ifr_ifru.snap_id = toSymbianConfig(config)->numericId; - break; - default: - ; - }; - - setdefaultif(&ifr); -} - #if defined(SNAP_FUNCTIONALITY_AVAILABLE) bool QNetworkSessionPrivateImpl::easyWlanTrueIapId(TUint32 &trueIapId) const { diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h index 51f2e70..8e3e997 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.h +++ b/src/plugins/bearer/symbian/qnetworksession_impl.h @@ -141,7 +141,6 @@ private: void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0); QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const; QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const; - void restoreDefaultIf(); #ifndef QT_NO_NETWORKINTERFACE QNetworkInterface interface(TUint iapId) const; #endif -- cgit v0.12 From f700d92ad259e3c4ddc6adf04069e200403b028a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 2 Sep 2010 11:54:11 +0200 Subject: Update the cpuid code to be better There's no need to test and retest if the cpuid instruction is present on 32-bit. There's no need to test it at all on 64-bit. We don't know why, but it also fixes some problems on 64-bit. Approving-nod-from: Bradley Hughes --- src/corelib/tools/qsimd.cpp | 106 ++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 69 deletions(-) diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 68ab033..7349432 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -140,56 +140,41 @@ static inline uint detectProcessorFeatures() uint result = 0; /* see p. 118 of amd64 instruction set manual Vol3 */ #if defined(Q_CC_GNU) - asm ("push %%ebx\n" - "pushf\n" - "pop %%eax\n" - "mov %%eax, %%ebx\n" - "xor $0x00200000, %%eax\n" - "push %%eax\n" - "popf\n" - "pushf\n" - "pop %%eax\n" - "xor %%edx, %%edx\n" - "xor %%ebx, %%eax\n" - "jz 1f\n" - - "mov $0x00000001, %%eax\n" - "cpuid\n" - "1:\n" - "pop %%ebx\n" - "mov %%edx, %0\n" - "mov %%ecx, %1\n" - : "=r" (result), "=r" (feature_result) - : - : "%eax", "%ecx", "%edx" - ); - - asm ("push %%ebx\n" - "pushf\n" - "pop %%eax\n" - "mov %%eax, %%ebx\n" - "xor $0x00200000, %%eax\n" - "push %%eax\n" + long cpuid_supported, tmp1; + asm ("pushf\n" + "pop %0\n" + "mov %0, %1\n" + "xor $0x00200000, %0\n" + "push %0\n" "popf\n" "pushf\n" - "pop %%eax\n" - "xor %%edx, %%edx\n" - "xor %%ebx, %%eax\n" - "jz 2f\n" - - "mov $0x80000000, %%eax\n" - "cpuid\n" - "cmp $0x80000000, %%eax\n" - "jbe 2f\n" - "mov $0x80000001, %%eax\n" - "cpuid\n" - "2:\n" - "pop %%ebx\n" - "mov %%edx, %0\n" - : "=r" (extended_result) - : - : "%eax", "%ecx", "%edx" - ); + "pop %0\n" + "xor %1, %0\n" // %eax is now 0 if CPUID is not supported + : "=a" (cpuid_supported), "=r" (tmp1) + ); + if (cpuid_supported) { + asm ("xchg %%ebx, %2\n" + "cpuid\n" + "xchg %%ebx, %2\n" + : "=c" (feature_result), "=d" (result), "=&r" (tmp1) + : "a" (1)); + + asm ("xchg %%ebx, %1\n" + "cpuid\n" + "cmp $0x80000000, %%eax\n" + "jnbe 1f\n" + "xor %0, %0\n" + "jmp 2f\n" + "1:\n" + "mov $0x80000001, %%eax\n" + "cpuid\n" + "2:\n" + "xchg %%ebx, %1\n" + : "=d" (extended_result), "=&r" (tmp1) + : "a" (0x80000000) + : "%ecx" + ); + } #elif defined (Q_OS_WIN) _asm { @@ -289,27 +274,10 @@ static inline uint detectProcessorFeatures() uint feature_result = 0; #if defined(Q_CC_GNU) - asm ("push %%rbx\n" - "pushf\n" - "pop %%rax\n" - "mov %%eax, %%ebx\n" - "xor $0x00200000, %%eax\n" - "push %%rax\n" - "popf\n" - "pushf\n" - "pop %%rax\n" - "xor %%edx, %%edx\n" - "xor %%ebx, %%eax\n" - "jz 1f\n" - - "mov $0x00000001, %%eax\n" - "cpuid\n" - "1:\n" - "pop %%rbx\n" - "mov %%ecx, %0\n" - : "=r" (feature_result) - : - : "%eax", "%ecx", "%edx" + asm ("cpuid" + : "=c" (feature_result) + : "a" (1) + : "%ebx", "%edx" ); #elif defined (Q_OS_WIN64) { -- cgit v0.12 From 0896d1f24396a2721cf1671f4e658b8856a0f430 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 29 Jun 2010 21:29:46 +0200 Subject: Reorganise qelapsedtimer_unix.cpp for better inlining performance. Benchmarks indicate no more than 5% improvement in the calls to elapsed(). Reviewed-by: Bradley T. Hughes --- src/corelib/tools/qelapsedtimer_unix.cpp | 129 ++++++++++++++++++------------- 1 file changed, 74 insertions(+), 55 deletions(-) diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp index 2c4ea58..633fa00 100644 --- a/src/corelib/tools/qelapsedtimer_unix.cpp +++ b/src/corelib/tools/qelapsedtimer_unix.cpp @@ -40,22 +40,58 @@ ****************************************************************************/ #include "qelapsedtimer.h" -#include "qpair.h" #include #include #include -#if !defined(QT_NO_CLOCK_MONOTONIC) -# if defined(QT_BOOTSTRAPPED) -# define QT_NO_CLOCK_MONOTONIC +#if defined(QT_NO_CLOCK_MONOTONIC) || defined(QT_BOOTSTRAPPED) +// turn off the monotonic clock +# ifdef _POSIX_MONOTONIC_CLOCK +# undef _POSIX_MONOTONIC_CLOCK # endif +# define _POSIX_MONOTONIC_CLOCK -1 #endif QT_BEGIN_NAMESPACE -static qint64 fractionAdjustment() +#if (_POSIX_MONOTONIC_CLOCK-0 != 0) +static const bool monotonicClockChecked = true; +static const bool monotonicClockAvailable = _POSIX_MONOTONIC_CLOCK > 0; +#else +static int monotonicClockChecked = false; +static int monotonicClockAvailable = false; +#endif + +#ifdef Q_CC_GNU +# define is_likely(x) __builtin_expect((x), 1) +#else +# define is_likely(x) (x) +#endif +#define load_acquire(x) ((volatile const int&)(x)) +#define store_release(x,v) ((volatile int&)(x) = (v)) + +static void unixCheckClockType() +{ +#if (_POSIX_MONOTONIC_CLOCK-0 == 0) + if (is_likely(load_acquire(monotonicClockChecked))) + return; + +# if defined(_SC_MONOTONIC_CLOCK) + // detect if the system support monotonic timers + long x = sysconf(_SC_MONOTONIC_CLOCK); + store_release(monotonicClockAvailable, x >= 200112L); +# endif + + store_release(monotonicClockChecked, true); +#endif +} + +static inline qint64 fractionAdjustment() { - if (QElapsedTimer::isMonotonic()) { + // disabled, but otherwise indicates bad usage of QElapsedTimer + //Q_ASSERT(monotonicClockChecked); + + if (monotonicClockAvailable) { // the monotonic timer is measured in nanoseconds // 1 ms = 1000000 ns return 1000*1000ull; @@ -68,90 +104,73 @@ static qint64 fractionAdjustment() bool QElapsedTimer::isMonotonic() { -#if (_POSIX_MONOTONIC_CLOCK-0 > 0) - return true; -#else - static int returnValue = 0; - - if (returnValue == 0) { -# if (_POSIX_MONOTONIC_CLOCK-0 < 0) || !defined(_SC_MONOTONIC_CLOCK) - returnValue = -1; -# elif (_POSIX_MONOTONIC_CLOCK == 0) - // detect if the system support monotonic timers - long x = sysconf(_SC_MONOTONIC_CLOCK); - returnValue = (x >= 200112L) ? 1 : -1; -# endif - } - - return returnValue != -1; -#endif + unixCheckClockType(); + return monotonicClockAvailable; } QElapsedTimer::ClockType QElapsedTimer::clockType() { - return isMonotonic() ? MonotonicClock : SystemTime; + unixCheckClockType(); + return monotonicClockAvailable ? MonotonicClock : SystemTime; } -static inline QPair do_gettime() +static inline void do_gettime(qint64 *sec, qint64 *frac) { -#if (_POSIX_MONOTONIC_CLOCK-0 > 0) - timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return qMakePair(ts.tv_sec, ts.tv_nsec); -#else -# if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED) - if (QElapsedTimer::isMonotonic()) { +#if (_POSIX_MONOTONIC_CLOCK-0 >= 0) + unixCheckClockType(); + if (is_likely(monotonicClockAvailable)) { timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return qMakePair(ts.tv_sec, ts.tv_nsec); + *sec = ts.tv_sec; + *frac = ts.tv_nsec; + return; } -# endif +#endif // use gettimeofday timeval tv; ::gettimeofday(&tv, 0); - return qMakePair(tv.tv_sec, tv.tv_usec); -#endif + *sec = tv.tv_sec; + *frac = tv.tv_usec; } // used in qcore_unix.cpp and qeventdispatcher_unix.cpp timeval qt_gettime() { - QPair r = do_gettime(); + qint64 sec, frac; + do_gettime(&sec, &frac); timeval tv; - tv.tv_sec = r.first; - tv.tv_usec = r.second; - if (QElapsedTimer::isMonotonic()) + tv.tv_sec = sec; + tv.tv_usec = frac; + if (monotonicClockAvailable) tv.tv_usec /= 1000; return tv; } +static qint64 elapsedAndRestart(qint64 sec, qint64 frac, + qint64 *nowsec, qint64 *nowfrac) +{ + do_gettime(nowsec, nowfrac); + sec = *nowsec - sec; + frac = *nowfrac - frac; + return sec * Q_INT64_C(1000) + frac / fractionAdjustment(); +} + void QElapsedTimer::start() { - QPair r = do_gettime(); - t1 = r.first; - t2 = r.second; + do_gettime(&t1, &t2); } qint64 QElapsedTimer::restart() { - QPair r = do_gettime(); - qint64 oldt1 = t1; - qint64 oldt2 = t2; - t1 = r.first; - t2 = r.second; - - r.first -= oldt1; - r.second -= oldt2; - return r.first * Q_INT64_C(1000) + r.second / fractionAdjustment(); + return elapsedAndRestart(t1, t2, &t1, &t2); } qint64 QElapsedTimer::elapsed() const { - QElapsedTimer now; - now.start(); - return msecsTo(now); + qint64 sec, frac; + return elapsedAndRestart(t1, t2, &sec, &frac); } qint64 QElapsedTimer::msecsSinceReference() const -- cgit v0.12 From a1e1103e1c3f0e47c5d075660a77d00f47e1c125 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 17 Aug 2010 21:32:23 +0200 Subject: Rewrite ucstrcmp in terms of ucstrncmp Reviewed-By: Bradley T. Hughes --- src/corelib/tools/qstring.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d940bf8..2813b29 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -173,19 +173,6 @@ static int ucstricmp(const ushort *a, const ushort *ae, const uchar *b) return 1; } -// Unicode case-sensitive comparison -static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen) -{ - if (a == b && alen == blen) - return 0; - int l = qMin(alen, blen); - while (l-- && *a == *b) - a++,b++; - if (l == -1) - return (alen-blen); - return a->unicode() - b->unicode(); -} - // Unicode case-sensitive compare two same-sized strings static int ucstrncmp(const QChar *a, const QChar *b, int l) { @@ -196,6 +183,16 @@ static int ucstrncmp(const QChar *a, const QChar *b, int l) return a->unicode() - b->unicode(); } +// Unicode case-sensitive comparison +static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen) +{ + if (a == b && alen == blen) + return 0; + int l = qMin(alen, blen); + int cmp = ucstrncmp(a, b, l); + return cmp ? cmp : (alen-blen); +} + // Unicode case-insensitive compare two same-sized strings static int ucstrnicmp(const ushort *a, const ushort *b, int l) { -- cgit v0.12 From ac33c5ba3206ac7bb1d38c796139d864a637f7a4 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Tue, 31 Aug 2010 13:12:30 -0500 Subject: Add option to enable -MP compile option for MSVC The option is on when building Qt, but off by default for other projects, due to potential incompatible compile options in other projects. (/E, /EP, /Gm, /Yc, /showIncludes, #import preprocessor directive) Reviewed-by: bhughes Reviewed-by: ossi --- mkspecs/features/win32/msvc_mp.prf | 2 ++ mkspecs/win32-msvc2008/qmake.conf | 2 ++ mkspecs/win32-msvc2010/qmake.conf | 2 ++ tools/configure/configureapp.cpp | 14 +++++++++++++- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 mkspecs/features/win32/msvc_mp.prf diff --git a/mkspecs/features/win32/msvc_mp.prf b/mkspecs/features/win32/msvc_mp.prf new file mode 100644 index 0000000..d6dea14 --- /dev/null +++ b/mkspecs/features/win32/msvc_mp.prf @@ -0,0 +1,2 @@ +QMAKE_CFLAGS += $$QMAKE_CFLAGS_MP +QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MP diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index 9805e90..9a69aaa 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -23,6 +23,7 @@ QMAKE_CFLAGS_RELEASE = -O2 -MD QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL +QMAKE_CFLAGS_MP = -MP QMAKE_CXX = $$QMAKE_CC QMAKE_CXXFLAGS = $$QMAKE_CFLAGS @@ -32,6 +33,7 @@ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG +QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP QMAKE_CXXFLAGS_STL_ON = -EHsc QMAKE_CXXFLAGS_STL_OFF = QMAKE_CXXFLAGS_RTTI_ON = -GR diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 28d4d3c..8331c14 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -23,6 +23,7 @@ QMAKE_CFLAGS_RELEASE = -O2 -MD QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL +QMAKE_CFLAGS_MP = -MP QMAKE_CXX = $$QMAKE_CC QMAKE_CXXFLAGS = $$QMAKE_CFLAGS @@ -32,6 +33,7 @@ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG +QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP QMAKE_CXXFLAGS_STL_ON = -EHsc QMAKE_CXXFLAGS_STL_OFF = QMAKE_CXXFLAGS_RTTI_ON = -GR diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 09da581..89d3ef0 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -381,6 +381,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "INCREDIBUILD_XGE" ] = "auto"; dictionary[ "LTCG" ] = "no"; dictionary[ "NATIVE_GESTURES" ] = "yes"; + dictionary[ "MSVC_MP" ] = "no"; } Configure::~Configure() @@ -534,6 +535,13 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-no-ltcg") { dictionary[ "LTCG" ] = "no"; } + else if (configCmdLine.at(i) == "-mp") { + dictionary[ "MSVC_MP" ] = "yes"; + } + else if (configCmdLine.at(i) == "-no-mp") { + dictionary[ "MSVC_MP" ] = "no"; + } + #endif else if (configCmdLine.at(i) == "-platform") { @@ -1848,6 +1856,8 @@ bool Configure::displayHelp() desc("STYLE_S60" , "yes", "", " s60\n", ' '); desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7."); desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7."); + desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC"); + desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)"); /* We do not support -qconfig on Windows yet @@ -2822,7 +2832,7 @@ void Configure::generateCachefile() for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) { cacheStream << (*var) << endl; } - cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental create_prl link_prl depend_includepath QTDIR_build" << endl; + cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl; QStringList buildParts; buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations"; @@ -2885,6 +2895,8 @@ void Configure::generateCachefile() if (dictionary[ "LTCG" ] == "yes") configStream << " ltcg"; + if (dictionary[ "MSVC_MP" ] == "yes") + configStream << " msvc_mp"; if (dictionary[ "STL" ] == "yes") configStream << " stl"; if (dictionary[ "EXCEPTIONS" ] == "yes") -- cgit v0.12 From d9d9fc57e70a63b42077de59fca45f9de082b2a2 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Tue, 31 Aug 2010 13:50:28 -0500 Subject: Turn Makefile.win32 into batch-mode, enable /MP and PCH This should make compiling qmake quite a bit faster, since less invokations of the compiler is needed, every compile unit starts of with a already known state, and all the CPU cores are used to compile the units. Reviewed-by: bhughes Reviewed-by: ossi --- qmake/Makefile.win32 | 357 +++++++-------------------------------------------- 1 file changed, 49 insertions(+), 308 deletions(-) diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index b58757c..01387bf 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -24,9 +24,11 @@ LINK = link # !if "$(QMAKESPEC)" == "win32-msvc2005" CFLAGS = /Zc:wchar_t- +!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" +CFLAGS = /MP !endif -CFLAGS = -c -Fo$@ \ +CFLAGS_BARE = -c -Fo./ \ -W3 -nologo -O2 \ -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \ -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \ @@ -37,42 +39,23 @@ CFLAGS = -c -Fo$@ \ -I$(SOURCE_PATH)\tools\shared \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \ -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \ - -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED \ - $(CFLAGS) -CXXFLAGS = $(CFLAGS) + -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED +CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS) + +CXXFLAGS_BARE = $(CFLAGS_BARE) +CXXFLAGS = $(CFLAGS) + LFLAGS = LIBS = ole32.lib advapi32.lib LINKQMAKE = $(LINK) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = vc60.pdb vc70.pdb qmake.pdb qmake.ilk -!ELSE -# -# specific stuff for Borland make -# -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif -CXX = bcc32 -CFLAGS = -c -o$@ \ - -tWR -w -w-hid -w-use -O1 \ - -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \ - -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \ - -I$(SOURCE_PATH)\include -I$(SOURCE_PATH)\include\QtCore \ - -I$(BUILD_PATH)\src\corelib\global \ - -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \ - -I$(SOURCE_PATH)\tools\shared \ - -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \ - -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \ - -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -CXXFLAGS = $(CFLAGS) -LFLAGS = -L$(BCB)\lib -c -x -Gn -ap -Tpe c0x32.obj -LIBS = import32.lib cw32i.lib -LINKQMAKE = ilink32 $(LFLAGS) $(OBJS) $(QTOBJS), qmake.exe,,$(LIBS) -ADDCLEAN = qmake.tds +!ELSE +!ERROR Unsupported compiler for this Makefile !ENDIF #qmake code -OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \ +OBJS = qmake_pch.obj project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \ option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \ makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \ borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \ @@ -137,77 +120,9 @@ qmake.exe: $(OBJS) $(QTOBJS) -copy qmake.exe $(BUILD_PATH)\bin\qmake.exe clean:: - -del qbitarray.obj - -del qbuffer.obj - -del qcryptographichash.obj - -del qlinkedlist.obj - -del qfsfileengine.obj - -del qfsfileengine_iterator.obj - -del qbytearray.obj - -del qvsnprintf.obj - -del qbytearraymatcher.obj - -del qdatetime.obj - -del qdir.obj - -del qdiriterator.obj - -del qfile.obj - -del qtemporaryfile.obj - -del qabstractfileengine.obj - -del qfsfileengine_win.obj - -del qfsfileengine_iterator_win.obj - -del qfileinfo.obj - -del qglobal.obj - -del qhash.obj - -del qiodevice.obj - -del qlist.obj - -del qlocale.obj - -del qmalloc.obj - -del qmap.obj - -del qregexp.obj - -del qtextcodec.obj - -del qutfcodec.obj - -del qstring.obj - -del qstringlist.obj - -del qtextstream.obj - -del qdatastream.obj - -del quuid.obj - -del qvector.obj - -del qsettings.obj - -del qlibraryinfo.obj - -del qvariant.obj - -del qurl.obj - -del qsettings_win.obj - -del qmetatype.obj - -del project.obj - -del main.obj - -del makefile.obj - -del unixmake.obj - -del unixmake2.obj - -del mingw_make.obj - -del option.obj - -del winmakefile.obj - -del projectgenerator.obj - -del property.obj - -del meta.obj - -del makefiledeps.obj - -del metamakefile.obj - -del xmloutput.obj - -del borland_bmake.obj - -del msvc_nmake.obj - -del msvc_vcproj.obj - -del msvc_vcxproj.obj - -del msvc_objectmodel.obj - -del msbuild_objectmodel.obj - -del symmake.obj - -del symmake_abld.obj - -del symmake_sbsv2.obj - -del symbiancommon.obj - -del initprojectdeploy_symbian.obj - -del registry.obj - -del epocroot.obj - -del pbuilder_pbx.obj - -del qxmlstream.obj - -del qxmlutils.obj - -del qnumeric.obj + -del $(QTOBJS) + -del $(OBJS) + -del qmake_pch.pch -del vc60.pdb -del vc70.pdb -del qmake.pdb @@ -229,227 +144,53 @@ distclean:: clean .cxx.obj: $(CXX) $(CXXFLAGS) $< -qsettings_win.obj: $(SOURCE_PATH)\src\corelib\io\qsettings_win.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qsettings_win.cpp - -qsettings.obj: $(SOURCE_PATH)\src\corelib\io\qsettings.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qsettings.cpp - -qlibraryinfo.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp - -qnumeric.obj: $(SOURCE_PATH)\src\corelib\global\qnumeric.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qnumeric.cpp - -qvariant.obj: $(SOURCE_PATH)\src\corelib\kernel\qvariant.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\kernel\qvariant.cpp - -qurl.obj: $(SOURCE_PATH)\src\corelib\io\qurl.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qurl.cpp - -qtextstream.obj: $(SOURCE_PATH)\src\corelib\io\qtextstream.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qtextstream.cpp - -qdatastream.obj: $(SOURCE_PATH)\src\corelib\io\qdatastream.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdatastream.cpp - -qiodevice.obj: $(SOURCE_PATH)\src\corelib\io\qiodevice.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qiodevice.cpp - -qmalloc.obj: $(SOURCE_PATH)\src\corelib\global\qmalloc.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qmalloc.cpp - -qglobal.obj: $(SOURCE_PATH)\src\corelib\global\qglobal.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qglobal.cpp - -qhash.obj: $(SOURCE_PATH)\src\corelib\tools\qhash.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qhash.cpp - -qbytearray.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearray.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbytearray.cpp - -qcryptographichash.obj: $(SOURCE_PATH)\src\corelib\tools\qcryptographichash.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qcryptographichash.cpp - -qvsnprintf.obj: $(SOURCE_PATH)\src\corelib\tools\qvsnprintf.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qvsnprintf.cpp - -qbytearraymatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp - -qchar.obj: $(SOURCE_PATH)\src\corelib\tools\qchar.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qchar.cpp - -qutfcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp - -qstring.obj: $(SOURCE_PATH)\src\corelib\tools\qstring.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstring.cpp - -qstringmatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qstringmatcher.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstringmatcher.cpp - -qlocale.obj: $(SOURCE_PATH)\src\corelib\tools\qlocale.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlocale.cpp - -quuid.obj: $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp - -qbuffer.obj: $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp - -qlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlist.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlist.cpp - -qlinkedlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp - -qfile.obj: $(SOURCE_PATH)\src\corelib\io\qfile.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfile.cpp - -qtemporaryfile.obj: $(SOURCE_PATH)\src\corelib\io\qtemporaryfile.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qtemporaryfile.cpp - -qfsfileengine_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp - -qfsfileengine_iterator_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator_win.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator_win.cpp - -qfsfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine.cpp - -qfsfileengine_iterator.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator.cpp - -qabstractfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp - -qtextcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp - -qregexp.obj: $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp - -qvector.obj: $(SOURCE_PATH)\src\corelib\tools\qvector.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qvector.cpp +qmake_pch.obj: + $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP qmake_pch.h -qbitarray.obj: $(SOURCE_PATH)\src\corelib\tools\qbitarray.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbitarray.cpp - -qdir.obj: $(SOURCE_PATH)\src\corelib\io\qdir.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdir.cpp - -qdiriterator.obj: $(SOURCE_PATH)\src\corelib\io\qdiriterator.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdiriterator.cpp - -qmetatype.obj: $(SOURCE_PATH)\src\corelib\kernel\qmetatype.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\kernel\qmetatype.cpp - -qfileinfo.obj: $(SOURCE_PATH)\src\corelib\io\qfileinfo.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfileinfo.cpp - -qdatetime.obj: $(SOURCE_PATH)\src\corelib\tools\qdatetime.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qdatetime.cpp - -qstringlist.obj: $(SOURCE_PATH)\src\corelib\tools\qstringlist.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstringlist.cpp - -qmap.obj: $(SOURCE_PATH)\src\corelib\tools\qmap.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qmap.cpp - -qunicodetables.obj: $(SOURCE_PATH)\src\corelib\tools\qunicodetables.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qunicodetables.cpp - -makefile.obj: $(SOURCE_PATH)/qmake/generators\makefile.cpp - $(CXX) $(CXXFLAGS) generators\makefile.cpp - -unixmake.obj: $(SOURCE_PATH)/qmake/generators\unix\unixmake.cpp - $(CXX) $(CXXFLAGS) generators\unix\unixmake.cpp - -unixmake2.obj: $(SOURCE_PATH)/qmake/generators\unix\unixmake2.cpp - $(CXX) $(CXXFLAGS) generators\unix\unixmake2.cpp - -winmakefile.obj: $(SOURCE_PATH)/qmake/generators/win32/winmakefile.cpp - $(CXX) $(CXXFLAGS) generators/win32/winmakefile.cpp - -borland_bmake.obj: $(SOURCE_PATH)/qmake/generators/win32/borland_bmake.cpp - $(CXX) $(CXXFLAGS) generators/win32/borland_bmake.cpp - -mingw_make.obj: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp - $(CXX) $(CXXFLAGS) generators/win32/mingw_make.cpp - -msvc_nmake.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp - -msvc_vcproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp - -msvc_vcxproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcxproj.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_vcxproj.cpp - -msvc_objectmodel.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_objectmodel.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_objectmodel.cpp - -msbuild_objectmodel.obj: $(SOURCE_PATH)/qmake/generators/win32/msbuild_objectmodel.cpp - $(CXX) $(CXXFLAGS) generators/win32/msbuild_objectmodel.cpp - -symmake.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake.cpp - -symmake_abld.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake_abld.cpp - -symmake_sbsv2.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp - -symbiancommon.obj: $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symbiancommon.cpp - -initprojectdeploy_symbian.obj: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp - $(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp +{$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -registry.obj: $(SOURCE_PATH)/tools/shared/windows/registry.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp +{$(SOURCE_PATH)\qmake\generators\symbian}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -epocroot.obj: $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp +{$(SOURCE_PATH)\qmake\generators\unix}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -md5.obj: $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp +{$(SOURCE_PATH)\qmake\generators\win32}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -project.obj: $(SOURCE_PATH)/qmake/project.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) project.cpp +{$(SOURCE_PATH)\qmake\generators}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -meta.obj: $(SOURCE_PATH)/qmake/meta.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) meta.cpp +{$(SOURCE_PATH)\qmake}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -main.obj: $(SOURCE_PATH)/qmake/main.cpp $(SOURCE_PATH)/qmake/project.h - $(CXX) $(CXXFLAGS) main.cpp +{$(SOURCE_PATH)\src\3rdparty\md5}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -option.obj: $(SOURCE_PATH)/qmake/option.cpp $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) option.cpp +{$(SOURCE_PATH)\src\corelib\codecs}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -property.obj: $(SOURCE_PATH)/qmake/property.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) property.cpp +{$(SOURCE_PATH)\src\corelib\global}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -projectgenerator.obj: $(SOURCE_PATH)/qmake/generators/projectgenerator.cpp - $(CXX) $(CXXFLAGS) generators/projectgenerator.cpp +{$(SOURCE_PATH)\src\corelib\io}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -pbuilder_pbx.obj: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp - $(CXX) $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp +{$(SOURCE_PATH)\src\corelib\kernel}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -makefiledeps.obj: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp - $(CXX) $(CXXFLAGS) generators/makefiledeps.cpp +{$(SOURCE_PATH)\src\corelib\plugin}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp - $(CXX) $(CXXFLAGS) generators/metamakefile.cpp +{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -xmloutput.obj: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp - $(CXX) $(CXXFLAGS) generators/xmloutput.cpp +{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -qxmlstream.obj: $(SOURCE_PATH)\src\corelib\xml\qxmlstream.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\xml\qxmlstream.cpp +{$(SOURCE_PATH)\tools\shared\symbian}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -qxmlutils.obj: $(SOURCE_PATH)\src\corelib\xml\qxmlutils.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\xml\qxmlutils.cpp +{$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj:: + $(CXX) $(CXXFLAGS) $< -- cgit v0.12 From 6387bb349e2590da620bd69d779df966c703f358 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Wed, 1 Sep 2010 12:30:51 -0500 Subject: New binary of configure.exe with -mp/-no-mp option Reviewed-by: trustme --- configure.exe | Bin 1320960 -> 1320960 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/configure.exe b/configure.exe index 982e038..aba5872 100755 Binary files a/configure.exe and b/configure.exe differ -- cgit v0.12 From adcd745d6ef2dbd68a28e932e2a8961b70bece09 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 2 Sep 2010 13:55:31 +0200 Subject: Doc: Updated Supported Platforms page. Finished --- doc/src/platforms/supported-platforms.qdoc | 42 ++++++++++++++---------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index bb80ae5..6e9fb3d 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -64,18 +64,22 @@ \row \o Linux (32 and 64-bit) \o gcc 4.2 \row \o Microsoft Windows XP - \o gcc 4.4 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit) + \o gcc 4.4 (MinGW) (32-bit), MSVC 2005 (32 and 64-bit) \row \o Microsoft Windows Vista \o MSVC 2005, 2008 \row \o Microsoft Windows Vista 64bit \o MSVC 2008 - \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Carbon, Cocoa 32 and 64bit) + \row \o Microsoft Windows 7 + \o MSVC 2008 + \row \o Apple Mac OS X 10.6 "Snow Leopard" + \o As provided by Apple + \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Cocoa 32 and 64bit) \o As provided by Apple \row \o Embedded Linux QWS (ARM) \o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)} \row \o Windows CE 5.0 (ARMv4i, x86, MIPS) \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii) - \row \o Symbian (Symbian/S60 3.1, 3.2 and 5.0) + \row \o Symbian (Symbian/S60 5.0) \o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications) \endtable @@ -90,19 +94,15 @@ \table \header \o Platform \o Compilers - \row \o Windows XP, Vista - \o gcc 3.4.2 (MinGW) \row \o Windows 7 - \o MSVC 2008 - \row \o Apple Mac OS X 10.6 "Snow Leopard" + \o MSVC 2010 + \row \o Apple Mac OS X 10.4 "Tiger" (Carbon) \o As provided by Apple - \row \o Apple Mac OS X 10.4 "Tiger" + \row \o Apple Mac OS X 10.5 "Leopard" (Carbon) \o As provided by Apple - \row \o HPUXi 11.11 - \o aCC 3.57, gcc 3.4 \row \o HPUXi 11.23 \o aCC 6.10 - \row \o Solaris 10 (UltraSparc, x86) + \row \o Solaris 10 UltraSparc \o Sun Studio 12 \row \o AIX 6 \o Power5 xlC 7 @@ -114,8 +114,14 @@ \o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)} \row \o Embedded Linux X11 (ARM) \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)} + \row \o Windows CE 5.0 (ARMv4i, x86, MIPS) + \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii) \row \o Windows CE 6.0 (ARMv4i, x86, MIPS) \o MSVC 2008 WinCE 6.0 Professional + \row \o Maemo 5(Linux, ARM, X11) + \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)} + \row \o Symbian (Symbian/S60 3.1, 3.2) + \o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications) \endtable \section1 Tier 3 Platforms (Not supported by Nokia) @@ -142,20 +148,12 @@ implied warranties of merchantability, fitness for a particular purpose, title and non-infringement with regard to the Licensed Software. - \section1 Planned Changes for Qt 4.7 + \section1 Planned Changes for Qt 4.8 The following changes to the list of supported platforms are at time of publishing - planned for Qt 4.7: + planned for Qt 4.8: \list - \o Upgrade Windows 7 to Tier 1 - \o Upgrade Mac OS X 10.6 to Tier 1 - \o Add support for Visual Studio 2010 (Tier 2) - \o Move support for Carbon implementation of Qt on Mac OS X from Tier 1 to Tier 2 - \o Drop support for MinGW 3.4 - \o Drop support for Visual Studio 2003 - \o Drop support for HP-UX on PA-RISC - \o Drop support for Windows Mobile 5 - \o Drop support for OpenGL ES Common Lite 1.0 + \o Plans not yet released \endlist */ -- cgit v0.12 From 03b7a3cffba609df56b4ccadacae6b6f985e96e9 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 2 Sep 2010 14:33:26 +0200 Subject: Reduce memory consumption of QtScript/JSC on Symbian Backport of Jay's patch from https://bugs.webkit.org/show_bug.cgi?id=34349 with minor modifications. Even though the original patch was rejected upstream and has been superseded by the patches for https://bugs.webkit.org/show_bug.cgi?id=43185, those patches are more involved (affecting all platforms), hence difficult/risky to backport. Task-number: QTBUG-13361 Reviewed-by: Simon Hausmann --- .../javascriptcore/JavaScriptCore/ChangeLog | 36 +++++++ .../JavaScriptCore/JavaScriptCore.pri | 1 + .../JavaScriptCore/interpreter/RegisterFile.cpp | 2 + .../JavaScriptCore/interpreter/RegisterFile.h | 33 +++++- .../wtf/symbian/RegisterFileAllocatorSymbian.cpp | 111 +++++++++++++++++++++ .../wtf/symbian/RegisterFileAllocatorSymbian.h | 69 +++++++++++++ .../JavaScriptCore/wtf/symbian/SymbianDefines.h | 42 ++++++++ src/script/script.pro | 5 +- 8 files changed, 295 insertions(+), 4 deletions(-) create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog index 93431df..fbaf5d2 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog @@ -1,3 +1,39 @@ +2010-06-18 Tucker Jay + + Reviewed by NOBODY (OOPS!). + + [Symbian] Lazy commit of memory required in JSC register file + https://bugs.webkit.org/show_bug.cgi?id=34349 + + * JavaScriptCore.pro: Added 1 new Symbian source file + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::): + (JSC::RegisterFile::start): + (JSC::RegisterFile::end): + (JSC::RegisterFile::size): + (JSC::RegisterFile::setNumGlobals): + (JSC::RegisterFile::numGlobals): + (JSC::RegisterFile::maxGlobals): + (JSC::RegisterFile::lastGlobal): + (JSC::RegisterFile::markGlobals): + (JSC::RegisterFile::markCallFrames): + (JSC::isPageAligned): + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::shrink): + (JSC::RegisterFile::grow): + * wtf/symbian/RegisterFileAllocatorSymbian.cpp: Added. + (WTF::RegisterFileAllocator::RegisterFileAllocator): + Helper class to allocate memory required by RegisterFile + more efficiently. + (WTF::RegisterFileAllocator::~RegisterFileAllocator): + (WTF::RegisterFileAllocator::buffer): + (WTF::RegisterFileAllocator::grow): + (WTF::RegisterFileAllocator::shrink): + * wtf/symbian/RegisterFileAllocatorSymbian.h: Added. + * wtf/symbian/SymbianDefines.h: Added. + 2010-06-19 Thiago Macieira Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri index 75737ae..d75bd31 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri @@ -211,6 +211,7 @@ SOURCES += \ wtf/qt/ThreadingQt.cpp \ wtf/RandomNumber.cpp \ wtf/RefCountedLeakCounter.cpp \ + wtf/symbian/RegisterFileAllocatorSymbian.cpp \ wtf/ThreadingNone.cpp \ wtf/Threading.cpp \ wtf/TypeTraits.cpp \ diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp index 939573b..293fc38 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp @@ -40,6 +40,8 @@ RegisterFile::~RegisterFile() VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT); #endif VirtualFree(m_buffer, 0, MEM_RELEASE); +#elif OS(SYMBIAN) + delete m_registerFileAllocator; #else fastFree(m_buffer); #endif diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h index 34e2504..49304d9 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h @@ -41,6 +41,10 @@ #include #endif +#if OS(SYMBIAN) +#include +#endif + namespace JSC { /* @@ -152,12 +156,21 @@ namespace JSC { #if HAVE(VIRTUALALLOC) Register* m_commitEnd; #endif +#if OS(SYMBIAN) + // Commits and frees a continguous chunk of memory as required + WTF::RegisterFileAllocator* m_registerFileAllocator; +#endif JSGlobalObject* m_globalObject; // The global object whose vars are currently stored in the register file. }; // FIXME: Add a generic getpagesize() to WTF, then move this function to WTF as well. - inline bool isPageAligned(size_t size) { return size != 0 && size % (8 * 1024) == 0; } + // This is still a hack that should be fixed later. We know that a Symbian page size is 4K. + #if OS(SYMBIAN) + inline bool isPageAligned(size_t size) { return size && !(size % (4 * 1024)); } + #else + inline bool isPageAligned(size_t size) { return size && !(size % (8 * 1024)); } + #endif inline RegisterFile::RegisterFile(size_t capacity, size_t maxGlobals) : m_numGlobals(0) @@ -204,7 +217,13 @@ namespace JSC { CRASH(); } m_commitEnd = reinterpret_cast(reinterpret_cast(m_buffer) + committedSize); - #else + #elif OS(SYMBIAN) + m_registerFileAllocator = new WTF::RegisterFileAllocator(bufferLength); + m_buffer = (Register*)(m_registerFileAllocator->buffer()); + // start by committing enough space to hold maxGlobals + void* newEnd = (void*)((int)m_buffer + (maxGlobals * sizeof(Register))); + m_registerFileAllocator->grow(newEnd); + #else /* * If neither MMAP nor VIRTUALALLOC are available - use fastMalloc instead. * @@ -226,8 +245,13 @@ namespace JSC { if (newEnd >= m_end) return; m_end = newEnd; - if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) + if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) { +#if OS(SYMBIAN) + m_registerFileAllocator->shrink(newEnd); +#endif + releaseExcessCapacity(); + } } inline bool RegisterFile::grow(Register* newEnd) @@ -252,6 +276,9 @@ namespace JSC { m_commitEnd = reinterpret_cast(reinterpret_cast(m_commitEnd) + size); } #endif +#if OS(SYMBIAN) + m_registerFileAllocator->grow((void*)newEnd); +#endif if (newEnd > m_maxUsed) m_maxUsed = newEnd; diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp new file mode 100644 index 0000000..baa7841 --- /dev/null +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if OS(SYMBIAN) + +#include "RegisterFileAllocatorSymbian.h" + +namespace WTF { + +/** Efficiently allocates memory pools of size poolSize. + * Primarily designed for JSC RegisterFile's needs. + * Not thread-safe. + */ +RegisterFileAllocator::RegisterFileAllocator(TUint32 reservationSize, TUint32 poolSize) : + m_reserved(reservationSize), m_poolSize(poolSize) +{ + // Get system's page size value. + SYMBIAN_PAGESIZE(m_pageSize); + + // We only accept multiples of system page size for both initial reservation + // and the alignment/pool size + m_reserved = SYMBIAN_ROUNDUPTOMULTIPLE(m_reserved, m_pageSize); + __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_poolSize, m_pageSize), + User::Panic(_L("RegisterFileAllocator1"), KErrArgument)); + + // Open a Symbian RChunk, and reserve requested virtual address range + // Any thread in this process can operate this RChunk due to EOwnerProcess access rights. + TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reserved , EOwnerProcess); + if (ret != KErrNone) + User::Panic(_L("RegisterFileAllocator2"), ret); + + m_buffer = (void*)m_chunk.Base(); + m_resEnd = (void*)(m_chunk.Base() + m_chunk.MaxSize()); + m_comEnd = m_buffer; +} + +RegisterFileAllocator::~RegisterFileAllocator() +{ + // release everything! + m_chunk.Decommit(0, m_chunk.MaxSize()); + m_chunk.Close(); +} + +void* RegisterFileAllocator::buffer() const +{ + return m_buffer; +} + +void RegisterFileAllocator::grow(void* newEnd) +{ + // trying to commit more memory than reserved! + if (newEnd > m_resEnd) + return; + + if (newEnd > m_comEnd) { + TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd); + nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize); + TInt offset = (TInt)m_comEnd - (TInt)m_buffer; + + TInt ret = m_chunk.Commit(offset, nBytes); + if (ret == KErrNone) + m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size()); + } +} + +void RegisterFileAllocator::shrink(void* newEnd) +{ + if (newEnd < m_comEnd) { + TInt nBytes = (TInt)newEnd - (TInt)m_comEnd; + if (nBytes >= m_poolSize) { + TInt offset = SYMBIAN_ROUNDUPTOMULTIPLE((TUint)newEnd, m_poolSize) - (TInt)m_buffer; + nBytes = (TInt)m_comEnd - offset - (TInt)m_buffer; + if (nBytes > 0) { + TInt ret = m_chunk.Decommit(offset, nBytes); + if (ret == KErrNone) + m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size()); + } + } + } +} + +} // end of namespace + +#endif // SYMBIAN diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h new file mode 100644 index 0000000..4cfc8c5 --- /dev/null +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef RegisterFileAllocatorSymbian_h +#define RegisterFileAllocatorSymbian_h + +#include "SymbianDefines.h" + +namespace WTF { + +/** + * Allocates contiguous regions of size poolSize. + * poolSize must be a multiple of system page size (typically 4K on Symbian/ARM) + * + * @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes). + * @param poolSize Size of a single allocation. + */ +class RegisterFileAllocator { + +public: + RegisterFileAllocator( + TUint32 reservationSize, TUint32 poolSize = SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE); + ~RegisterFileAllocator(); + void* buffer() const; + void grow(void* newEnd); + void shrink(void* newEnd); + +private: + RChunk m_chunk; // Symbian chunk that lets us reserve/commit/decommit + + // all following values are in numbers of bytes + TInt m_pageSize; // cached value of system page size, typically 4K on Symbian + TUint32 m_reserved; // total number of reserved bytes in virtual memory + TUint32 m_poolSize; // size of one memory pool, set by default to 64K in wtf/symbian/SymbianDefines.h + + void* m_buffer; // pointer to base of the chunk + void* m_comEnd; // pointer to end of currently committed memory + void* m_resEnd; // pointer to end of reserved memory + +}; + +} // end of namespace + +#endif // RegisterFileAllocatorSymbian_h diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h new file mode 100644 index 0000000..43e22b3 --- /dev/null +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SymbianDefines_h +#define SymbianDefines_h + +#include +#include +#include + +#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x)); +#define SYMBIAN_FREERAM(x) (HAL::Get(HALData::EMemoryRAMFree, x)); +#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof) ( (x + multipleof - 1) & ~(multipleof - 1) ) + +#define SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE 65536 // 64K + +#endif // SymbianDefines_h diff --git a/src/script/script.pro b/src/script/script.pro index 55217e0..4ee86d7 100644 --- a/src/script/script.pro +++ b/src/script/script.pro @@ -79,7 +79,10 @@ INCLUDEPATH += $$PWD include(script.pri) -symbian:TARGET.UID3=0x2001B2E1 +symbian { + TARGET.UID3=0x2001B2E1 + LIBS += -lhal +} # WebKit doesn't compile in C++0x mode *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x -- cgit v0.12 From 0d54ade501443d8a3b0e756520f6c43e602f1283 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 2 Sep 2010 15:41:38 +0200 Subject: Doc: Changed the default URL to avoid a Flash plugin crash on x86-64. Reviewed-by: Kevin Wright --- demos/browser/settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/browser/settings.cpp b/demos/browser/settings.cpp index 5ceca67..fba781b 100644 --- a/demos/browser/settings.cpp +++ b/demos/browser/settings.cpp @@ -89,7 +89,7 @@ void SettingsDialog::loadFromSettings() { QSettings settings; settings.beginGroup(QLatin1String("MainWindow")); - QString defaultHome = QLatin1String("http://qt.nokia.com"); + QString defaultHome = QLatin1String("http://doc.qt.nokia.com"); homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString()); settings.endGroup(); -- cgit v0.12 From fcf01687c7209f2b4222bd12d8fe4a871380e65b Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 2 Sep 2010 16:03:22 +0200 Subject: Doc: Updating the 3rd party lib used in Qt - including JQuery --- doc/src/legal/3rdparty.qdoc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index e7133e3..db6ff7c 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -683,4 +683,36 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + \hr + + jquery 1.4.2.js Copyright 2010 John Resig + This software is dual licensed under the MIT or GPL version 2 licenses. + Nokia has used the software herein under the MIT license. + + jquery includes Sizzle.js Copyright 2010 The Dojo Foundaton and is + licensed under the MIT, BSD and GPL licenses. Nokia has used this + software herein under the MIT license. + + The MIT License + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + */ -- cgit v0.12 From 71a3b1a0d3ee6429832bdbf0da026cdc3f74080f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 2 Sep 2010 15:18:31 +0200 Subject: Ensure that OpenGL contexts are attached to an NSView before first paint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attaching an OpenGL context to an NSView too soon will result in an error "invalid drawable" printed on the console. We used to guard against this by checking the visible property of the NSWindow, but this turned out to be too late, as we had already recived an initial paint event by then as part of showing the window. The visual result was a single frame of gray painted before the user's paint event code took effect. We solve this by hooking into setInitialFirstResponder on the NSWindow, which is called as part of making the window visible for the first time. At this point it's safe to attach the GL context to the NSView, so we iterate all the GLWidget children of the top level window and make sure the context is attached by sending a MacGLWindowChange event. The check in qt_mac_update_child_gl_widgets() for a top level window had to be removed for this approach to work, but should be okey as we're only iterating the children. Reviewed-by: Richard Moe Gustavsen Reviewed-by: Trond Kjernåsen --- src/gui/kernel/qapplication_mac.mm | 3 --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 13 +++++++++++++ src/opengl/qgl_mac.mm | 14 +++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 321492d..dd819e5 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -737,9 +737,6 @@ static void qt_post_window_change_event(QWidget *widget) */ static void qt_mac_update_child_gl_widgets(QWidget *widget) { - if (widget->isWindow()) - return; - // Update all OpenGL child widgets for the given widget. QList &glWidgets = qt_widget_private(widget)->glWidgets; QList::iterator end = glWidgets.end(); diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 6795149..16f5bd6 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QPointer qt_button_down; //qapplication_mac.cpp extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp +extern void qt_event_request_window_change(QWidget *); // qapplication_mac.mm +extern void qt_mac_send_posted_gl_updates(QWidget *widget); // qapplication_mac.mm Q_GLOBAL_STATIC(QPointer, currentDragTarget); @@ -227,6 +229,17 @@ QT_END_NAMESPACE [self release]; } +- (void)setInitialFirstResponder:(NSView *)view +{ + // This method is called the first time the window is placed on screen and + // is the earliest point in time we can connect OpenGL contexts to NSViews. + QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + qt_event_request_window_change(qwidget); + qt_mac_send_posted_gl_updates(qwidget); + + [super setInitialFirstResponder:view]; +} + - (BOOL)makeFirstResponder:(NSResponder *)responder { // For some reason Cocoa wants to flip the first responder diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm index 66fe7d3..f023a97 100644 --- a/src/opengl/qgl_mac.mm +++ b/src/opengl/qgl_mac.mm @@ -697,9 +697,17 @@ void QGLContext::updatePaintDevice() QWidget *w = (QWidget *)d->paintDevice; NSView *view = qt_mac_nativeview_for(w); - // ideally we would use QWidget::isVisible(), but we get "invalid drawable" errors - if (![(NSWindow *)qt_mac_window_for(w) isVisible]) - return; + // Trying to attach the GL context to the NSView will fail with + // "invalid drawable" if done too soon, but we have to make sure + // the connection is made before the first paint event. Using + // the NSView do to this check fails as the NSView is visible + // before it's safe to connect, and using the NSWindow fails as + // the NSWindow will become visible after the first paint event. + // This leaves us with the QWidget, who's visible state seems + // to match the point in time when it's safe to connect. + if (!w || !w->isVisible()) + return; // Not safe to attach GL context to view yet + if ([static_cast(d->cx) view] != view && ![view isHidden]) [static_cast(d->cx) setView:view]; } else if (d->paintDevice->devType() == QInternal::Pixmap) { -- cgit v0.12 From 4b7346a4bd30705ab5910d448ec56daa6568aa90 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 2 Sep 2010 17:09:13 +0200 Subject: Fix remote crash in delivering D-Bus calls with too few arguments Patch by Christoph Feck. Task-number: QTBUG-13348 Reviewed by me --- src/dbus/qdbusintegrator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 7951177..3833874 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -714,6 +714,9 @@ QDBusCallDeliveryEvent* QDBusConnectionPrivate::prepareReply(QDBusConnectionPriv if (metaTypes[n] == QDBusMetaTypeId::message) --n; + if (msg.arguments().count() < n) + return 0; // too few arguments + // check that types match for (int i = 0; i < n; ++i) if (metaTypes.at(i + 1) != msg.arguments().at(i).userType() && -- cgit v0.12 From b600ce8b388ad20b64c44198b582e000b4289c00 Mon Sep 17 00:00:00 2001 From: Victor Ostashevsky Date: Thu, 2 Sep 2010 18:46:21 +0200 Subject: Ukrainian translation updated New strings which appeared after MR783 and MR2456 are translated. Also some stylistic fixes applied. xmlpatterns translation started. Merge-request: 801 Reviewed-by: Oswald Buddenhagen --- translations/assistant_uk.ts | 461 +++------ translations/designer_uk.ts | 131 ++- translations/linguist_uk.ts | 2355 ++++++++++++++++++++++++++---------------- translations/qt_help_uk.ts | 4 +- translations/qt_uk.ts | 124 ++- translations/qvfb_uk.ts | 145 ++- 6 files changed, 1893 insertions(+), 1327 deletions(-) diff --git a/translations/assistant_uk.ts b/translations/assistant_uk.ts index c7aad83..d08003e 100644 --- a/translations/assistant_uk.ts +++ b/translations/assistant_uk.ts @@ -41,7 +41,7 @@ Reason: %2 - Не можу зареєструвати файл документації + Не вдалось зареєструвати файл документації %1 Причина: @@ -57,7 +57,7 @@ Reason: Reason: %2 - Не можу скасувати реєстрацію файлу документації + Не вдалось скасувати реєстрацію файлу документації %1 Причина: @@ -77,7 +77,7 @@ Reason: Cannot load sqlite database driver! - Не можу завантажити драйвер бази даних SQLite! + Неможливо завантажити драйвер бази даних SQLite! @@ -108,6 +108,17 @@ Reason: + BookmarkItem + + New Folder + Нова тека + + + Untitled + Без назви + + + BookmarkManager Untitled @@ -313,6 +324,60 @@ Reason: CmdLineParser + Usage: assistant [Options] + +-collectionFile file Uses the specified collection + file instead of the default one +-showUrl url Shows the document with the + url. +-enableRemoteControl Enables Assistant to be + remotely controlled. +-show widget Shows the specified dockwidget + which can be "contents", "index", + "bookmarks" or "search". +-activate widget Activates the specified dockwidget + which can be "contents", "index", + "bookmarks" or "search". +-hide widget Hides the specified dockwidget + which can be "contents", "index" + "bookmarks" or "search". +-register helpFile Registers the specified help file + (.qch) in the given collection + file. +-unregister helpFile Unregisters the specified help file + (.qch) from the give collection + file. +-setCurrentFilter filter Set the filter as the active filter. +-remove-search-index Removes the full text search index. +-rebuild-search-index Re-builds the full text search index (potentially slow). +-quiet Does not display any error or + status message. +-help Displays this help. + + Використання: assistant [Опції] + +-collectionFile файл Використати вказаний файл колекції + замість типового +-showUrl URL Показати документ з URL. +-enableRemoteControl Увімкнути віддалене керування Assistant. +-show віджет Показати вказаний віджет (може бути: + "contents", "index", "bookmarks" чи "search"). +-activate віджет Активувати вказаний віджет (може бути: + "contents", "index", "bookmarks" чи "search"). +-hide віджет Сховати вказаний віджет (може бути: + "contents", "index", "bookmarks" чи "search"). +-register файлДовідки Зареєструвати вказаний файл довідки + (.qch) в даному файлі колекції. +-unregister файлДовідки Скасувати реєстрацію вказаного файлу довідки + (.qch) в даному файлі колекції. +-setCurrentFilter фільтр Встановити фільтр в якості активного. +-remove-search-index Видалити повнотекстовий пошуковий індекс. +-rebuild-search-index Перебудувати повнотекстовий пошуковий індекс (можливо довго). +-quiet Не показувати жодних помилок чи статусних повідомлень. +-help Показати цю довідку. + + + Unknown option: %1 Невідома опція: %1 @@ -487,6 +552,11 @@ Reason: The attributes for custom filter '%1' are defined multiple times. Атрибути для користувацького фільтра '%1' визначено декілька раз. + + unfiltered + list of available documentation + без фільтра + FindWidget @@ -513,6 +583,10 @@ Reason: Converting File Конвертування файлу + + Creating the new Qt help files from the old ADP file. + Створення нових файлів довідки Qt зі старого файлу ADP. + FontPanel @@ -577,6 +651,13 @@ Reason: + HelpGenerator + + Warning: %1 + Попередження: %1 + + + HelpViewer <title>about:blank</title> @@ -584,7 +665,7 @@ Reason: <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div> - <title>Помилка 404...</title><div align="center"><br><br><h1>Неможливо знайти сторінку</h1><br><h3>'%1'</h3></div> + <title>Помилка 404...</title><div align="center"><br><br><h1>Не вдалось знайти сторінку</h1><br><h3>'%1'</h3></div> Copy &Link Location @@ -600,6 +681,13 @@ Reason: + HelpWindow + + <center><b>Wizard Assistant</b></center> + <center><b>Майстер Assistant</b></center> + + + IdentifierPage Form @@ -736,7 +824,7 @@ Reason: Unable to save the file %1: %2. - Не можу зберегти файл %1: %2. + Неможливо зберегти файл %1: %2. Downloading %1... @@ -988,6 +1076,10 @@ Reason: Не вдалось знайти елемент, пов'язаний зі змістом. + <center><h3>%1</h3><p>Version %2</p></center><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p> + <center><h3>%1</h3><p>Версія %2</p></center><p>Copyright (C) 2010 Корпорація Nokia та/або її дочірні компанії.</p> + + About %1 Про %1 @@ -997,7 +1089,7 @@ Reason: Could not register file '%1': %2 - Не можу зареєструвати файл '%1': %2 + Не вдалось зареєструвати файл '%1': %2 @@ -1221,45 +1313,20 @@ Do you want to remove it? - QCLuceneResultWidget - - Search Results - Результати пошуку - - - Note: - Примітка: - - - The search results may not be complete since the documentation is still being indexed! - Результати пошуку можуть бути не повні, оскільки документація досі індексується! - - - Your search did not match any documents. - Ваш пошук не повернув результатів. - - - (The reason for this might be that the documentation is still being indexed.) - (Причиною цього може бути те, що документація досі індексується.) - - - QCollectionGenerator Unknown token at line %1. Невідомий токен в рядку %1. - Unknown token at line %1. Expected "QtHelpCollectionProject"! - Невідомий токен в рядку %1. Очікувався "QtHelpCollectionProject"! + Missing end tags. + Відсутні кінцеві теги. - Missing output file name! - Відсутнє ім'я вихідного файлу! - - - Missing collection config file! - Відсутній файл налаштувань колекції! + Qt Collection Generator version 1.0 (Qt %1) + + Qt Collection Generator версії 1.0 (Qt %1) + @@ -1288,209 +1355,92 @@ qcollectiongenerator <файл-налаштувань-колекції> [ - - - QHelp - Untitled - Без назви - - - - QHelpCollectionHandler - - The collection file '%1' is not set up yet! - Файл колекції '%1' ще не встановлено! - - - Cannot load sqlite database driver! - Не можу завантажити драйвер бази даних SQLite! - - - Cannot open collection file: %1 - Неможливо відкрити файл колекції: %1 - - - Cannot create tables in file %1! - Неможливо створити таблиці в файлі %1! - - - The collection file '%1' already exists! - Файл колекції '%1' вже існує! - - - Cannot create directory: %1 - Неможливо створити теку: %1 - - - Cannot copy collection file: %1 - Неможливо скопіювати файл колекції: %1 + Unknown token at line %1. Expected "QtHelpCollectionProject". + Невідомий токен в рядку %1. Очікувався "QtHelpCollectionProject". - Unknown filter '%1'! - Невідомий фільтр '%1'! + Missing input or output file for help file generation. + Відсутній вхідний чи вихідний файл для генерації файлу довідки. - Cannot register filter %1! - Неможливо зареєструвати фільтр %1! + Missing output file name. + Відсутнє ім'я вихідного файлу. - Cannot open documentation file %1! - Неможливо відкрити файл документації %1! + Missing collection config file. + Відсутній файл налаштувань колекції. - Invalid documentation file '%1'! - Неправильний файл документації '%1'! + Could not open %1. + + Не вдалось відкрити %1. + - The namespace %1 was not registered! - Простір імен %1 не зареєстровано! + Reading collection config file... + + Читання файлу налаштувань колекції... + - Namespace %1 already exists! - Простір імен %1 вже існує! + Collection config file error: %1 + + Помилка файлу налаштувань колекції: %1 + - Cannot register namespace '%1'! - Неможливо зареєструвати простір імен '%1'! + Generating help for %1... + + Генерування довідки для %1... + - Cannot open database '%1' to optimize! - Неможливо відкрити базу даних '%1' для оптимізації! + Creating collection file... + + Створення файлу колекції... + - - - QHelpDBReader - Cannot open database '%1' '%2': %3 - The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string - Неможливо відкрити базу даних: '%1' '%2': %3 + The file %1 cannot be overwritten. + + Неможливо перезаписати файл %1. + - - - QHelpEngineCore - Cannot open documentation file %1: %2! - Неможливо файл документації %1: %2! + Cannot open %1. + + Неможливо відкрити %1. + - The specified namespace does not exist! - Вказаний простір імен не існує! + Cannot open referenced image file %1. + + Неможливо відкрити файл зображення %1, на який є посилання. + QHelpGenerator - Invalid help data! - Неправильні дані довідки! - - - No output file name specified! - Не вказане ім'я вихідного файлу! - - - The file %1 cannot be overwritten! - Неможливо перезаписати файл %1! - - - Building up file structure... - Побудова структури файлу.... - - - Cannot open data base file %1! - Неможливо відкрити файл бази даних %1! + Missing output file name. + Відсутнє ім'я вихідного файлу. - Cannot register namespace %1! - Неможливо зареєструвати простір імен %1! - - - Insert custom filters... - Вставка фільтрів користувача... - - - Insert help data for filter section (%1 of %2)... - Вставка даних довідки для розділу фільтра (%1 з %2)... - - - Documentation successfully generated. - Документацію успішно згенеровано. - - - Some tables already exist! - Деякі таблиці вже існують! - - - Cannot create tables! - Неможливо створити таблиці! - - - Cannot register virtual folder! - Неможливо зареєструвати віртуальну теку! - - - Insert files... - Вставка файлів... - - - The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it. - Файл %1 має бути всередині підтеки (%2). Пропускаємо його. - - - The file %1 does not exist! Skipping it. - Файл %1 не існує! Пропускаємо його. - - - Cannot open file %1! Skipping it. - Неможливо відкрити файл %1! Пропускаємо його. - - - The filter %1 is already registered! - Фільтр %1 вже зареєстровано! - - - Cannot register filter %1! - Неможливо зареєструвати фільтр %1! - - - Insert indices... - Вставка індексів... - - - Insert contents... - Вставка змісту... - - - Cannot insert contents! - Неможливо вставити зміст! - - - Cannot register contents! - Неможливо зареєструвати зміст! - - - File '%1' does not exist. - Файл '%1' не існує. - - - File '%1' cannot be opened. - Неможливо відкрити файл '%1'. - - - File '%1' contains an invalid link to file '%2' - Файл '%1' містить неправильне посилання до файлу '%2' - - - Invalid links in HTML files. - Неправильні посилання в файлах HTML. + Qt Help Generator version 1.0 (Qt %1) + + Qt Help Generator версії 1.0 (Qt %1) + - Missing output file name! - Відсутнє ім'я вихідного файлу! + Missing Qt help project file. + Відсутній файл проекту колекції довідки Qt. - Missing Qt help project file! - Відсутній файл проекту колекції довідки Qt! + Could not open %1. + + Не вдалось відкрити %1. + @@ -1524,102 +1474,11 @@ qhelpgenerator <файл-проекту-довідки> [опції] - - - QHelpProject - - Unknown token. - Невідомий токен. - - - Unknown token. Expected "QtHelpProject"! - Невідомий токен. Очікувався "QtHelpProject"! - - - Error in line %1: %2 - Помилка в рядку %1: %2 - - - Virtual folder has invalid syntax. - Віртуальна тека має неправильний синтаксис. - - - Namespace has invalid syntax. - Простір імен має неправильний синтаксис. - - - Missing namespace in QtHelpProject. - Відсутній простір імен в QtHelpProject. - - - Missing virtual folder in QtHelpProject - Відсутня віртуальна тека в QtHelpProject - - - Missing attribute in keyword at line %1. - Відсутній атрибут в ключовому слові на рядку %1. - - - The input file %1 could not be opened! - Неможливо відкрити вхідний файл %1! - - - - QHelpSearchQueryWidget - - Search for: - Шукати: - - Previous search - Попередній пошук - - - Next search - Наступний пошук - - - Search - Пошук - - - Advanced search - Розширений пошук - - - words <B>similar</B> to: - слова <B>схожі</B> на: - - - <B>without</B> the words: - <B>без</B> слів: - - - with <B>exact phrase</B>: - з <B>точною фразою</B>: - - - with <B>all</B> of the words: - з <B>усіма</B> словами: - - - with <B>at least one</B> of the words: - з <B>щонайменше одним</B> зі слів: - - - - QHelpSearchResultWidget - - %1 - %2 of %n Hits - - %1 - %2 з %n збігу - %1 - %2 з %n збігів - %1 - %2 з %n збігів - - - - 0 - 0 of 0 Hits - 0 - 0 of 0 збігів + Could not create output directory: %1 + + Не вдалось створити вихідну теку: %1 + diff --git a/translations/designer_uk.ts b/translations/designer_uk.ts index ae27e67..12e60e6 100644 --- a/translations/designer_uk.ts +++ b/translations/designer_uk.ts @@ -25,6 +25,49 @@ + AbstractItemEditor + + Selectable + Можна вибирати + + + Editable + Можна редагувати + + + DragEnabled + Можна тягти + + + DropEnabled + Можна кидати + + + UserCheckable + Користувач може позначати + + + Enabled + Увімкнено + + + Tristate + Три стани + + + Unchecked + Не позначено + + + PartiallyChecked + Частково позначено + + + Checked + Позначено + + + AddLinkDialog Insert Link @@ -62,7 +105,7 @@ The font file '%1' could not be loaded. - Неможливо завантажити файл шрифт '%1'. + Не вдалось завантажити файл шрифт '%1'. '%1' is not a valid font id. @@ -74,7 +117,7 @@ The font '%1' (%2) could not be unloaded. - Неможливо вивантажити шрифт '%1' (%2). + Не вдалось вивантажити шрифт '%1' (%2). @@ -639,7 +682,7 @@ The converted file could not be read. - Неможливо прочитати конвертований файл. + Не вдалось прочитати конвертований файл. This file was created using Designer from Qt-%1 and will be converted to a new form by Qt Designer. @@ -652,7 +695,7 @@ This file was created using Designer from Qt-%1 and could not be read: %2 - Неможливо прочитати файл, бо його було створено з використанням Designer з Qt-%1: + Не вдалось прочитати файл, бо його було створено з використанням Designer з Qt-%1: %2 @@ -672,14 +715,14 @@ '%1' could not be converted to an enumeration value of type '%2'. - Неможливо сконвертувати '%1'до типу значень переліку '%2'. + Не вдалось сконвертувати '%1'до типу значень переліку '%2'. DesignerMetaFlags '%1' could not be converted to a flag value of type '%2'. - '%1' не можу бути сконвертовано до прапорця типу '%2'. + Не вдалось перетворити '%1' прапорця типу '%2'. @@ -721,7 +764,7 @@ DeviceSkin The image file '%1' could not be loaded. - Неможливо завантажити файл зображення '%1'. + Не вдалось завантажити файл зображення '%1'. The skin directory '%1' does not contain a configuration file. @@ -729,11 +772,11 @@ The skin configuration file '%1' could not be opened. - Неможливо відкрити файл налаштувань '%1'. + Не вдалось відкрити файл налаштувань '%1'. The skin configuration file '%1' could not be read: %2 - Неможливо прочитати файл налаштувань '%1': %2 + Не вдалось прочитати файл налаштувань '%1': %2 Syntax error: %1 @@ -1044,11 +1087,11 @@ Parsing grid layout minimum size values A temporary form file could not be created in %1. - Неможливо створити тимчасовий файл форми в %1. + Не вдалось створити тимчасовий файл форми в %1. The temporary form file %1 could not be written. - Неможливо записати тимчасовий файл форми %1. + Не вдалось записати тимчасовий файл форми %1. @@ -1179,7 +1222,7 @@ This indicates an inconsistency in the ui-file. While applying tab stops: The widget '%1' could not be found. - Під час застосування позицій табуляції: Неможливо знайти віджет '%1'. + Під час застосування позицій табуляції: Не вдалось знайти віджет '%1'. Invalid QButtonGroup reference '%1' referenced by '%2'. @@ -1464,13 +1507,13 @@ Do you want to update the file location or generate a new form? Could not open file - Неможливо відкрити файл + Не вдалось відкрити файл The file %1 could not be opened. Reason: %2 Would you like to retry or select a different file? - Неможливо відкрити файл %1. + Не вдалось відкрити файл %1. Причина: %2 Чи не хотіли б ви спробувати ще раз чи вибрати інший файл? @@ -1480,7 +1523,7 @@ Would you like to retry or select a different file? Could not write file - Неможливо записати файл + Не вдалось записати файл It was not possible to write the entire file %1 to disk. @@ -1500,15 +1543,15 @@ Would you like to retry? The backup file %1 could not be written. - Неможливо записати файл резервної копії %1. + Не вдалось записати файл резервної копії %1. The backup directory %1 could not be created. - Неможливо створити теку резервних копій %1. + Не вдалось створити теку резервних копій %1. The temporary backup directory %1 could not be created. - Неможливо створити тимчасову теку резервних копій %1. + Не вдалось створити тимчасову теку резервних копій %1. Preview failed @@ -1528,7 +1571,7 @@ Would you like to retry? The file %1 could not be written. - Неможливо записати файл %1. + Не вдалось записати файл %1. Please close all forms to enable the loading of additional fonts. @@ -1735,7 +1778,7 @@ Container pages should only be added by specifying them in XML returned by the d QDesignerSharedSettings The template path %1 could not be created. - Неможливо створити шлях до шаблону %1. + Не вдалось створити шлях до шаблону %1. An error has been encountered while parsing device profile XML: %1 @@ -1845,7 +1888,7 @@ Container pages should only be added by specifying them in XML returned by the d The file <b>%1</b> could not be opened. - Неможливо відкрити файл <b>%1</b>. + Не вдалось відкрити файл <b>%1</b>. The file <b>%1</b> is not a valid Designer UI file. @@ -1877,11 +1920,11 @@ Empty class name passed to widget factory method The set-type property %1 could not be read. - Неможливо прочитати властивість %1 типу "множина". + Не вдалось прочитати властивість %1 типу "множина". The enumeration-type property %1 could not be read. - Неможливо прочитати властивість %1 типу "перелік". + Не вдалось прочитати властивість %1 типу "перелік". Reading properties of the type %1 is not supported yet. @@ -1889,7 +1932,7 @@ Empty class name passed to widget factory method The property %1 could not be written. The type %2 is not supported yet. - Неможливо записати властивість %1. Тип %2 ще не підтримується. + Не вдалось записати властивість %1. Тип %2 ще не підтримується. The enumeration-value '%1' is invalid. The default value '%2' will be used instead. @@ -2513,6 +2556,10 @@ Empty class name passed to widget factory method QtLocalePropertyManager + <Invalid> + <Неправильний> + + %1, %2 %1, %2 @@ -2740,14 +2787,14 @@ This could for example be a language extension like "_de". Could not overwrite %1. - Неможливо перезаписати %1. + Не вдалось перезаписати %1. Could not copy %1 to %2 - Неможливо копіювати + Не вдалось скопіювати %1 до %2 @@ -2764,7 +2811,7 @@ to Could not write %1: %2 - Неможливо записати %1: %2 + Не вдалось записати %1: %2 Edit Resources @@ -3480,11 +3527,11 @@ Do you want overwrite the template? A temporary form file could not be created in %1. - Неможливо створити тимчасовий файл форми в %1. + Не вдалось створити тимчасовий файл форми в %1. The temporary form file %1 could not be written. - Неможливо записати тимчасовий файл форми %1. + Не вдалось записати тимчасовий файл форми %1. %1 - [Code] @@ -3500,11 +3547,11 @@ Do you want overwrite the template? The file %1 could not be opened: %2 - Неможливо відкрити файл %1: %2 + Не вдалось відкрити файл %1: %2 The file %1 could not be written: %2 - Неможливо записати файл %1: %2 + Не вдалось записати файл %1: %2 %1 - Error @@ -3951,7 +3998,7 @@ Do you want overwrite the template? Cannot paste widgets. Designer could not find a container without a layout to paste into. - Неможливо вставити віджети. Qt Designer не зміг знайти контейнер без розташування для вставки. + Неможливо вставити віджети. Qt Designer'у не вдалось знайти контейнер без розташування для вставки. Break the layout of the container you want to paste into, select this container and then paste again. @@ -4150,7 +4197,7 @@ Do you want overwrite the template? Could not create form preview Title of warning message box - Неможливо створити попередній перегляд форми + Не вдалось створити попередній перегляд форми Form Settings - %1 @@ -4225,7 +4272,7 @@ Do you want overwrite the template? The file '%1' could not be read: %2 - Неможливо прочитати файл '%1': %2 + Не вдалось прочитати файл '%1': %2 Choose a Pixmap @@ -4740,8 +4787,16 @@ Please select another name. Шукати нові встановлені додатки користувацьких віджетів. + Loaded Plugins + Завантажені додатки + + + Failed Plugins + Проблемні додатки + + Qt Designer couldn't find any plugins - Qt Designer не зміг знайти жодного додатку + Qt Designer'у не вдалось знайти жодного додатку Qt Designer found the following plugins @@ -5014,7 +5069,7 @@ Class: %2 The specified qrc file <p><b>%1</b></p><p>could not be found. Do you want to update the file location?</p> - Неможливо знайти вказаний файл qrc <p><b>%1</b></p><p>. Бажаєте оновити розташування файлу?</p> + Не вдалось знайти вказаний файл qrc <p><b>%1</b></p><p>. Бажаєте оновити розташування файлу?</p> New location for %1 @@ -5152,7 +5207,7 @@ Class: %2 A widget element could not be found. - Неможливо знайти елемент віджета. + Не вдалось знайти елемент віджета. @@ -5741,7 +5796,7 @@ Class: %2 The current page of the container '%1' (%2) could not be determined while creating a layout.This indicates an inconsistency in the ui-file, probably a layout being constructed on a container widget. - Неможливо визначити поточну сторінку контейнера '%1' (%2) під час створення розташування. Це вказує на некоректність файлу UI, можливо, розташування було створене на контейнерному віджеті. + Не вдалось визначити поточну сторінку контейнера '%1' (%2) під час створення розташування. Це вказує на некоректність файлу UI, можливо, розташування було створене на контейнерному віджеті. Attempt to add a layout to a widget '%1' (%2) which already has an unmanaged layout of type %3. diff --git a/translations/linguist_uk.ts b/translations/linguist_uk.ts index 6e58be5..ca326d6 100644 --- a/translations/linguist_uk.ts +++ b/translations/linguist_uk.ts @@ -113,7 +113,7 @@ Will assume a single universal form. Cannot create '%2': %1 - Не можу створити '%2': %1 + Неможливо створити '%2': %1 Universal Form @@ -259,6 +259,186 @@ Will assume a single universal form. + LConvert + + +Usage: + lconvert [options] <infile> [<infile>...] + +lconvert is part of Qt's Linguist tool chain. It can be used as a +stand-alone tool to convert and filter translation data files. +The following file formats are supported: + +%1 +If multiple input files are specified, they are merged with +translations from later files taking precedence. + +Options: + -h + --help Display this information and exit. + + -i <infile> + --input-file <infile> + Specify input file. Use if <infile> might start with a dash. + This option can be used several times to merge inputs. + May be '-' (standard input) for use in a pipe. + + -o <outfile> + --output-file <outfile> + Specify output file. Default is '-' (standard output). + + -if <informat> + --input-format <format> + Specify input format for subsequent <infile>s. + The format is auto-detected from the file name and defaults to 'ts'. + + -of <outformat> + --output-format <outformat> + Specify output format. See -if. + + --input-codec <codec> + Specify encoding for QM and PO input files. Default is 'Latin1' + for QM and 'UTF-8' for PO files. UTF-8 is always tried as well for + QM, corresponding to the possible use of the trUtf8() function. + + --output-codec <codec> + Specify encoding for PO output files. Default is 'UTF-8'. + + --drop-tags <regexp> + Drop named extra tags when writing TS or XLIFF files. + May be specified repeatedly. + + --drop-translations + Drop existing translations and reset the status to 'unfinished'. + Note: this implies --no-obsolete. + + --source-language <language>[_<region>] + Specify/override the language of the source strings. Defaults to + POSIX if not specified and the file does not name it yet. + + --target-language <language>[_<region>] + Specify/override the language of the translation. + The target language is guessed from the file name if this option + is not specified and the file contents name no language yet. + + --no-obsolete + Drop obsolete messages. + + --no-finished + Drop finished messages. + + --sort-contexts + Sort contexts in output TS file alphabetically. + + --locations {absolute|relative|none} + Override how source code references are saved in TS files. + Default is absolute. + + --no-ui-lines + Drop line numbers from references to UI files. + + --verbose + be a bit more verbose + +Long options can be specified with only one leading dash, too. + +Return value: + 0 on success + 1 on command line parse failures + 2 on read failures + 3 on write failures + + +Використання: + lconvert [опції] <вхідний_файл> [<вхідний_файл>...] + +lconvert - це частина набору програм Qt Linguist. Вона може використовуватись, +як окремий інструмент, для конвертування та фільтрування файлів перекладу. +Підтримуються наступні формати файлів: + +%1 +Якщо вказано декілька вхідних файлів, то вони об'єднується з перекладами з +попередньо вказаних файлів з урахуванням порядку задання. + +Опції: + -h + --help Показати цю інформацію та вийти. + + -i <вхідний_файл> + --input-file <вхідний_файл> + Вказати вхідний файл. Використовуйте, якщо <вхідний_файл> + починається з дефіса. Ця опція може бути використана декілька + раз, щоб об'єднати вхідні дані. + Може бути '-' (стандартний вхід) для використання в конвеєрі. + + -o <вихідний_файл> + --output-file <вихідний_файл> + Вказати вихідний файл. Типово - '-' (стандартний вихід). + + -if <формат> + --input-format <формат> + Вказати вхідний формат для наступних <вхідних_файлів>. + Формат автоматично визначається з імені файлу. Типово - 'ts'. + + -of <формат> + --output-format <формат> + Вказати вихідний формат. Дивіться -if. + + --input-codec <кодек> + Вказати кодування для вхідних файлів QM та PO. Типово - 'Latin1' + для QM та 'UTF-8' файлів PO. Для QM також здійснюється спроба + використати UTF-8, відповідно до можливого застосування функції trUtf8(). + + --output-codec <кодек> + Вказати кодування для вихідних файлів PO. Типово - 'UTF-8'. + + --drop-tags <регулярний_вираз> + Видалити вказані додаткові теги під час запису файлів TS чи XLIFF. + Може вказуватись декілька раз. + + --drop-translations + Видаляти існуючі переклади та скидати статус в 'незавершений'. + Примітка: це включає --no-obsolete. + + --source-language <мова>[_<регіон>] + Вказати/замінити мову оригінальних рядків. Типово - POSIX, + якщо не вказано та не встановлено в файлі. + + --target-language <мова>[_<регіон>] + Вказати/замінити мову перекладу. + Якщо ця опція не вказана і у вмісті файлу мова не задана, то + мова перекладу вгадується з імені файлу. + + --no-obsolete + Відкинути застарілі повідомлення. + + --no-finished + Відкинути завершені повідомлення. + + --sort-contexts + Сортувати контексти в вихідному файлі TS за абеткою. + + --locations {absolute|relative|none} + Замінити як посилання на код зберігаються в файлі TS. + Типово - абсолютно. + + --no-ui-lines + Видалити номери рядків з посилань на файли UI. + + --verbose + бути трохи більш детальним + +Довгі опції також можуть вказуватись лише з одним дефісом. + +Коди повернення: + 0 при успіху + 1 при помилці розбору командного рядка + 2 при помилках читання + 3 при помилках запису + + + + LRelease Dropped %n message(s) which had no ID. @@ -292,1346 +472,1887 @@ Will assume a single universal form. Зігноровано %n неперекладених оригінальних текстів - - - LUpdate - lupdate warning: Codec for tr() '%1' disagrees with existing file's codec '%2'. Expect trouble. + Usage: + lrelease [options] project-file + lrelease [options] ts-files [-qm qm-file] + +lrelease is part of Qt's Linguist tool chain. It can be used as a +stand-alone tool to convert XML-based translations files in the TS +format into the 'compiled' QM format used by QTranslator objects. + +Options: + -help Display this information and exit + -idbased + Use IDs instead of source strings for message keying + -compress + Compress the QM files + -nounfinished + Do not include unfinished translations + -removeidentical + If the translated text is the same as + the source text, do not include the message + -markuntranslated <prefix> + If a message has no real translation, use the source text + prefixed with the given string instead + -silent + Do not explain what is being done + -version + Display the version of lrelease and exit - попередження lupdate: Кодек для tr() '%1' не узгоджується з існуючим кодеком файлу '%2'. Очікуйте неприємностей. + Використання: + lrelease [опції] файл-проект + lrelease [опції] файли-ts [-qm файл-qm] + +lrelease - це частина набору програм Qt Linguist. Вона може використовуватися +як окремий засіб для перетворення файлів перекладу на базі XML в форматі TS +до 'скомпільованого' формату QM, що використовується об'єктами QTranslator. + +Опції: + -help Показати цю інформацію та вийти + -idbased + Використовувати ID замість рядків оригіналу як ключі повідомлень + -compress + Стискати файли QM + -nounfinished + Не включати незавершені переклади + -removeidentical + Якщо перекладений текст однаковий з оригіналом, то + не включати повідомлення + -markuntranslated <prefix> + If a message has no real translation, use the source text + prefixed with the given string instead + -silent + Не пояснювати, що відбувається + -version + Показати версію lrelease та вийти - lupdate warning: Specified target language '%1' disagrees with existing file's language '%2'. Ignoring. - - попередження lupdate: Вказана мова перекладу '%1' не узгоджується з існуючою мовою файлу '%2'. Ігнорую. - + lrelease error: %1 + помилка lrelease: %1 - lupdate warning: Specified source language '%1' disagrees with existing file's language '%2'. Ignoring. + Updating '%1'... - попередження lupdate: Вказана мова оригіналу '%1' не узгоджується з існуючою мовою файлу '%2'. Ігнорую. + Оновлюю '%1'... - lupdate warning: Codec for source '%1' is invalid. Falling back to codec for tr(). + Removing translations equal to source text in '%1'... - попередження lupdate: Кодек для джерела '%1' неправильний. Повертаємось до використання кодеку для tr(). + Видалення перекладів однакових з оригінальним текстом в '%1'... - The option -target-language requires a parameter. + lrelease error: cannot create '%1': %2 - Опція -target-language вимагає параметра. + помилка lrelease: неможливо створити '%1': %2 - The option -source-language requires a parameter. - - Опція -source-language вимагає параметра. + lrelease error: cannot save '%1': %2 + помилка lrelease: неможливо зберегти '%1': %2 - The option -disable-heuristic requires a parameter. + lrelease version %1 - Опція -disable-heuristic вимагає параметра. + lrelease версії %1 - Invalid heuristic name passed to -disable-heuristic. + lrelease error: cannot read project file '%1'. - Неправильна назва евристики для -disable-heuristic. + помилка lrelease: неможливо прочитати файл проекту '%1'. - The option -locations requires a parameter. + lrelease error: cannot process project file '%1'. - Опція -locations вимагає параметра. + помилка lrelease: неможливо обробити файл проекту '%1'. - Invalid parameter passed to -locations. + lrelease warning: Met no 'TRANSLATIONS' entry in project file '%1' - Неправильний параметр для -locations. + попередження lrelease: в файлу проекту '%1' не знайдено елементу 'TRANSLATIONS' + + + LUpdate - The -codecfortr option should be followed by a codec name. + Usage: + lupdate [options] [project-file]... + lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file + +lupdate is part of Qt's Linguist tool chain. It extracts translatable +messages from Qt UI files, C++, Java and JavaScript/QtScript source code. +Extracted messages are stored in textual translation source files (typically +Qt TS XML). New and modified messages can be merged into existing TS files. + +Options: + -help Display this information and exit. + -no-obsolete + Drop all obsolete strings. + -extensions <ext>[,<ext>]... + Process files with the given extensions only. + The extension list must be separated with commas, not with whitespace. + Default: '%1'. + -pluralonly + Only include plural form messages. + -silent + Do not explain what is being done. + -no-sort + Do not sort contexts in TS files. + -no-recursive + Do not recursively scan the following directories. + -recursive + Recursively scan the following directories (default). + -I <includepath> or -I<includepath> + Additional location to look for include files. + May be specified multiple times. + -locations {absolute|relative|none} + Specify/override how source code references are saved in TS files. + Default is absolute. + -no-ui-lines + Do not record line numbers in references to UI files. + -disable-heuristic {sametext|similartext|number} + Disable the named merge heuristic. Can be specified multiple times. + -pro <filename> + Name of a .pro file. Useful for files with .pro file syntax but + different file suffix. Projects are recursed into and merged. + -source-language <language>[_<region>] + Specify the language of the source strings for new files. + Defaults to POSIX if not specified. + -target-language <language>[_<region>] + Specify the language of the translations for new files. + Guessed from the file name if not specified. + -ts <ts-file>... + Specify the output file(s). This will override the TRANSLATIONS + and nullify the CODECFORTR from possibly specified project files. + -codecfortr <codec> + Specify the codec assumed for tr() calls. Effective only with -ts. + -version + Display the version of lupdate and exit. + @lst-file + Read additional file names (one per line) from lst-file. - За опцією -codecfortr має слідувати назва кодека. + Використання: + lupdate [опції] [файл-проект]... + lupdate [опції] [вхідний-файл|шлях|@файл-список]... -ts ts-файли|@файл-список + +lupdate - це частина набору програм Qt Linguist. Вона It витягає придатні для перекладу +повідомлення з файлів Qt UI, коду C++, Java та JavaScript/QtScript. Витягнуті повідомлення +зберігаються в текстовому файлі перекладу (типово Qt TS XML). Нові та модифіковані +повідомлення можуть бути об'єднанні з існуючими файлами TS. + +Опції: + -help Показати цю інформацію та вийти. + -no-obsolete + Видалити всі застарілі рядки. + -extensions <розширення>[,<розширення>]... + Обробляти файли лише з вказаними розширеннями. + Список розширень має розділюватись комами, а не пропусками. + Типово: '%1'. + -pluralonly + Включати лише повідомлення з формою множини. + -silent + Не пояснювати, що відбувається. + -no-sort + Не сортувати контексти в файлах TS. + -no-recursive + Не сканувати рекурсивно наступні теки. + -recursive + Рекурсивно сканувати наступні теки (типово). + -I <шлях-включення> або -I<шлях-включення> + Додаткові місця для пошуку файлів включення. + Може бути вказано декілька разів. + -locations {absolute|relative|none} + Вказати/замістити як посилання на код зберігаються в файлі TS. + Типово - абсолютно. + -no-ui-lines + Не записувати номери рядків в посиланнях на файли UI. + -disable-heuristic {sametext|similartext|number} + Вимкнути вказану евристику об'єдання. Може бути вказано декілька разів. + -pro <ім'я-файлу> + Ім'я .pro файлу. Корисно для файлів із синтаксисом фалів .pro, але з + іншим розширенням. Projects are recursed into and merged. + -source-language <мова>[_<регіон>] + Вказати мову оригінальних рядків для нових файлів. + Типово, якщо не вказано - POSIX. + -target-language <мова>[_<регіон>] + Вказати мову перекладу для нових файлів. + Вгадується з імені файла, якщо не вказано. + -ts <файл-ts>... + Вказати вихідний файл(и). Це замістить TRANSLATIONS + та скине CODECFORTR з, можливо, вказаних файлів проекту. + -codecfortr <кодек> + Вказати кодек, що Specify the codec вживається для викликів tr(). Ефективно лише з -ts. + -version + Показати версію lupdate та вийти. + @файл-список + Читати додаткові імена файлів (одне на рядок) з файла-списку. - The -extensions option should be followed by an extension list. + lupdate warning: Codec for tr() '%1' disagrees with existing file's codec '%2'. Expect trouble. - За опцією -extensions має слідувати список розширень. + попередження lupdate: Кодек для tr() '%1' не узгоджується з існуючим кодеком файлу '%2'. Очікуйте неприємностей. - The -pro option should be followed by a filename of .pro file. + lupdate warning: Specified target language '%1' disagrees with existing file's language '%2'. Ignoring. - За опцією -pro має слідувати ім'я .pro файлу. + попередження lupdate: Вказана мова перекладу '%1' не узгоджується з існуючою мовою файлу '%2'. Ігнорую. - The -I option should be followed by a path. + lupdate warning: Specified source language '%1' disagrees with existing file's language '%2'. Ignoring. - За опцією -l має слідувати шлях. + попередження lupdate: Вказана мова оригіналу '%1' не узгоджується з існуючою мовою файлу '%2'. Ігнорую. - Unrecognized option '%1'. + Updating '%1'... - Нерозпізнана опція '%1'. + Оновлюю '%1'... - lupdate error: List file '%1' is not readable. + Stripping non plural forms in '%1'... - помилка lupdate: Неможливо прочитати файл списку '%1'. + Видалення не множинних форм в '%1'... - lupdate warning: For some reason, '%1' is not writable. + lupdate warning: Codec for source '%1' is invalid. Falling back to codec for tr(). - попередження lupdate: З певних причин в '%1' не можливо записати. + попередження lupdate: Кодек для джерела '%1' неправильний. Повертаємось до використання кодеку для tr(). - lupdate error: File '%1' has no recognized extension. + lupdate warning: TS files from command line will override TRANSLATIONS in %1. - помилка lupdate: Файл '%1' має невідоме розширення. + попередження lupdate: файл-TS з командного рядка замінять TRANSLATIONS в %1. - lupdate error: File '%1' does not exist. + lupdate warning: TS files from command line prevent recursing into %1. - помилка lupdate: Файл '%1' не існує. + попередження lupdate: файли TS з командного рядка перешкоджають рекурсивному проходу %1. - lupdate warning: -target-language usually only makes sense with exactly one TS file. + lupdate warning: no TS files specified. Only diagnostics will be produced for '%1'. - попередження lupdate: Використання -target-language, зазвичай, має сенс лише з одним файлом TS. + попередження lupdate: не вказано файлів TS. Здійснюватиметься лише діагностика для '%1'. - lupdate warning: -codecfortr has no effect without -ts. + The option -target-language requires a parameter. - попередження lupdate: -codecfortr не дає ефекту без -ts. + Опція -target-language вимагає параметра. - lupdate warning: no TS files specified. Only diagnostics will be produced. + The option -source-language requires a parameter. - попередження lupdate: не вказано файлів TS. Здійснюватиметься лише діагностика. + Опція -source-language вимагає параметра. - lupdate error: Both project and source files / include paths specified. + The option -disable-heuristic requires a parameter. - помилка lupdate: Одночасно вказані файл проекту та вхідні файли / шляхи для включення. + Опція -disable-heuristic вимагає параметра. - - - MainWindow - MainWindow - Головне вікно + Invalid heuristic name passed to -disable-heuristic. + + Неправильна назва евристики для -disable-heuristic. + - &Phrases - Фра&зи + The option -locations requires a parameter. + + Опція -locations вимагає параметра. + - &Close Phrase Book - &Закрити глосарій + Invalid parameter passed to -locations. + + Неправильний параметр для -locations. + - &Edit Phrase Book - &Редагувати глосарій + The -codecfortr option should be followed by a codec name. + + За опцією -codecfortr має слідувати назва кодека. + - &Print Phrase Book - &Друк глосарію + The -extensions option should be followed by an extension list. + + За опцією -extensions має слідувати список розширень. + - V&alidation - Перев&ірка + The -pro option should be followed by a filename of .pro file. + + За опцією -pro має слідувати ім'я .pro файлу. + - &View - &Вид + The -I option should be followed by a path. + + За опцією -l має слідувати шлях. + - Vie&ws - &Види + Unrecognized option '%1'. + + Нерозпізнана опція '%1'. + - &Toolbars - Панелі &інструментів + lupdate error: List file '%1' is not readable. + + помилка lupdate: Неможливо прочитати файл списку '%1'. + - &Help - &Довідка + lupdate warning: For some reason, '%1' is not writable. + + попередження lupdate: З певних причин в '%1' не можливо записати. + - &Translation - Пере&клад + lupdate error: File '%1' has no recognized extension. + + помилка lupdate: Файл '%1' має невідоме розширення. + - &File - &Файл + lupdate error: File '%1' does not exist. + + помилка lupdate: Файл '%1' не існує. + - Recently Opened &Files - &Нещодавно відкриті файли + Scanning directory '%1'... + + Сканування теки '%1'... + - &Edit - &Правка + lupdate warning: -target-language usually only makes sense with exactly one TS file. + + попередження lupdate: Використання -target-language, зазвичай, має сенс лише з одним файлом TS. + - &Open... - &Відкрити... + lupdate warning: -codecfortr has no effect without -ts. + + попередження lupdate: -codecfortr не дає ефекту без -ts. + - Open a Qt translation source file (TS file) for editing - Відкрити файл перекладу Qt (файл TS) для редагування + lupdate warning: no TS files specified. Only diagnostics will be produced. + + попередження lupdate: не вказано файлів TS. Здійснюватиметься лише діагностика. + - Ctrl+O - + lupdate error: Both project and source files / include paths specified. + + помилка lupdate: Одночасно вказані файл проекту та вхідні файли / шляхи для включення. + - E&xit - Ви&йти + Parenthesis/bracket/brace mismatch between #if and #else branches; using #if branch + + Круглі/квадратні/фігурні дужки не збігаються між гілками #if та #else, використовую гілку #if + - Close this window and exit. - Закрити вікно та вийти. + Parenthesis/brace mismatch between #if and #else branches; using #if branch + + Круглі/фігурні дужки не збігаються між гілками #if та #else, використовую гілку #if + - Ctrl+Q - + Unterminated C++ comment + + Незавершений коментар C++ + - Save - Зберегти + Unterminated C++ string + + Незавершений рядок C++ + - Save changes made to this Qt translation source file - Зберегти зміни зроблені до цього файлу перекладу Qt + Excess closing brace in C++ code (or abuse of the C++ preprocessor) + + Забагато закриваючих фігурних дужок в коді C++ (або неправильне застосування препроцесора C++) + - Save &As... - Зберегти &як... + Excess closing parenthesis in C++ code (or abuse of the C++ preprocessor) + + Забагато закриваючих круглих дужок в коді C++ (або неправильне застосування препроцесора C++) + - Save As... - Зберегти як... + Excess closing bracket in C++ code (or abuse of the C++ preprocessor) + + Забагато закриваючих квадратних дужок в коді C++ (або неправильне застосування препроцесора C++) + - Save changes made to this Qt translation source file into a new file. - Зберегти зміни зроблені до цього файлу перекладу Qt до нового файлу. + Cannot open %1: %2 + Неможливо відкрити %1: %2 - Release - Скомпілювати + //% cannot be used with tr() / QT_TR_NOOP(). Ignoring + + //% не може бути використаний разом з tr() / QT_TR_NOOP(). Ігнорую + - Create a Qt message file suitable for released applications from the current message file. - Створити файл повідомлень Qt придатний для використання програмами з поточного файлу повідомлень. + circular inclusion of %1 + + циклічне вкладення %1 + - &Print... - &Друк... + Cannot open %1: %2 + + Неможливо відкрити %1: %2 + - Print a list of all the translation units in the current translation source file. - Друкувати список усіх елементів перекладу з поточного файлу перекладу. + Qualifying with unknown namespace/class %1::%2 + + Задаю з невідомим простором імен/класом %1::%2 + - Ctrl+P - + tr() cannot be called without context + + tr() не можна викликати без контексту + - &Undo - &Повернути + Class '%1' lacks Q_OBJECT macro + + У класу '%1' не вистачає макросу Q_OBJECT + - Undo the last editing operation performed on the current translation. - Скасувати останню операцію редагування здійснену над поточним перекладом. + It is not recommended to call tr() from within a constructor '%1::%2' + + Не рекомендовано викликати tr() з конструктора '%1::%2' + - Ctrl+Z - + //% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring + + //% не може бути використаний разом з translate() / QT_TRANSLATE_NOOP(). Ігнорую + - &Redo - П&овторити + //= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring + + //= не може бути використаний разом з qtTrId() / QT_TRID_NOOP(). Ігнорую + - Redo an undone editing operation performed on the translation. - Повторити скасовану операцію редагування здійснену над поточним перекладом. + Unexpected character in meta string + + Неочікуваний символ в мета-рядку + - Ctrl+Y - + Unterminated meta string + + Незавершений мета-рядок + - Cu&t - Ви&різати + Cannot invoke tr() like this + + Неможливо викликати tr() подібним чином + - Copy the selected translation text to the clipboard and deletes it. - Копіювати виділений текст перекладу в буфер обміну та видалити його. + Discarding unconsumed meta data + + Відкидаю невжиті мета-дані + - Ctrl+X - + Unbalanced opening brace in C++ code (or abuse of the C++ preprocessor) + + Незбалансовані відкриваючі фігурні дужки в коді C++ (або неправильне застосування препроцесора C++) + - &Copy - &Копіювати + Unbalanced opening parenthesis in C++ code (or abuse of the C++ preprocessor) + + Незбалансовані відкриваючі круглі дужки в коді C++ (або неправильне застосування препроцесора C++) + - Copy the selected translation text to the clipboard. - Копіювати виділений текст перекладу до буферу обміну. + Unbalanced opening bracket in C++ code (or abuse of the C++ preprocessor) + + Незбалансовані відкриваючі квадратні дужки в коді C++ (або неправильне застосування препроцесора C++) + - Ctrl+C - + Unterminated Java comment. + + Незавершений коментар Java. + - &Paste - &Вставити + Invalid Unicode value. + + Неправильне значення Unicode. + - Paste the clipboard text into the translation. - Вставити текст з буферу обміну до перекладу. + Unterminated string. + + Незавершений рядок. + - Ctrl+V - + String used in translation can contain only literals concatenated with other literals, not expressions or numbers. + + Рядки, що використовуються в перекладі, можуть містити лише літерали об'єднані з іншими літералами, а не вирази або числа. + - Select &All - Виділити в&се - - - Select the whole translation text. - Виділити все текст перекладу. + 'class' must be followed by a class name. + + Після 'class' повинна слідувати назва класу. + - Ctrl+A - + Excess closing brace. + + Забагато закриваючих фігурних дужок. - &Find... - &Знайти... + 'package' must be followed by package name. + + Після 'package' повинна слідувати назва пакунку. + - Search for some text in the translation source file. - Шукати деякий текст в файлі перекладу. + Unbalanced opening brace. + + Незбалансовані відкриваючі фігурні дужки. + - Ctrl+F - + Unbalanced opening parenthesis. + + Незбалансовані відкриваючі круглі дужки. + - - Find &Next - Знайти &наступне + + Found %n source text(s) (%1 new and %2 already existing) + + + Знайдено %n оригінальний текст (%1 новий та %2 вже існує) + + Знайдено %n оригінальних тексти (%1 нових та %2 вже існує) + + Знайдено %n оригінальних текстів (%1 нових та %2 вже існує) + + - - Continue the search where it was left. - Продовжити пошук з місця, де він був зупинений. + + Removed %n obsolete entries + + + Видалено %n застарілий елемент + + Видалено %n застарілих елементи + + Видалено %n застарілих елементів + + - - F3 - + + Kept %n obsolete entries + + + Залишено %n застарілий елемент + + Залишено %n застарілих елементи + + Залишено %n застарілих елементів + + - - &Prev Unfinished - &Попередній незавершений + + Number heuristic provided %n translation(s) + + + Числова евристика надала %n переклад + + Числова евристика надала %n переклади + + Числова евристика надала %n перекладів + + - - Previous unfinished item - Попередній незавершений елемент + + Same-text heuristic provided %n translation(s) + + + Евристика "однаковий текст" надала %n переклад + + Евристика "однаковий текст" надала %n переклади + + Евристика "однаковий текст" надала %n перекладів + + - - Move to the previous unfinished item. - Перейти до попереднього незавершеного елементу. + + Similar-text heuristic provided %n translation(s) + + + Евристика "схожий текст" надала %n переклад + + Евристика "схожий текст" надала %n переклади + + Евристика "схожий текст" надала %n перекладів + + - Ctrl+K - + Illegal character + Неприпустимий символ - &Next Unfinished - &Наступний незавершений + Unclosed string at end of line + Незакритий рядок в кінці файлу - Next unfinished item - Наступний незавершений елемент + Illegal escape squence + Неприпустима керуюча послідовність - Move to the next unfinished item. - Перейти до наступного незавершеного елементу. + Illegal unicode escape sequence + Неприпустима керуюча послідовність Unicode - Ctrl+J - + Unclosed comment at end of file + Незакритий коментар в кінці файлу - P&rev - П&опередній + Illegal syntax for exponential number + Неприпустимий синтаксис для експоненційного числа - Move to previous item - Перейти до попереднього елементу + Identifier cannot start with numeric literal + Ідентифікатор не може починатись з числового літералу - Move to the previous item. - Перейти до попереднього елементу. + Unterminated regular expression literal + Незавершений літерал регулярного виразу - Ctrl+Shift+K - + //% cannot be used with %1(). Ignoring + + //% не може бути використаний разом з %1(). Ігнорую + - Ne&xt - Н&аступний + %1() requires at least two arguments. + + %1() вимагає щонайменше двох аргументів. + - Next item - Наступний елемент + %1(): both arguments must be literal strings. + + %1(): обидва аргументи повинні бути рядковими літералами. + - Move to the next item. - Перейти до наступного елементу. + %1() requires at least one argument. + + %1() вимагає щонайменше одного аргументу. + - Ctrl+Shift+J - + %1(): text to translate must be a literal string. + + %1(): текст для перекладу повинен бути рядковим літералом. + - &Done and Next - &Готово і наступний + //= cannot be used with %1(). Ignoring + + //= не може бути використаний разом з %1(). Ігнорую + - Mark item as done and move to the next unfinished item - Помітити елемент як завершений та перейти до наступного незавершеного елементу + %1(): identifier must be a literal string. + + %1(): ідентифікатор повинен бути рядковим літералом. + - Mark this item as done and move to the next unfinished item. - Помітити цей елемент як завершений та перейти до наступного незавершеного елементу. + Expected + Beginning of the string that contains comma-separated list of expected tokens + Очікувалось - Copy from source text - Копіювати з оригінального тексту + XML error: Parse error at line %1, column %2 (%3). + Помилка XML: Помилка розбору в рядку %1, позиція %2 (%3). - Copies the source text into the translation field - Копіює оригінальний текст в поле перекладу + Parse error in UI file + Помилка розбору файлу UI + + + MainWindow - Copies the source text into the translation field. - Копіює оригінальний текст в поле перекладу. + MainWindow + Головне вікно - Ctrl+B - + &Phrases + Фра&зи - &Accelerators - &Акселератори + &Close Phrase Book + &Закрити глосарій - Toggle the validity check of accelerators - Перемикання перевірки правильності акселераторів + &Edit Phrase Book + &Редагувати глосарій - Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window. - Перемикання перевірки акселераторів, тобто чи збігається кількість амперсандів в оригінальному та перекладеному тексті. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. + &Print Phrase Book + &Друк глосарію - &Ending Punctuation - &Кінцева пунктуація + V&alidation + Перев&ірка - Toggle the validity check of ending punctuation - Перемикання перевірки правильності кінцевої пунктуації + &View + &Вид - Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window. - Перемикання перевірки кінцевої пунктуації. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. + Vie&ws + &Види - &Phrase matches - Збіги &фраз + &Toolbars + Панелі &інструментів - Toggle checking that phrase suggestions are used - Перемикання перевірки, що пропозиції фраз були застосовані + &Help + &Довідка - Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window. - Перемикання перевірки про використання запропонованих фраз. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. + &Translation + Пере&клад - Place &Marker Matches - Збіги &маркерів положення + &File + &Файл - Toggle the validity check of place markers - Перемикання перевірки правильності маркерів розташування + Recently Opened &Files + &Нещодавно відкриті файли - Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window. - Перемикання перевірки правильності маркерів розташування, тобто чи усі %1, %2, ... збігаються в оригінальному та перекладеному тексті. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. + &Edit + &Правка - &New Phrase Book... - &Новий глосарій... + &Open... + &Відкрити... - Create a new phrase book. - Створити новий глосарій. + Open a Qt translation source file (TS file) for editing + Відкрити файл перекладу Qt (файл TS) для редагування - Ctrl+N + Ctrl+O - &Open Phrase Book... - &Відкрити глосарій... + E&xit + Ви&йти - Open a phrase book to assist translation. - Відкрити глосарій для допомоги в перекладі. + Close this window and exit. + Закрити вікно та вийти. - Ctrl+H + Ctrl+Q - &Reset Sorting - С&кинути сортування + Save + Зберегти - Sort the items back in the same order as in the message file. - Сортувати елементи в тому ж порядку, що й в файлі повідомлень. + Save changes made to this Qt translation source file + Зберегти зміни зроблені до цього файлу перекладу Qt - &Display guesses - &Показувати підказки + Save &As... + Зберегти &як... - Set whether or not to display translation guesses. - Встановлює показувати чи ні підказки перекладу. + Save As... + Зберегти як... - &Statistics - &Статистика + Save changes made to this Qt translation source file into a new file. + Зберегти зміни зроблені до цього файлу перекладу Qt до нового файлу. - Display translation statistics. - Показати статистку перекладу. - - - &Manual - &Посібник + Release + Скомпілювати - F1 - + Create a Qt message file suitable for released applications from the current message file. + Створити файл повідомлень Qt придатний для використання програмами з поточного файлу повідомлень. - About Qt Linguist - Про Qt Linguist + &Print... + &Друк... - About Qt - Про Qt + Print a list of all the translation units in the current translation source file. + Друкувати список усіх елементів перекладу з поточного файлу перекладу. - Display information about the Qt toolkit by Nokia. - Показати інформацію про інструментарій Qt від Nokia. + Ctrl+P + - &What's This? - &Що це? + &Undo + &Повернути - What's This? - Що це? + Undo the last editing operation performed on the current translation. + Скасувати останню операцію редагування здійснену над поточним перекладом. - Enter What's This? mode. - Перехід в режим "Що це?". + Ctrl+Z + - Shift+F1 - Shift+F1 + &Redo + П&овторити - &Search And Translate... - Знайти &та перекласти... + Redo an undone editing operation performed on the translation. + Повторити скасовану операцію редагування здійснену над поточним перекладом. - Replace the translation on all entries that matches the search source text. - Замінити переклад усіх елементів, що збігаються з оригінальним текстом, що шукається. + Ctrl+Y + - &Batch Translation... - Пакетний перекла&д... + Cu&t + Ви&різати - Batch translate all entries using the information in the phrase books. - Пакетно перекласти усі елементи використовуючи інформацію з глосаріїв. + Copy the selected translation text to the clipboard and deletes it. + Копіювати виділений текст перекладу в буфер обміну та видалити його. - Release As... - Скомпілювати як... + Ctrl+X + - Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the TS file. - Створення файла повідомлень Qt придатного для використання програмами з поточного файлу повідомлень. Ім'я файла буде автоматично визначено з імені файлу TS. + &Copy + &Копіювати - File - Файл + Copy the selected translation text to the clipboard. + Копіювати виділений текст перекладу до буферу обміну. - Edit - Правка + Ctrl+C + - Translation - Переклад + &Paste + &Вставити - Validation - Перевірка + Paste the clipboard text into the translation. + Вставити текст з буферу обміну до перекладу. - Help - Довідка + Ctrl+V + - Open/Refresh Form &Preview - &Відкрити/оновити попередній перегляд форм + Select &All + Виділити в&се - Form Preview Tool - Засіб попереднього перегляду форм + Select the whole translation text. + Виділити все текст перекладу. - F5 + Ctrl+A - Translation File &Settings... - Налаштування &файлу перекладу... + &Find... + &Знайти... - &Add to Phrase Book - Дод&ати до глосарію + Search for some text in the translation source file. + Шукати деякий текст в файлі перекладу. - Ctrl+T + Ctrl+F - Open Read-O&nly... - Відкрити лише для &читання... + Find &Next + Знайти &наступне - &Save All - &Зберегти усе + Continue the search where it was left. + Продовжити пошук з місця, де він був зупинений. - Ctrl+S + F3 - &Release All - &Скомпілювати все + &Prev Unfinished + &Попередній незавершений - Close - Закрити + Previous unfinished item + Попередній незавершений елемент - &Close All - З&акрити усе + Move to the previous unfinished item. + Перейти до попереднього незавершеного елементу. - Ctrl+W + Ctrl+K - Length Variants - Варіанти перекладу + &Next Unfinished + &Наступний незавершений - - This is the application's main window. - Це головне вікно програми. - + Next unfinished item + Наступний незавершений елемент - Source text - Оригінальний текст + Move to the next unfinished item. + Перейти до наступного незавершеного елементу. - Index - Індекс + Ctrl+J + - Context - Контекст + P&rev + П&опередній - Items - Елементи + Move to previous item + Перейти до попереднього елементу - This panel lists the source contexts. - В цій панелі перераховані оригінальні контексти. + Move to the previous item. + Перейти до попереднього елементу. - Strings - Рядки + Ctrl+Shift+K + - Phrases and guesses - Фрази та підказки + Ne&xt + Н&аступний - Sources and Forms - Коди та форми + Next item + Наступний елемент - Warnings - Попередження + Move to the next item. + Перейти до наступного елементу. - MOD - status bar: file(s) modified - ЗМІ + Ctrl+Shift+J + - Loading... - Завантажується... + &Done and Next + &Готово і наступний - Loading File - Qt Linguist - Завантаження файлу - Qt Linguist + Mark item as done and move to the next unfinished item + Помітити елемент як завершений та перейти до наступного незавершеного елементу - The file '%1' does not seem to be related to the currently open file(s) '%2'. - -Close the open file(s) first? - Не схоже, що файл '%1' пов'язаний з жодним з відкритим зараз файлом '%2'. - -Закрити спочатку відкриті файли? + Mark this item as done and move to the next unfinished item. + Помітити цей елемент як завершений та перейти до наступного незавершеного елементу. - The file '%1' does not seem to be related to the file '%2' which is being loaded as well. - -Skip loading the first named file? - Не схоже, що файл '%1' пов'язаний з файлом '%2', що також завантажується. - -Пропустити завантаження першого вказаного файлу? + Copy from source text + Копіювати з оригінального тексту - - %n translation unit(s) loaded. - - %n одиниця перекладу завантажена. - %n одиниці перекладу завантажені. - %n одиниць перекладу завантажено. - + + Copies the source text into the translation field + Копіює оригінальний текст в поле перекладу - Related files (%1);; - Пов'язані файли (%1);; + Copies the source text into the translation field. + Копіює оригінальний текст в поле перекладу. - Open Translation Files - Відкрити файли перекладу + Ctrl+B + - File saved. - Файл збережено. + &Accelerators + &Акселератори - Qt message files for released applications (*.qm) -All files (*) - Файли повідомлень Qt для готовий програм (*.qm) -Всі файли (*) + Toggle the validity check of accelerators + Перемикання перевірки правильності акселераторів - File created. - Файл створено. + Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window. + Перемикання перевірки акселераторів, тобто чи збігається кількість амперсандів в оригінальному та перекладеному тексті. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. - Printing... - Друкується... + &Ending Punctuation + &Кінцева пунктуація - Context: %1 - Контекст: %1 + Toggle the validity check of ending punctuation + Перемикання перевірки правильності кінцевої пунктуації - finished - завершено + Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window. + Перемикання перевірки кінцевої пунктуації. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. - unresolved - нерозв'язаний + &Phrase matches + Збіги &фраз - obsolete - застарілий + Toggle checking that phrase suggestions are used + Перемикання перевірки, що пропозиції фраз були застосовані - Printing... (page %1) - Друк... (сторінка %1) + Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window. + Перемикання перевірки про використання запропонованих фраз. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. - Printing completed - Друк завершено + Place &Marker Matches + Збіги &маркерів положення - Printing aborted - Друк перервано + Toggle the validity check of place markers + Перемикання перевірки правильності маркерів розташування - Search wrapped. - Пошук з початку. + Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window. + Перемикання перевірки правильності маркерів розташування, тобто чи усі %1, %2, ... збігаються в оригінальному та перекладеному тексті. Якщо буде виявлено розбіжність, то у вікні попереджень буде показано повідомлення. - Qt Linguist - Qt Linguist + &New Phrase Book... + &Новий глосарій... - Cannot find the string '%1'. - Неможливо знайти рядок '%1. + Create a new phrase book. + Створити новий глосарій. - Search And Translate in '%1' - Qt Linguist - Пошук та переклад і '%1' - Qt Linguist + Ctrl+N + - Translate - Qt Linguist - Переклад - Qt Linguist - - - Translated %n entry(s) - - Перекладено %n елемент - Перекладено %n елементи - Перекладено %n елементів - + &Open Phrase Book... + &Відкрити глосарій... - No more occurrences of '%1'. Start over? - Більше збігів '%1' немає. Почати спочатку? + Open a phrase book to assist translation. + Відкрити глосарій для допомоги в перекладі. - Create New Phrase Book - Створити новий глосарій + Ctrl+H + - Qt phrase books (*.qph) -All files (*) - Глосарії Q (*.qph) -Всі файли (*) + &Reset Sorting + С&кинути сортування - Phrase book created. - Глосарій створено. + Sort the items back in the same order as in the message file. + Сортувати елементи в тому ж порядку, що й в файлі повідомлень. - Open Phrase Book - Відкрити глосарій + &Display guesses + &Показувати підказки - Qt phrase books (*.qph);;All files (*) - Глосарії Q (*.qph);;Всі файли (*) + Set whether or not to display translation guesses. + Встановлює показувати чи ні підказки перекладу. - - %n phrase(s) loaded. - - %n фразу завантажено. - %n фрази завантажено. - %n фраз завантажено. - + + &Statistics + &Статистика - Add to phrase book - Додати до глосарію + Display translation statistics. + Показати статистку перекладу. - No appropriate phrasebook found. - Не знайдено відповідного глосарію. + &Manual + &Посібник - Adding entry to phrasebook %1 - Додавання елементу до глосарію %1 + F1 + - Select phrase book to add to - Оберіть глосарій, в який бажаєте додати + About Qt Linguist + Про Qt Linguist - Unable to launch Qt Assistant (%1) - Неможливо запустити Qt Assistant (%1) + About Qt + Про Qt - Version %1 - Версія %1 + Display information about the Qt toolkit by Nokia. + Показати інформацію про інструментарій Qt від Nokia. - <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). - <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist - це засіб для додавання перекладів до програм на Qt.</p><p>Copyright (C) 2010 Корпорація Nokia та/або її дочірні компанії. + &What's This? + &Що це? - Do you want to save the modified files? - Бажаєте зберегти модифіковані файли? + What's This? + Що це? - Do you want to save '%1'? - Бажаєте зберегти '%1'? + Enter What's This? mode. + Перехід в режим "Що це?". - Qt Linguist[*] - Qt Linguist[*] + Shift+F1 + Shift+F1 - %1[*] - Qt Linguist - %1[*] - Qt Linguist + &Search And Translate... + Знайти &та перекласти... - No untranslated translation units left. - Неперекладених одиниць не залишилось. + Replace the translation on all entries that matches the search source text. + Замінити переклад усіх елементів, що збігаються з оригінальним текстом, що шукається. - &Window - Вікн&о + &Batch Translation... + Пакетний перекла&д... - Minimize - Мінімізувати + Batch translate all entries using the information in the phrase books. + Пакетно перекласти усі елементи використовуючи інформацію з глосаріїв. - Ctrl+M - + Release As... + Скомпілювати як... - Display the manual for %1. - Показати посібник для %1. + Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the TS file. + Створення файла повідомлень Qt придатного для використання програмами з поточного файлу повідомлень. Ім'я файла буде автоматично визначено з імені файлу TS. - Display information about %1. - Показати інформацію про %1. + File + Файл - &Save '%1' - &Зберегти '%1' + Edit + Правка - Save '%1' &As... - Зберегти '%1' &як... + Translation + Переклад - Release '%1' - Скомпілювати '%1' + Validation + Перевірка - Release '%1' As... - Скомпілювати '%1' як... + Help + Довідка - &Close '%1' - З&акрити '%1' + Open/Refresh Form &Preview + &Відкрити/оновити попередній перегляд форм - &Save - &Зберегти + Form Preview Tool + Засіб попереднього перегляду форм - &Close - З&акрити + F5 + - Save All - Зберегти усе + Translation File &Settings... + Налаштування &файлу перекладу... - Close All - Закрити усе + &Add to Phrase Book + Дод&ати до глосарію - &Release - &Скомпілювати + Ctrl+T + - Translation File &Settings for '%1'... - Налаштування &файлу перекладу для '%1'... + Open Read-O&nly... + Відкрити лише для &читання... - &Batch Translation of '%1'... - Пакетний перекла&д '%1'... + &Save All + &Зберегти усе - Search And &Translate in '%1'... - Знайти &та переклад '%1'... + Ctrl+S + - Search And &Translate... - Знайти &та перекласти... + &Release All + &Скомпілювати все - Cannot read from phrase book '%1'. - Неможливо прочитати з глосарію '%1'. + Close + Закрити - Close this phrase book. - Закрити цей глосарій. + &Close All + З&акрити усе - Enables you to add, modify, or delete entries in this phrase book. - Дозволяє вам додавати, модифікувати та видаляти елементи глосарію. + Ctrl+W + - Print the entries in this phrase book. - Друку елементів цього глосарію. + Length Variants + Варіанти перекладу - Cannot create phrase book '%1'. - Неможливо створити глосарій '%1'. + + This is the application's main window. + Це головне вікно програми. + - Do you want to save phrase book '%1'? - Бажаєте зберегти глосарій '%1'? + Source text + Оригінальний текст - All - Усе + Index + Індекс - - - MessageEditor - - This is the right panel of the main window. - Це права панель основного вікна. - + Context + Контекст - Russian - Російська + Items + Елементи - German - Німецька + This panel lists the source contexts. + В цій панелі перераховані оригінальні контексти. - Japanese - Японська + Strings + Рядки - French - Французька + Phrases and guesses + Фрази та підказки - Polish - Польська + Sources and Forms + Коди та форми - Chinese - Китайська + Warnings + Попередження - This whole panel allows you to view and edit the translation of some source text. - Ця панель дозволяє вам переглядати та редагувати переклад деякого оригінального тексту. + MOD + status bar: file(s) modified + ЗМІ - Source text - Оригінальний текст + Loading... + Завантажується... - This area shows the source text. - В цій області відображається оригінальний текст. + Loading File - Qt Linguist + Завантаження файлу - Qt Linguist - Source text (Plural) - Оригінальний текст (множина) + The file '%1' does not seem to be related to the currently open file(s) '%2'. + +Close the open file(s) first? + Не схоже, що файл '%1' пов'язаний з жодним з відкритим зараз файлом '%2'. + +Закрити спочатку відкриті файли? - This area shows the plural form of the source text. - В цій області відображається множина оригінального тексту. + The file '%1' does not seem to be related to the file '%2' which is being loaded as well. + +Skip loading the first named file? + Не схоже, що файл '%1' пов'язаний з файлом '%2', що також завантажується. + +Пропустити завантаження першого вказаного файлу? + + + %n translation unit(s) loaded. + + %n одиниця перекладу завантажена. + %n одиниці перекладу завантажені. + %n одиниць перекладу завантажено. + - Developer comments - Коментарі розробника + Related files (%1);; + Пов'язані файли (%1);; - This area shows a comment that may guide you, and the context in which the text occurs. - В цій області відображається коментар, який може допомогти вам та контекст, в якому зустрічається текст. + Open Translation Files + Відкрити файли перекладу - Here you can enter comments for your own use. They have no effect on the translated applications. - Тут ви можете вводити коментарі для власного вжитку. Вони не впливають на перекладені програми. + File saved. + Файл збережено. - %1 translation (%2) - %1 переклад (%2) + Qt message files for released applications (*.qm) +All files (*) + Файли повідомлень Qt для готовий програм (*.qm) +Всі файли (*) - This is where you can enter or modify the translation of the above source text. - Тут ви можете чи змінювати переклад оригінального тексту, наведеного вище. + File created. + Файл створено. - %1 translation - %1 переклад + Printing... + Друкується... - %1 translator comments - %1 коментар перекладача + Context: %1 + Контекст: %1 - '%1' -Line: %2 - '%1' -Рядок: %2 + finished + завершено - - - MessageModel - Completion status for %1 - Статус завершеності для %1 + unresolved + нерозв'язаний - <file header> - <заголовок файлу> + obsolete + застарілий - <context comment> - <контекстний коментар> + Printing... (page %1) + Друк... (сторінка %1) - <unnamed context> - <контекст без назви> + Printing completed + Друк завершено - - - PhraseBookBox - Edit Phrase Book - Редагування глосарію + Printing aborted + Друк перервано - This window allows you to add, modify, or delete entries in a phrase book. - Це вікно дозволяє вам додавати, модифікувати та видаляти елементи глосарію. + Search wrapped. + Пошук з початку. - &Translation: - &Переклад: + Qt Linguist + Qt Linguist - This is the phrase in the target language corresponding to the source phrase. - Це фраза на мові перекладу, що відповідає оригінальній фразі. + Cannot find the string '%1'. + Неможливо знайти рядок '%1. - S&ource phrase: - &Оригінальна фраза: + Search And Translate in '%1' - Qt Linguist + Пошук та переклад і '%1' - Qt Linguist - This is a definition for the source phrase. - Це визначення оригінальної фрази. + Translate - Qt Linguist + Переклад - Qt Linguist + + + Translated %n entry(s) + + Перекладено %n елемент + Перекладено %n елементи + Перекладено %n елементів + - This is the phrase in the source language. - Це фраза мовою оригіналу. + No more occurrences of '%1'. Start over? + Більше збігів '%1' немає. Почати спочатку? - &Definition: - &Визначення: + Create New Phrase Book + Створити новий глосарій - Click here to add the phrase to the phrase book. - Клацніть тут, щоб додати фразу до глосарію. + Qt phrase books (*.qph) +All files (*) + Глосарії Q (*.qph) +Всі файли (*) - &New Entry - &Новий запис + Phrase book created. + Глосарій створено. - Click here to remove the entry from the phrase book. - Клацніть тут, щоб видалити фразу з глосарію. + Open Phrase Book + Відкрити глосарій - &Remove Entry - Ви&далити запис + Qt phrase books (*.qph);;All files (*) + Глосарії Q (*.qph);;Всі файли (*) + + + %n phrase(s) loaded. + + %n фразу завантажено. + %n фрази завантажено. + %n фраз завантажено. + - Settin&gs... - Нала&штування... + Add to phrase book + Додати до глосарію - Click here to save the changes made. - Клацніть тут, щоб зберегти зроблені зміни. + No appropriate phrasebook found. + Не знайдено відповідного глосарію. - &Save - &Зберегти + Adding entry to phrasebook %1 + Додавання елементу до глосарію %1 - Click here to close this window. - Клацніть тут щоб закрити вікно. + Select phrase book to add to + Оберіть глосарій, в який бажаєте додати - Close - Закрити + Unable to launch Qt Assistant (%1) + Неможливо запустити Qt Assistant (%1) - - Go to Phrase > Edit Phrase Book... The dialog that pops up is a PhraseBookBox. - Йдіть в Фрази > Редагувати глосарій... З'явиться діалог PhraseBookBox. - + Version %1 + Версія %1 - (New Entry) - (Новий запис) + <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). + <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist - це засіб для додавання перекладів до програм на Qt.</p><p>Copyright (C) 2010 Корпорація Nokia та/або її дочірні компанії. + + + Do you want to save the modified files? + Бажаєте зберегти модифіковані файли? + + + Do you want to save '%1'? + Бажаєте зберегти '%1'? + + + Qt Linguist[*] + Qt Linguist[*] %1[*] - Qt Linguist %1[*] - Qt Linguist - Qt Linguist - Qt Linguist + No untranslated translation units left. + Неперекладених одиниць не залишилось. - Cannot save phrase book '%1'. - Неможливо зберегти глосарій '%1'. + &Window + Вікн&о - - - PhraseModel - Source phrase - Оригінальна фраза + Minimize + Мінімізувати - Translation - Переклад + Ctrl+M + - Definition - Визначення + Display the manual for %1. + Показати посібник для %1. - - - PhraseView - Insert - Вставити + Display information about %1. + Показати інформацію про %1. - Edit - Редагувати + &Save '%1' + &Зберегти '%1' - Guess (%1) - Підказка (%1) + Save '%1' &As... + Зберегти '%1' &як... - Guess - Підказка + Release '%1' + Скомпілювати '%1' - - - QCoreApplication - Usage: - lrelease [options] project-file - lrelease [options] ts-files [-qm qm-file] - -lrelease is part of Qt's Linguist tool chain. It can be used as a -stand-alone tool to convert XML-based translations files in the TS -format into the 'compiled' QM format used by QTranslator objects. - -Options: - -help Display this information and exit - -idbased - Use IDs instead of source strings for message keying - -compress - Compress the QM files - -nounfinished - Do not include unfinished translations - -removeidentical - If the translated text is the same as - the source text, do not include the message - -markuntranslated <prefix> - If a message has no real translation, use the source text - prefixed with the given string instead - -silent - Do not explain what is being done - -version - Display the version of lrelease and exit - - Використання: - lrelease [опції] файл-проект - lrelease [опції] файли-ts [-qm файл-qm] - -lrelease - це частина набору програм Qt Linguist. Вона може використовуватися -як окремий засіб для перетворення файлів перекладу на базі XML в форматі TS -до 'скомпільованого' формату QM, що використовується об'єктами QTranslator. - -Опції: - -help Показати цю інформацію та вийти - -idbased - Використовувати ID замість рядків оригіналу як ключі повідомлень - -compress - Стискати файли QM - -nounfinished - Не включати незавершені переклади - -removeidentical - Якщо перекладений текст однаковий з оригіналом, то - не включати повідомлення - -markuntranslated <prefix> - If a message has no real translation, use the source text - prefixed with the given string instead - -silent - Не пояснювати, що відбувається - -version - Показати версію lrelease та вийти - + Release '%1' As... + Скомпілювати '%1' як... + + + &Close '%1' + З&акрити '%1' + + + &Save + &Зберегти + + + &Close + З&акрити + + + Save All + Зберегти усе + + + Close All + Закрити усе + + + &Release + &Скомпілювати + + + Translation File &Settings for '%1'... + Налаштування &файлу перекладу для '%1'... + + + &Batch Translation of '%1'... + Пакетний перекла&д '%1'... + + + Search And &Translate in '%1'... + Знайти &та переклад '%1'... + + + Search And &Translate... + Знайти &та перекласти... + + + Cannot read from phrase book '%1'. + Неможливо прочитати з глосарію '%1'. + + + Close this phrase book. + Закрити цей глосарій. + + + Enables you to add, modify, or delete entries in this phrase book. + Дозволяє вам додавати, модифікувати та видаляти елементи глосарію. + + + Print the entries in this phrase book. + Друку елементів цього глосарію. + + + Cannot create phrase book '%1'. + Неможливо створити глосарій '%1'. + + + Do you want to save phrase book '%1'? + Бажаєте зберегти глосарій '%1'? + + + All + Усе + + + + MessageEditor + + + This is the right panel of the main window. + Це права панель основного вікна. + + + + Russian + Російська + + + German + Німецька + + + Japanese + Японська + + + French + Французька + + + Polish + Польська + + + Chinese + Китайська + + + This whole panel allows you to view and edit the translation of some source text. + Ця панель дозволяє вам переглядати та редагувати переклад деякого оригінального тексту. + + + Source text + Оригінальний текст + + + This area shows the source text. + В цій області відображається оригінальний текст. + + + Source text (Plural) + Оригінальний текст (множина) + + + This area shows the plural form of the source text. + В цій області відображається множина оригінального тексту. + + + Developer comments + Коментарі розробника + + + This area shows a comment that may guide you, and the context in which the text occurs. + В цій області відображається коментар, який може допомогти вам та контекст, в якому зустрічається текст. + + + Here you can enter comments for your own use. They have no effect on the translated applications. + Тут ви можете вводити коментарі для власного вжитку. Вони не впливають на перекладені програми. + + + %1 translation (%2) + %1 переклад (%2) + + + This is where you can enter or modify the translation of the above source text. + Тут ви можете чи змінювати переклад оригінального тексту, наведеного вище. + + + %1 translation + %1 переклад + + + %1 translator comments + %1 коментар перекладача + + + '%1' +Line: %2 + '%1' +Рядок: %2 + + + + MessageModel + + Completion status for %1 + Статус завершеності для %1 + + + <file header> + <заголовок файлу> + + + <context comment> + <контекстний коментар> + + + <unnamed context> + <контекст без назви> + + + + PhraseBook + + Parse error at line %1, column %2 (%3). + Помилка розбору в рядку %1, позиція %2 (%3). + + + + PhraseBookBox + + Edit Phrase Book + Редагування глосарію + + + This window allows you to add, modify, or delete entries in a phrase book. + Це вікно дозволяє вам додавати, модифікувати та видаляти елементи глосарію. + + + &Translation: + &Переклад: + + + This is the phrase in the target language corresponding to the source phrase. + Це фраза на мові перекладу, що відповідає оригінальній фразі. + + + S&ource phrase: + &Оригінальна фраза: + + + This is a definition for the source phrase. + Це визначення оригінальної фрази. + + + This is the phrase in the source language. + Це фраза мовою оригіналу. + + + &Definition: + &Визначення: + + + Click here to add the phrase to the phrase book. + Клацніть тут, щоб додати фразу до глосарію. + + + &New Entry + &Новий запис + + + Click here to remove the entry from the phrase book. + Клацніть тут, щоб видалити фразу з глосарію. + + + &Remove Entry + Ви&далити запис + + + Settin&gs... + Нала&штування... + + + Click here to save the changes made. + Клацніть тут, щоб зберегти зроблені зміни. + + + &Save + &Зберегти + + + Click here to close this window. + Клацніть тут щоб закрити вікно. + + + Close + Закрити + + + + Go to Phrase > Edit Phrase Book... The dialog that pops up is a PhraseBookBox. + Йдіть в Фрази > Редагувати глосарій... З'явиться діалог PhraseBookBox. + + + + (New Entry) + (Новий запис) - Updating '%1'... - - Оновлюю '%1'... - + %1[*] - Qt Linguist + %1[*] - Qt Linguist - Removing translations equal to source text in '%1'... - - Видалення перекладів однакових з оригінальним текстом в '%1'... - + Qt Linguist + Qt Linguist - lrelease version %1 - - lrelease версії %1 - + Cannot save phrase book '%1'. + Неможливо зберегти глосарій '%1'. + + + + PhraseModel + + Source phrase + Оригінальна фраза + + + Translation + Переклад + + + Definition + Визначення + + + + PhraseView + + Insert + Вставити + + + Edit + Редагувати + + + Guess (%1) + Підказка (%1) + + + Guess + Підказка @@ -1681,215 +2402,11 @@ lrelease - це частина набору програм Qt Linguist. Вона Файли локалізації XLIFF - Usage: - lupdate [options] [project-file]... - lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file - -lupdate is part of Qt's Linguist tool chain. It extracts translatable -messages from Qt UI files, C++, Java and JavaScript/QtScript source code. -Extracted messages are stored in textual translation source files (typically -Qt TS XML). New and modified messages can be merged into existing TS files. - -Options: - -help Display this information and exit. - -no-obsolete - Drop all obsolete strings. - -extensions <ext>[,<ext>]... - Process files with the given extensions only. - The extension list must be separated with commas, not with whitespace. - Default: '%1'. - -pluralonly - Only include plural form messages. - -silent - Do not explain what is being done. - -no-sort - Do not sort contexts in TS files. - -no-recursive - Do not recursively scan the following directories. - -recursive - Recursively scan the following directories (default). - -I <includepath> or -I<includepath> - Additional location to look for include files. - May be specified multiple times. - -locations {absolute|relative|none} - Specify/override how source code references are saved in TS files. - Default is absolute. - -no-ui-lines - Do not record line numbers in references to UI files. - -disable-heuristic {sametext|similartext|number} - Disable the named merge heuristic. Can be specified multiple times. - -pro <filename> - Name of a .pro file. Useful for files with .pro file syntax but - different file suffix. Projects are recursed into and merged. - -source-language <language>[_<region>] - Specify the language of the source strings for new files. - Defaults to POSIX if not specified. - -target-language <language>[_<region>] - Specify the language of the translations for new files. - Guessed from the file name if not specified. - -ts <ts-file>... - Specify the output file(s). This will override the TRANSLATIONS - and nullify the CODECFORTR from possibly specified project files. - -codecfortr <codec> - Specify the codec assumed for tr() calls. Effective only with -ts. - -version - Display the version of lupdate and exit. - @lst-file - Read additional file names (one per line) from lst-file. - - Використання: - lupdate [опції] [файл-проект]... - lupdate [опції] [вхідний-файл|шлях|@файл-список]... -ts ts-файли|@файл-список - -lupdate - це частина набору програм Qt Linguist. Вона It витягає придатні для перекладу -повідомлення з файлів Qt UI, коду C++, Java та JavaScript/QtScript. Витягнуті повідомлення -зберігаються в текстовому файлі перекладу (типово Qt TS XML). Нові та модифіковані -повідомлення можуть бути об'єднанні з існуючими файлами TS. - -Опції: - -help Показати цю інформацію та вийти. - -no-obsolete - Видалити всі застарілі рядки. - -extensions <розширення>[,<розширення>]... - Обробляти файли лише з вказаними розширеннями. - Список розширень має розділюватись комами, а не пропусками. - Типово: '%1'. - -pluralonly - Включати лише повідомлення з формою множини. - -silent - Не пояснювати, що відбувається. - -no-sort - Не сортувати контексти в файлах TS. - -no-recursive - Не сканувати рекурсивно наступні теки. - -recursive - Рекурсивно сканувати наступні теки (типово). - -I <шлях-включення> або -I<шлях-включення> - Додаткові місця для пошуку файлів включення. - Може бути вказано декілька разів. - -locations {absolute|relative|none} - Вказати/замістити як посилання на код зберігаються в файлі TS. - Типово - абсолютно. - -no-ui-lines - Не записувати номери рядків в посиланнях на файли UI. - -disable-heuristic {sametext|similartext|number} - Вимкнути вказану евристику об'єдання. Може бути вказано декілька разів. - -pro <ім'я-файлу> - Ім'я .pro файлу. Корисно для файлів із синтаксисом фалів .pro, але з - іншим розширенням. Projects are recursed into and merged. - -source-language <мова>[_<регіон>] - Вказати мову оригінальних рядків для нових файлів. - Типово, якщо не вказано - POSIX. - -target-language <мова>[_<регіон>] - Вказати мову перекладу для нових файлів. - Вгадується з імені файла, якщо не вказано. - -ts <файл-ts>... - Вказати вихідний файл(и). Це замістить TRANSLATIONS - та скине CODECFORTR з, можливо, вказаних файлів проекту. - -codecfortr <кодек> - Вказати кодек, що Specify the codec вживається для викликів tr(). Ефективно лише з -ts. - -version - Показати версію lupdate та вийти. - @файл-список - Читати додаткові імена файлів (одне на рядок) з файла-списку. - - - - Updating '%1'... - - Оновлюю '%1'... - - - - Stripping non plural forms in '%1'... - - Видалення не множинних форм в '%1'... - - - lupdate version %1 lupdate версії %1 - - Scanning directory '%1'... - - Сканування теки '%1'... - - - - Found %n source text(s) (%1 new and %2 already existing) - - - Знайдено %n оригінальний текст (%1 новий та %2 вже існує) - - Знайдено %n оригінальних тексти (%1 нових та %2 вже існує) - - Знайдено %n оригінальних текстів (%1 нових та %2 вже існує) - - - - - Removed %n obsolete entries - - - Видалено %n застарілий елемент - - Видалено %n застарілих елементи - - Видалено %n застарілих елементів - - - - - Kept %n obsolete entries - - - Залишено %n застарілий елемент - - Залишено %n застарілих елементи - - Залишено %n застарілих елементів - - - - - Number heuristic provided %n translation(s) - - - Числова евристика надала %n переклад - - Числова евристика надала %n переклади - - Числова евристика надала %n перекладів - - - - - Same-text heuristic provided %n translation(s) - - - Евристика "однаковий текст" надала %n переклад - - Евристика "однаковий текст" надала %n переклади - - Евристика "однаковий текст" надала %n перекладів - - - - - Similar-text heuristic provided %n translation(s) - - - Евристика "схожий текст" надала %n переклад - - Евристика "схожий текст" надала %n переклади - - Евристика "схожий текст" надала %n перекладів - - - SourceCodeView diff --git a/translations/qt_help_uk.ts b/translations/qt_help_uk.ts index b8bc984..32e47b4 100644 --- a/translations/qt_help_uk.ts +++ b/translations/qt_help_uk.ts @@ -106,7 +106,7 @@ QHelpEngineCore Cannot open documentation file %1: %2! - Не можу відкрити файл документації %1: %2! + Неможливо відкрити файл документації %1: %2! The specified namespace does not exist! @@ -256,7 +256,7 @@ The input file %1 could not be opened! - Неможливо відкрити вхідний файл %1! + Не вдалось відкрити вхідний файл %1! diff --git a/translations/qt_uk.ts b/translations/qt_uk.ts index 7a223f4..e1716fb 100644 --- a/translations/qt_uk.ts +++ b/translations/qt_uk.ts @@ -1697,25 +1697,6 @@ to - QDeclarativeCompositeTypeManager - - Resource %1 unavailable - Ресурс %1 недоступний - - - Namespace %1 cannot be used as a type - Простір імен %1 не може бути використаний як тип - - - %1 %2 - %1 %2 - - - Type %1 unavailable - Тип %1 недоступний - - - QDeclarativeConnections Cannot assign to non-existent property "%1" @@ -2096,6 +2077,25 @@ to + QDeclarativeTypeData + + Script %1 unavailable + + + + Type %1 unavailable + Тип %1 недоступний + + + Namespace %1 cannot be used as a type + Простір імен %1 не може бути використаний як тип + + + %1 %2 + %1 %2 + + + QDeclarativeVME Unable to create object of type %1 @@ -3313,18 +3313,10 @@ Do you want to delete it anyway? QLibrary - Could not mmap '%1': %2 - Не вдалося виконати mmap '%1': %2 - - Plugin verification data mismatch in '%1' Дані верифікації додатку не збігаються для ’%1’ - Could not unmap '%1': %2 - Не вдалося виконати unmap '%1': %2 - - The shared library was not found. Динамічна бібліотека не знайдена. @@ -7917,7 +7909,7 @@ Do you want to overwrite it? QtXmlPatterns %1 is an unsupported encoding. - + Кодування %1 не підтримується. %1 contains octets which are disallowed in the requested encoding %2. @@ -7941,23 +7933,23 @@ Do you want to overwrite it? Year %1 is invalid because it begins with %2. - + Рік %1 неправильний, бо він починається з %2. Day %1 is outside the range %2..%3. - + День %1 поза межами діапазону %2..%3. Month %1 is outside the range %2..%3. - + Місяць %1 поза межами діапазону %2..%3. Overflow: Can't represent date %1. - + Переповнення: Не можу представити дату %1. Day %1 is invalid for month %2. - + Неправильний день %1 для місяця %2. Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; @@ -7965,15 +7957,15 @@ Do you want to overwrite it? Time %1:%2:%3.%4 is invalid. - + Неправильний час %1:%2:%3.%4. Overflow: Date can't be represented. - + Переповнення: Не можу представити дату. At least one component must be present. - + Щонайменше один компонент має бути присутнім. At least one time component must appear after the %1-delimiter. @@ -7981,7 +7973,7 @@ Do you want to overwrite it? %1 is not a valid value of type %2. - + %1 не є правильним значенням для типу %2. When casting to %1 from %2, the source value cannot be %3. @@ -7989,11 +7981,11 @@ Do you want to overwrite it? Integer division (%1) by zero (%2) is undefined. - + Цілочисельне ділення (%1) на нуль (%2) не визначене. Division (%1) by zero (%2) is undefined. - + Ділення (%1) на нуль (%2) не визначене. Modulus division (%1) by zero (%2) is undefined. @@ -8021,11 +8013,11 @@ Do you want to overwrite it? Value %1 of type %2 exceeds maximum (%3). - + Значення %1 типу %2 перевищує максимум (%3). Value %1 of type %2 is below minimum (%3). - + Значення %1 типу %2 менше за мінімум (%3). A value of type %1 must contain an even number of digits. The value %2 does not. @@ -8033,7 +8025,7 @@ Do you want to overwrite it? %1 is not valid as a value of type %2. - + %1 не є правильним значенням для типу %2. Ambiguous rule match. @@ -8041,11 +8033,11 @@ Do you want to overwrite it? Operator %1 cannot be used on type %2. - + Оператор %1 не може використовуватись для типу %2. Operator %1 cannot be used on atomic values of type %2 and %3. - + Оператор %1 не може використовуватись для атомарних значень типу %2 та %3. The namespace URI in the name for a computed attribute cannot be %1. @@ -8065,11 +8057,11 @@ Do you want to overwrite it? A comment cannot contain %1 - + Коментар не може містити %1 A comment cannot end with a %1. - + Коментар не може закінчувати на %1. In a namespace constructor, the value for a namespace cannot be an empty string. @@ -8081,7 +8073,7 @@ Do you want to overwrite it? The prefix %1 cannot be bound. - + Неможливо прив'язати префікс %1. Only the prefix %1 can be bound to %2 and vice versa. @@ -8147,12 +8139,16 @@ Do you want to overwrite it? %1 takes at most %n argument(s). %2 is therefore invalid. + + %1 requires at least %n argument(s). %2 is therefore invalid. + + @@ -8169,7 +8165,7 @@ Do you want to overwrite it? %1 is not a valid XML 1.0 character. - + %1 не є правильним символом XML 1.0. The root node of the second argument to function %1 must be a document node. %2 is not a document node. @@ -8257,11 +8253,11 @@ Do you want to overwrite it? The item %1 did not match the required type %2. - + Елемент %1 не відповідає необхідному типу %2. The variable %1 is unused - + Змінна %1 не використовується W3C XML Schema identity constraint selector @@ -8301,7 +8297,7 @@ Do you want to overwrite it? Version %1 is not supported. The supported XQuery version is 1.0. - + Версія %1 не підтримується. Підтримується XQuery версії 1.0. The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. @@ -8357,7 +8353,7 @@ Do you want to overwrite it? The module import feature is not supported - + Можливість імпорту модулів не підтримується A variable with name %1 has already been declared. @@ -8517,7 +8513,7 @@ Do you want to overwrite it? Parse error: %1 - + Помилка розбору: %1 The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. @@ -8529,7 +8525,7 @@ Do you want to overwrite it? Unknown XSL-T attribute %1. - + Невідомий атрибут XSL-T %1. Attribute %1 and %2 are mutually exclusive. @@ -9041,11 +9037,11 @@ Do you want to overwrite it? %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4. - + Атрибут %1 елемента %2 містить неправильний вміст: {%3} не є значенням типу %4. %1 attribute of %2 element contains invalid content: {%3}. - + Атрибут %1 елемента %2 містить неправильний вміст: {%3}. Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema. @@ -9077,7 +9073,7 @@ Do you want to overwrite it? %1 attribute of %2 element must be %3 or %4. - + Атрибут %1 елемента %2 має бути %3 або %4. %1 attribute of %2 element must have a value of %3. @@ -9157,7 +9153,7 @@ Do you want to overwrite it? Type %1 already defined. - + Тип %1 вже визначено. Attribute group %1 already defined. @@ -9297,7 +9293,7 @@ Do you want to overwrite it? %1 is not valid according to %2. - + %1 не є правильним відповідно до %2. String content does not match the length facet. @@ -9697,7 +9693,7 @@ Do you want to overwrite it? zero or one - + нуль чи один exactly one @@ -9705,15 +9701,15 @@ Do you want to overwrite it? one or more - + один чи більше zero or more - + нуль чи більше Required type is %1, but %2 was found. - + Вимагається тип %1, але знайдено %2. Promoting %1 to %2 may cause loss of precision. @@ -9721,7 +9717,7 @@ Do you want to overwrite it? The focus is undefined. - + Фокус не визначено. It's not possible to add attributes after any other kind of node. diff --git a/translations/qvfb_uk.ts b/translations/qvfb_uk.ts index 0e0c5da6..e857e9d 100644 --- a/translations/qvfb_uk.ts +++ b/translations/qvfb_uk.ts @@ -215,7 +215,7 @@ DeviceSkin The image file '%1' could not be loaded. - Неможливо завантажити файл зображення '%1'. + Не вдалось завантажити файл зображення '%1'. The skin directory '%1' does not contain a configuration file. @@ -223,11 +223,11 @@ The skin configuration file '%1' could not be opened. - Неможливо відкрити файл налаштувань '%1'. + Не вдалось відкрити файл налаштувань обкладинки '%1'. The skin configuration file '%1' could not be read: %2 - Неможливо прочитати файл налаштувань '%1': %2 + Не вдалось прочитати файл налаштувань обкладинки '%1': %2 Syntax error: %1 @@ -261,6 +261,126 @@ QVFb + &File + &Файл + + + &Configure... + &Налаштувати... + + + &Save image... + &Зберегти зображення... + + + &Animation... + &Анімація... + + + &Quit + Ви&йти + + + &View + &Вид + + + Show &Cursor + Показувати &курсор + + + &Refresh Rate... + Швидкість &оновлення... + + + &No rotation + &Без обертання + + + &90° rotation + Обернути на &90° + + + 1&80° rotation + Обернути на 1&80° + + + 2&70° rotation + Обернути на 2&70° + + + Zoom scale &0.5 + Коефіцієнт масштабування &0.5 + + + Zoom scale 0.7&5 + Коефіцієнт масштабування 0.7&5 + + + Zoom scale &1 + Коефіцієнт масштабування &1 + + + Zoom scale &2 + Коефіцієнт масштабування &2 + + + Zoom scale &3 + Коефіцієнт масштабування &3 + + + Zoom scale &4 + Коефіцієнт масштабування &4 + + + Zoom &scale... + Коефіцієнт &масштабування... + + + &Help + &Довідка + + + &About... + &Про... + + + Save Main Screen image + Зберегти зображення головного екрану + + + snapshot.png + + + + Portable Network Graphics (*.png) + Переносима мережева графіка (*.png) + + + Save Main Screen Image + Зберегти зображення головного екрану + + + Save failed. Check that you have permission to write to the target directory. + Збій збереження. Перевірте чи маєте ви право на запис в теку збереження. + + + Save Second Screen image + Зберегти зображення другого екрану + + + Save Second Screen Image + Зберегти зображення другого екрану + + + About QVFB + Про QVFB + + + <h2>The Qt for Embedded Linux Virtual X11 Framebuffer</h2><p>This application runs under Qt for X11, emulating a simple framebuffer, which the Qt for Embedded Linux server and clients can attach to just as if it was a hardware Linux framebuffer. <p>With the aid of this development tool, you can develop Qt for Embedded Linux applications under X11 without having to switch to a virtual console. This means you can comfortably use your other development tools such as GUI profilers and debuggers. + <h2>Віртуальний фреймбуфер X11 Qt для Embedded Linux</h2><p>Ця програма виконується під Qt для X11, емулюючи простий фреймбуфер, до якого сервер та клієнти Qt для Embedded Linux можуть приєднуватись так само, як би це був апаратний фреймбуфер Linux. <p>За допомогою цього інструменту ви можете розробляти програми Qt для Embedded Linux під X11, без потреби перемикатись на віртуальну консоль. Це означає, що ви можете зручно використовувати інші ваші інструменти розробки, такі як профайлери та зневаджувачі з графічним інтерфейсом користувача. + + Browse... Оглянути... @@ -273,4 +393,23 @@ Усі обкладинки QVFB (*.skin) + + QVFbRateDialog + + Target frame rate: + Швидкість оновлення: + + + %1fps + %1 кадрів в секунду + + + OK + + + + Cancel + Скасувати + + -- cgit v0.12 From aacf7c5a8b98f0dd4039d7f7a9d0471c32034a3b Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 2 Sep 2010 19:12:27 +0200 Subject: Doc: qdoc fixes. --- doc/src/getting-started/gettingstartedqml.qdoc | 4 ++-- src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 8 ++++---- src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index 771f92e..9e6471e 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -296,8 +296,8 @@ \section2 Using Data Models and Views - QML has different \l {Data Models}{data views} that display - \l {Data Models}{data models}. Our menu bar will display the menus in a list, + QML has different \l{QML Data Models}{data views} that display + \l{QML Data Models}{data models}. Our menu bar will display the menus in a list, with a header that displays a row of menu names. The list of menus are declared inside a \c VisualItemModel. The \l{VisualItemModel}{\c VisualItemModel} element contains items that already have views such as \c Rectangle elements diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index c1ca23d..1538133 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -389,7 +389,7 @@ void QDeclarativeWebView::setPreferredHeight(int height) } /*! - \qmlmethod bool WebView::evaluateJavaScript(string) + \qmlmethod bool WebView::evaluateJavaScript(string scriptSource) Evaluates the \a scriptSource JavaScript inside the context of the main web frame, and returns the result of the last executed statement. @@ -513,14 +513,14 @@ void QDeclarativeWebView::setRenderingEnabled(bool enabled) } /*! - \qmlsignal WebView::onDoubleClick(clickx, clicky) + \qmlsignal WebView::onDoubleClick(int clickx, int clicky) The WebView does not pass double-click events to the web engine, but rather emits this signals. */ /*! - \qmlmethod bool WebView::heuristicZoom(clickX,clickY,maxzoom) + \qmlmethod bool WebView::heuristicZoom(int clickX, int clickY, real maxzoom) Finds a zoom that: \list @@ -976,7 +976,7 @@ QString QDeclarativeWebPage::chooseFile(QWebFrame* originatingFrame, const QStri } /*! - \qmlsignal WebView::onAlert(message) + \qmlsignal WebView::onAlert(string message) The handler is called when the web engine sends a JavaScript alert. The \a message is the text to be displayed in the alert to the user. diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index ef28ab2..412a5f7 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1405,7 +1405,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m to set \e {clip: true} in order to have the out of view items clipped nicely. - \sa {Data Models}, GridView, {declarative/modelviews/listview}{ListView examples} + \sa {QML Data Models}, GridView, {declarative/modelviews/listview}{ListView examples} */ QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent) -- cgit v0.12 From 6939815182b31ab865184e40991eb339ff21ba2d Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Tue, 31 Aug 2010 16:33:41 +1000 Subject: Fix potential KERN-EXEC 0 on Symbian. SymbianEngine::updateConfigurationsL cannot be called from a non-main thread as it uses Symbian resources not shared between threads. Task-number: QTBUG-13064 --- src/plugins/bearer/symbian/qnetworksession_impl.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 2091898..7f81397 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -968,11 +968,17 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia } } else { #ifdef SNAP_FUNCTIONALITY_AVAILABLE - // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it triggers - // user choice type of activity (EasyWLAN). As a result, a new IAP may be created, and - // hence if was not found yet. Therefore update configurations and see if there is something new. + // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it + // triggers user choice type of activity (EasyWLAN). As a result, a new IAP may be + // created, and hence if was not found yet. Therefore update configurations and see if + // there is something new. + // 1. Update knowledge from the databases. - engine->requestUpdate(); + if (thread() != engine->thread()) + QMetaObject::invokeMethod(engine, "requestUpdate", Qt::BlockingQueuedConnection); + else + engine->requestUpdate(); + // 2. Check if new configuration was created during connection creation QList knownConfigs = engine->accessPointConfigurationIdentifiers(); #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG @@ -1025,7 +1031,12 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia } else { // Check if new (WLAN) IAP was created in IAP/SNAP dialog // 1. Sync internal configurations array to commsdb first - engine->updateConfigurations(); + if (thread() != engine->thread()) { + QMetaObject::invokeMethod(engine, "requestUpdate", + Qt::BlockingQueuedConnection); + } else { + engine->requestUpdate(); + } // 2. Check if new configuration was created during connection creation QStringList knownConfigs = engine->accessPointConfigurationIdentifiers(); if (knownConfigs.count() > iKnownConfigsBeforeConnectionStart.count()) { -- cgit v0.12 From fc4d386f2cc8984b98957d83d8cdb57c1105890f Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Fri, 3 Sep 2010 13:49:36 +1000 Subject: protect nil dictionary from release. Task-number: QTBUG-13335 --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 85 ++++++++++++++------------ 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index 131f36d..844e38b 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -305,50 +305,53 @@ void QScanThread::getUserConfigurations() SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil); NSDictionary * airportPlist = (NSDictionary *)SCDynamicStoreCopyValue(dynRef, (CFStringRef)[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort", nsInterfaceName]); CFRelease(dynRef); - - NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"]; - - NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"]; - for(NSString *ssidkey in thisSsidarray) { - QString thisSsid = qt_mac_NSStringToQString(ssidkey); - if(!userProfiles.contains(thisSsid)) { - QMap map; - map.insert(thisSsid, qt_mac_NSStringToQString(nsInterfaceName)); - userProfiles.insert(thisSsid, map); + if(airportPlist != nil) { + NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"]; + + NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"]; + for(NSString *ssidkey in thisSsidarray) { + QString thisSsid = qt_mac_NSStringToQString(ssidkey); + if(!userProfiles.contains(thisSsid)) { + QMap map; + map.insert(thisSsid, qt_mac_NSStringToQString(nsInterfaceName)); + userProfiles.insert(thisSsid, map); + } } + CFRelease(airportPlist); } - CFRelease(airportPlist); // 802.1X user profiles QString userProfilePath = QDir::homePath() + "/Library/Preferences/com.apple.eap.profiles.plist"; NSDictionary* eapDict = [[[NSDictionary alloc] initWithContentsOfFile:qt_mac_QStringToNSString(userProfilePath)] autorelease]; - NSString *profileStr= @"Profiles"; - NSString *nameStr = @"UserDefinedName"; - NSString *networkSsidStr = @"Wireless Network"; - for (id profileKey in eapDict) { - if ([profileStr isEqualToString:profileKey]) { - NSDictionary *itemDict = [eapDict objectForKey:profileKey]; - for (id itemKey in itemDict) { - - NSInteger dictSize = [itemKey count]; - id objects[dictSize]; - id keys[dictSize]; - - [itemKey getObjects:objects andKeys:keys]; - QString networkName; - QString ssid; - for(int i = 0; i < dictSize; i++) { - if([nameStr isEqualToString:keys[i]]) { - networkName = qt_mac_NSStringToQString(objects[i]); - } - if([networkSsidStr isEqualToString:keys[i]]) { - ssid = qt_mac_NSStringToQString(objects[i]); - } - if(!userProfiles.contains(networkName) - && !ssid.isEmpty()) { - QMap map; - map.insert(ssid, qt_mac_NSStringToQString(nsInterfaceName)); - userProfiles.insert(networkName, map); + if(eapDict != nil) { + NSString *profileStr= @"Profiles"; + NSString *nameStr = @"UserDefinedName"; + NSString *networkSsidStr = @"Wireless Network"; + for (id profileKey in eapDict) { + if ([profileStr isEqualToString:profileKey]) { + NSDictionary *itemDict = [eapDict objectForKey:profileKey]; + for (id itemKey in itemDict) { + + NSInteger dictSize = [itemKey count]; + id objects[dictSize]; + id keys[dictSize]; + + [itemKey getObjects:objects andKeys:keys]; + QString networkName; + QString ssid; + for(int i = 0; i < dictSize; i++) { + if([nameStr isEqualToString:keys[i]]) { + networkName = qt_mac_NSStringToQString(objects[i]); + } + if([networkSsidStr isEqualToString:keys[i]]) { + ssid = qt_mac_NSStringToQString(objects[i]); + } + if(!userProfiles.contains(networkName) + && !ssid.isEmpty()) { + QMap map; + map.insert(ssid, qt_mac_NSStringToQString(nsInterfaceName)); + userProfiles.insert(networkName, map); + } } } } @@ -855,6 +858,8 @@ quint64 QCoreWlanEngine::startTime(const QString &id) NSString *filePath = @"/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist"; NSDictionary* plistDict = [[[NSDictionary alloc] initWithContentsOfFile:filePath] autorelease]; + if(plistDict == nil) + return timestamp; NSString *input = @"KnownNetworks"; NSString *timeStampStr = @"_timeStamp"; @@ -864,9 +869,13 @@ quint64 QCoreWlanEngine::startTime(const QString &id) if ([input isEqualToString:key]) { NSDictionary *knownNetworksDict = [plistDict objectForKey:key]; + if(knownNetworksDict == nil) + return timestamp; for (id networkKey in knownNetworksDict) { bool isFound = false; NSDictionary *itemDict = [knownNetworksDict objectForKey:networkKey]; + if(itemDict == nil) + return timestamp; NSInteger dictSize = [itemDict count]; id objects[dictSize]; id keys[dictSize]; -- cgit v0.12 From 82ff6626eaabbaed83f3cdfc429a2d011701ba03 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Fri, 3 Sep 2010 11:48:55 +0200 Subject: Doc: Adds line about non-support for Webkit on Solaris --- doc/src/platforms/compiler-notes.qdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index c6ecd68..3870e8f 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -68,7 +68,7 @@ \endtable * WebKit is only supported as a dynamically built library. Static linkage is not supported. - + \target GCC \section1 GCC @@ -115,6 +115,7 @@ \section2 Solaris Please use GCC 3.4.2 or later. + Please not that WebKit is not supported for Solaris, regardless of which compiler is used. \section2 Mac OS X -- cgit v0.12 From 884f15e533eea8426e71af8ac61e7233357b103c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Sep 2010 11:51:50 +0200 Subject: Accept empty authority segments in QUrl as different from not-present See the task for discussion on why this is necessary and why it is correct from the point of view of the RFC defining URIs. Task-number: QTBUG-8701 Patch-by: Marja Hassinen Signed-Off-By: Thiago Macieira --- src/corelib/io/qurl.cpp | 2 +- tests/auto/qurl/tst_qurl.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 79a8ce4..f57a402 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5610,7 +5610,7 @@ QString QUrl::toString(FormattingOptions options) const if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority) { bool doFileScheme = d->scheme == QLatin1String("file") && ourPath.startsWith(QLatin1Char('/')); QString tmp = d->authority(options); - if (!tmp.isEmpty() || doFileScheme) { + if (!tmp.isNull() || doFileScheme) { if (doFileScheme && !ourPath.startsWith(QLatin1Char('/'))) url += QLatin1Char('/'); url += QLatin1String("//"); diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 820e32d..370bd13 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -194,6 +194,7 @@ private slots: void task_199967(); void task_240612(); void taskQTBUG_6962(); + void taskQTBUG_8701(); #ifdef QT3_SUPPORT void dirPath(); @@ -3912,5 +3913,17 @@ void tst_QUrl::taskQTBUG_6962() QCOMPARE(url.authority(), QString()); } +void tst_QUrl::taskQTBUG_8701() +{ + //bug 8701: foo:///bar mangled to foo:/bar + QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar"); + + QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString()); + QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString()); + + QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString()); // fails + QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString()); +} + QTEST_MAIN(tst_QUrl) #include "tst_qurl.moc" -- cgit v0.12 From 78381dbc9701015aef43736fb7d22cf6e66984c7 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Fri, 3 Sep 2010 13:37:56 +0200 Subject: Doc: Fixing links on index page and corecting HTML in the template. --- doc/src/index.qdoc | 2 +- tools/qdoc3/test/qt-html-templates.qdocconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index e45892f..77856ec 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -99,7 +99,7 @@
  • Qt Linguist
  • Qt Assistant
  • Qt qmake
  • -
  • Qt Simulator
  • +
  • Qt Simulator
  • Eclipse Integration
  • Add-On Products and Services
  • Virtual Framebuffer
  • diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 8d4d27f..ed5ee17 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -171,5 +171,5 @@ HTML.footer = " \n" \ " \n" \ " \n" \ "
    \n" \ - "
    \n" \ + " \n" \ " \n" -- cgit v0.12 From a2203d680d8a24113daab08046154c2c5234df4f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 3 Sep 2010 14:23:33 +0200 Subject: Doc: Fixed namespaced Qt build breakage in the model/view tutorial. Reviewed-by: hjk --- examples/tutorials/modelview/3_changingmodel/mymodel.h | 3 +-- examples/tutorials/modelview/5_edit/mainwindow.h | 3 +-- examples/tutorials/modelview/6_treeview/mainwindow.h | 6 ++---- examples/tutorials/modelview/7_selections/mainwindow.h | 6 ++---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h index 47b026e..87c3dba 100755 --- a/examples/tutorials/modelview/3_changingmodel/mymodel.h +++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h @@ -42,8 +42,7 @@ #define MYMODEL_H #include - -class QTimer; // forward declaration +#include class MyModel : public QAbstractTableModel { diff --git a/examples/tutorials/modelview/5_edit/mainwindow.h b/examples/tutorials/modelview/5_edit/mainwindow.h index 1d49f47..ac5b77b 100755 --- a/examples/tutorials/modelview/5_edit/mainwindow.h +++ b/examples/tutorials/modelview/5_edit/mainwindow.h @@ -42,8 +42,7 @@ #define MAINWINDOW_H #include - -class QTableView; //forward declaration +#include class MainWindow : public QMainWindow { diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h index fb8de79..4c4ddb0 100755 --- a/examples/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/tutorials/modelview/6_treeview/mainwindow.h @@ -42,10 +42,8 @@ #define MAINWINDOW_H #include - -class QTreeView; //forward declaration -class QStandardItemModel; -class QStandardItem; +#include +#include class MainWindow : public QMainWindow diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h index f2defb5..a8f8488 100755 --- a/examples/tutorials/modelview/7_selections/mainwindow.h +++ b/examples/tutorials/modelview/7_selections/mainwindow.h @@ -42,10 +42,8 @@ #define MAINWINDOW_H #include - -class QTreeView; //forward declaration -class QStandardItemModel; -class QItemSelection; +#include +#include class MainWindow : public QMainWindow -- cgit v0.12 From 0c7d5d106152924dedd822da8c90d9f3247a9947 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 3 Sep 2010 13:45:45 +0200 Subject: Symbian: Disable IPv6 for now OpenC does not fully support IPv6, therefore we cannot either. Reviewed-by: ogoffart --- configure | 10 +++++++--- tools/configure/configureapp.cpp | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configure b/configure index f564aec..07b7b97 100755 --- a/configure +++ b/configure @@ -6203,9 +6203,13 @@ fi # find if the platform supports IPv6 if [ "$CFG_IPV6" != "no" ]; then - if [ "$XPLATFORM" = "symbian-sbsv2" ]; then - #IPV6 should always be enabled for Symbian release - CFG_IPV6=yes + # + # We accidently enabled IPv6 for Qt Symbian in 4.6.x. However the underlying OpenC does not fully support IPV6. + # Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt + # symbian socket engine. + # + if echo "$XPLATFORM" | grep symbian > /dev/null; then + CFG_IPV6=no elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then CFG_IPV6=yes else diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 89d3ef0..0d0729b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1517,6 +1517,10 @@ void Configure::applySpecSpecifics() dictionary[ "QT3SUPPORT" ] = "no"; dictionary[ "OPENGL" ] = "no"; dictionary[ "OPENSSL" ] = "yes"; + // We accidently enabled IPv6 for Qt Symbian in 4.6.x. However the underlying OpenC does not fully support IPV6. + // Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt + // symbian socket engine. + dictionary[ "IPV6" ] = "no"; dictionary[ "STL" ] = "yes"; dictionary[ "EXCEPTIONS" ] = "yes"; dictionary[ "RTTI" ] = "yes"; -- cgit v0.12 From 5674feddf5471abda134c05ac982b9a48ae08acb Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Fri, 3 Sep 2010 08:11:02 -0500 Subject: Fix dependencies so JOM will handle parallellization properly JOM wouldn't wait for qmake_pch.obj to finish before starting the other compiles. Reviewed-by: trustme --- qmake/Makefile.win32 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 01387bf..4565c22 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -55,7 +55,7 @@ ADDCLEAN = vc60.pdb vc70.pdb qmake.pdb qmake.ilk !ENDIF #qmake code -OBJS = qmake_pch.obj project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \ +OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \ option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \ makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \ borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \ @@ -116,12 +116,13 @@ QTOBJS= \ first all: qmake.exe qmake.exe: $(OBJS) $(QTOBJS) - $(LINKQMAKE) + $(LINKQMAKE) qmake_pch.obj -copy qmake.exe $(BUILD_PATH)\bin\qmake.exe clean:: -del $(QTOBJS) -del $(OBJS) + -del qmake_pch.obj -del qmake_pch.pch -del vc60.pdb -del vc70.pdb @@ -144,6 +145,10 @@ distclean:: clean .cxx.obj: $(CXX) $(CXXFLAGS) $< +$(OBJS): qmake_pch.obj + +$(QTOBJS): qmake_pch.obj + qmake_pch.obj: $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP qmake_pch.h -- cgit v0.12 From 462f9289fcd1588e5569303e451cc49b515e73c4 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 3 Sep 2010 15:35:00 +0200 Subject: rebuild configure.exe after change 0c7d5d10615, "Symbian: Disable IPv6 for now" --- configure.exe | Bin 1320960 -> 1321472 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/configure.exe b/configure.exe index aba5872..18c9004 100755 Binary files a/configure.exe and b/configure.exe differ -- cgit v0.12 From 67db4b23e924ed5091f609db7d6864c268176044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 3 Sep 2010 19:12:23 +0200 Subject: Recognize @, #, $ and ` as word separators The behavior of Qt with these characters was different than other toolkits, which annoys some people. Task-number: QTCREATORBUG-2241 Reviewed-by: mae --- src/gui/text/qtextengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 119217a..05de8f5 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2263,6 +2263,9 @@ bool QTextEngine::atWordSeparator(int position) const case ',': case '?': case '!': + case '@': + case '#': + case '$': case ':': case ';': case '-': @@ -2283,6 +2286,7 @@ bool QTextEngine::atWordSeparator(int position) const case '*': case '\'': case '"': + case '`': case '~': case '|': return true; -- cgit v0.12 From c235e347b53500b6534a3e2c1cacc05d7160f98f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 6 Sep 2010 12:30:29 +1000 Subject: Ensure all image state is updated before emitting changed signals. statusChanged() was emitted before the size was set, so if you did, e.g. if (width != 0) in onStatusChanged it would get the wrong width. Task-number: QT-3820 Reviewed-by: Yann Bodson --- src/declarative/graphicsitems/qdeclarativeimagebase.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp index 416604b..482906e 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp @@ -139,9 +139,9 @@ void QDeclarativeImageBase::load() d->status = Null; setImplicitWidth(0); setImplicitHeight(0); - emit statusChanged(d->status); d->sourcesize.setWidth(0); d->sourcesize.setHeight(0); + emit statusChanged(d->status); emit sourceSizeChanged(); pixmapChange(); update(); @@ -182,19 +182,20 @@ void QDeclarativeImageBase::requestFinished() } else { d->status = Ready; } - emit statusChanged(d->status); + + d->progress = 1.0; setImplicitWidth(d->pix.width()); setImplicitHeight(d->pix.height()); - d->progress = 1.0; - emit progressChanged(d->progress); - if (d->sourcesize.width() != d->pix.width() || d->sourcesize.height() != d->pix.height()) { d->sourcesize.setWidth(d->pix.width()); d->sourcesize.setHeight(d->pix.height()); emit sourceSizeChanged(); } + + emit statusChanged(d->status); + emit progressChanged(d->progress); pixmapChange(); update(); } -- cgit v0.12 From 49e763dd2aab74e28080aae5fddee4ce5fc015f5 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Mon, 6 Sep 2010 12:35:00 +1000 Subject: Do not reset sourceSize when changing image source url. Task-number: QTBUG-13383 --- src/declarative/graphicsitems/qdeclarativeimagebase.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp index 482906e..f0293d6 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp @@ -139,10 +139,7 @@ void QDeclarativeImageBase::load() d->status = Null; setImplicitWidth(0); setImplicitHeight(0); - d->sourcesize.setWidth(0); - d->sourcesize.setHeight(0); emit statusChanged(d->status); - emit sourceSizeChanged(); pixmapChange(); update(); } else { -- cgit v0.12 From da6b87c691f37e4417ff526d863a7dec652e9189 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 6 Sep 2010 13:44:28 +1000 Subject: Ensure slider is updated when screen size changes. Task-number: QT-3718 --- demos/declarative/flickr/common/Slider.qml | 22 ++++++++++++++++++---- demos/declarative/flickr/mobile/ImageDetails.qml | 22 ++++++++++++++++++++-- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/demos/declarative/flickr/common/Slider.qml b/demos/declarative/flickr/common/Slider.qml index 4353f8d..faa2e5f 100644 --- a/demos/declarative/flickr/common/Slider.qml +++ b/demos/declarative/flickr/common/Slider.qml @@ -45,11 +45,24 @@ Item { id: slider; width: 400; height: 16 // value is read/write. - property real value - onValueChanged: { handle.x = 2 + (value - minimum) * slider.xMax / (maximum - minimum); } + property real value: 1 + onValueChanged: updatePos(); property real maximum: 1 property real minimum: 1 - property int xMax: slider.width - handle.width - 4 + property int xMax: width - handle.width - 4 + onXMaxChanged: updatePos(); + onMinimumChanged: updatePos(); + + function updatePos() { + if (maximum > minimum) { + var pos = 2 + (value - minimum) * slider.xMax / (maximum - minimum); + pos = Math.min(pos, width - handle.width - 2); + pos = Math.max(pos, 2); + handle.x = pos; + } else { + handle.x = 2; + } + } Rectangle { anchors.fill: parent @@ -62,13 +75,14 @@ Item { Rectangle { id: handle; smooth: true - x: slider.width / 2 - handle.width / 2; y: 2; width: 30; height: slider.height-4; radius: 6 + y: 2; width: 30; height: slider.height-4; radius: 6 gradient: Gradient { GradientStop { position: 0.0; color: "lightgray" } GradientStop { position: 1.0; color: "gray" } } MouseArea { + id: mouse anchors.fill: parent; drag.target: parent drag.axis: Drag.XAxis; drag.minimumX: 2; drag.maximumX: slider.xMax+2 onPositionChanged: { value = (maximum - minimum) * (handle.x-2) / slider.xMax + minimum; } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index ff902ce..7441ecc 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -104,6 +104,24 @@ Flipable { id: flickable; anchors.fill: parent; clip: true contentWidth: imageContainer.width; contentHeight: imageContainer.height + function updateMinimumScale() { + if (bigImage.status == Image.Ready && bigImage.width != 0) { + slider.minimum = Math.min(flickable.width / bigImage.width, flickable.height / bigImage.height); + if (bigImage.width * slider.value > flickable.width) { + var xoff = (flickable.width/2 + flickable.contentX) * slider.value / prevScale; + flickable.contentX = xoff - flickable.width/2; + } + if (bigImage.height * slider.value > flickable.height) { + var yoff = (flickable.height/2 + flickable.contentY) * slider.value / prevScale; + flickable.contentY = yoff - flickable.height/2; + } + prevScale = slider.value; + } + } + + onWidthChanged: updateMinimumScale() + onHeightChanged: updateMinimumScale() + Item { id: imageContainer width: Math.max(bigImage.width * bigImage.scale, flickable.width); @@ -114,8 +132,8 @@ Flipable { anchors.centerIn: parent; smooth: !flickable.movingVertically onStatusChanged : { // Default scale shows the entire image. - if (status == Image.Ready && width != 0) { - slider.minimum = Math.min(flickable.width / width, flickable.height / height); + if (bigImage.status == Image.Ready && bigImage.width != 0) { + slider.minimum = Math.min(flickable.width / bigImage.width, flickable.height / bigImage.height); prevScale = Math.min(slider.minimum, 1); slider.value = prevScale; } -- cgit v0.12 From 00f34afa24a229915d1f2b00c02b93f5890fab3f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 6 Sep 2010 15:21:25 +1000 Subject: Ensure WebView gets focus when an editable node is clicked on. Task-number: QTBUG-13342 Reviewed-by: Michael Brasser --- src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index c1ca23d..2d74d4b 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -91,7 +91,6 @@ GraphicsWebView::GraphicsWebView(QDeclarativeWebView* parent) void GraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* event) { - setFocus(); pressPoint = event->pos(); if (pressTime) { pressTimer.start(pressTime, this); @@ -101,6 +100,11 @@ void GraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* event) parent->setKeepMouseGrab(true); } QGraphicsWebView::mousePressEvent(event); + + QWebHitTestResult hit = page()->mainFrame()->hitTestContent(pressPoint.toPoint()); + if (hit.isContentEditable()) + parent->forceActiveFocus(); + setFocus(); } void GraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) -- cgit v0.12 From 4c6b58965be23b19fb39acef02c674edc90741c4 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 6 Sep 2010 16:06:56 +1000 Subject: Small cleanup --- src/declarative/qml/qdeclarativecompiler.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 61ea9c8..e55dc92 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1764,9 +1764,7 @@ bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *pr Q_ASSERT(prop->index != -1); if (QDeclarativeValueTypeFactory::isValueType(prop->type)) { - QDeclarativeEnginePrivate *ep = - static_cast(QObjectPrivate::get(engine)); - if (prop->type >= 0 /* QVariant == -1 */ && ep->valueTypes[prop->type]) { + if (prop->type >= 0 /* QVariant == -1 */ && enginePrivate->valueTypes[prop->type]) { if (prop->values.count()) { if (prop->values.at(0)->location < prop->value->location) { @@ -1780,7 +1778,7 @@ bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *pr COMPILE_EXCEPTION(prop, tr( "Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop->name))); } - COMPILE_CHECK(buildValueTypeProperty(ep->valueTypes[prop->type], + COMPILE_CHECK(buildValueTypeProperty(enginePrivate->valueTypes[prop->type], prop->value, obj, ctxt.incr())); obj->addValueTypeProperty(prop); } else { @@ -2211,7 +2209,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) if (propName.at(0).isUpper()) COMPILE_EXCEPTION(&prop, tr("Property names cannot begin with an upper case letter")); - if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(propName)) + if (enginePrivate->globalClass->illegalNames().contains(propName)) COMPILE_EXCEPTION(&prop, tr("Illegal property name")); propNames.insert(prop.name); @@ -2224,7 +2222,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) QString nameStr = QString::fromUtf8(name); if (nameStr.at(0).isUpper()) COMPILE_EXCEPTION(obj, tr("Signal names cannot begin with an upper case letter")); - if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(nameStr)) + if (enginePrivate->globalClass->illegalNames().contains(nameStr)) COMPILE_EXCEPTION(obj, tr("Illegal signal name")); methodNames.insert(name); } @@ -2235,7 +2233,7 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) QString nameStr = QString::fromUtf8(name); if (nameStr.at(0).isUpper()) COMPILE_EXCEPTION(obj, tr("Method names cannot begin with an upper case letter")); - if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(nameStr)) + if (enginePrivate->globalClass->illegalNames().contains(nameStr)) COMPILE_EXCEPTION(obj, tr("Illegal method name")); methodNames.insert(name); } -- cgit v0.12 From 35a51442ed21f58c06b21293eeb56e843251ee82 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 6 Sep 2010 16:35:38 +1000 Subject: Fix PathView item position on insertion and removal. Ensure the offset is adjusted to account for the new or removed items. Also minor optimizations to delegate updates. Task-number: QTBUG-13416 --- .../graphicsitems/qdeclarativepathview.cpp | 285 ++++++++++++--------- .../graphicsitems/qdeclarativepathview_p.h | 1 + .../graphicsitems/qdeclarativepathview_p_p.h | 12 +- .../tst_qdeclarativepathview.cpp | 19 +- 4 files changed, 181 insertions(+), 136 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 4b97505..de3f9fa 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -67,7 +67,7 @@ inline qreal qmlMod(qreal x, qreal y) static QDeclarativeOpenMetaObjectType *qPathViewAttachedType = 0; QDeclarativePathViewAttached::QDeclarativePathViewAttached(QObject *parent) -: QObject(parent), m_view(0), m_onPath(false), m_isCurrent(false) +: QObject(parent), m_percent(-1), m_view(0), m_onPath(false), m_isCurrent(false) { if (qPathViewAttachedType) { m_metaobject = new QDeclarativeOpenMetaObject(this, qPathViewAttachedType); @@ -164,8 +164,8 @@ void QDeclarativePathViewPrivate::clear() void QDeclarativePathViewPrivate::updateMappedRange() { - if (model && pathItems != -1 && pathItems < model->count()) - mappedRange = qreal(pathItems)/model->count(); + if (model && pathItems != -1 && pathItems < modelCount) + mappedRange = qreal(pathItems)/modelCount; else mappedRange = 1.0; } @@ -174,13 +174,13 @@ qreal QDeclarativePathViewPrivate::positionOfIndex(qreal index) const { qreal pos = -1.0; - if (model && index >= 0 && index < model->count()) { + if (model && index >= 0 && index < modelCount) { qreal start = 0.0; if (haveHighlightRange && highlightRangeMode != QDeclarativePathView::NoHighlightRange) start = highlightRangeStart; qreal globalPos = index + offset; - globalPos = qmlMod(globalPos, qreal(model->count())) / model->count(); - if (pathItems != -1 && pathItems < model->count()) { + globalPos = qmlMod(globalPos, qreal(modelCount)) / modelCount; + if (pathItems != -1 && pathItems < modelCount) { globalPos += start * mappedRange; globalPos = qmlMod(globalPos, 1.0); if (globalPos < mappedRange) @@ -242,21 +242,22 @@ void QDeclarativePathViewPrivate::updateHighlight() } else { qreal target = currentIndex; + offsetAdj = 0.0; tl.reset(moveHighlight); moveHighlight.setValue(highlightPosition); const int duration = highlightMoveDuration; - if (target - highlightPosition > model->count()/2) { + if (target - highlightPosition > modelCount/2) { highlightUp = false; - qreal distance = model->count() - target + highlightPosition; + qreal distance = modelCount - target + highlightPosition; tl.move(moveHighlight, 0.0, QEasingCurve(QEasingCurve::InQuad), int(duration * highlightPosition / distance)); - tl.set(moveHighlight, model->count()-0.01); - tl.move(moveHighlight, target, QEasingCurve(QEasingCurve::OutQuad), int(duration * (model->count()-target) / distance)); - } else if (target - highlightPosition <= -model->count()/2) { + tl.set(moveHighlight, modelCount-0.01); + tl.move(moveHighlight, target, QEasingCurve(QEasingCurve::OutQuad), int(duration * (modelCount-target) / distance)); + } else if (target - highlightPosition <= -modelCount/2) { highlightUp = true; - qreal distance = model->count() - highlightPosition + target; - tl.move(moveHighlight, model->count()-0.01, QEasingCurve(QEasingCurve::InQuad), int(duration * (model->count()-highlightPosition) / distance)); + qreal distance = modelCount - highlightPosition + target; + tl.move(moveHighlight, modelCount-0.01, QEasingCurve(QEasingCurve::InQuad), int(duration * (modelCount-highlightPosition) / distance)); tl.set(moveHighlight, 0.0); tl.move(moveHighlight, target, QEasingCurve(QEasingCurve::OutQuad), int(duration * target / distance)); } else { @@ -277,7 +278,7 @@ void QDeclarativePathViewPrivate::setHighlightPosition(qreal pos) end = highlightRangeEnd; } - qreal range = qreal(model->count()); + qreal range = qreal(modelCount); // calc normalized position of highlight relative to offset qreal relativeHighlight = qmlMod(pos + offset, range) / range; @@ -300,6 +301,9 @@ void QDeclarativePathViewPrivate::setHighlightPosition(qreal pos) void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal percent) { if (QDeclarativePathViewAttached *att = attached(item)) { + if (qFuzzyCompare(att->m_percent, percent)) + return; + att->m_percent = percent; foreach(const QString &attr, path->attributes()) att->setValue(attr.toUtf8(), path->attributeAt(attr, percent)); } @@ -473,17 +477,19 @@ void QDeclarativePathView::setModel(const QVariant &model) if (QDeclarativeVisualDataModel *dataModel = qobject_cast(d->model)) dataModel->setModel(model); } + d->modelCount = 0; if (d->model) { connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int))); connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset())); connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*))); - } - if (d->model->count()) - d->offset = qmlMod(d->offset, qreal(d->model->count())); - if (d->offset < 0) - d->offset = d->model->count() + d->offset; + d->modelCount = d->model->count(); + if (d->model->count()) + d->offset = qmlMod(d->offset, qreal(d->model->count())); + if (d->offset < 0) + d->offset = d->model->count() + d->offset; +} d->regenerate(); d->fixOffset(); emit countChanged(); @@ -497,7 +503,7 @@ void QDeclarativePathView::setModel(const QVariant &model) int QDeclarativePathView::count() const { Q_D(const QDeclarativePathView); - return d->model ? d->model->count() : 0; + return d->model ? d->modelCount : 0; } /*! @@ -545,11 +551,11 @@ int QDeclarativePathView::currentIndex() const void QDeclarativePathView::setCurrentIndex(int idx) { Q_D(QDeclarativePathView); - if (d->model && d->model->count()) - idx = qAbs(idx % d->model->count()); + if (d->model && d->modelCount) + idx = qAbs(idx % d->modelCount); if (d->model && idx != d->currentIndex) { - if (d->model->count()) { - int itemIndex = (d->currentIndex - d->firstIndex + d->model->count()) % d->model->count(); + if (d->modelCount) { + int itemIndex = (d->currentIndex - d->firstIndex + d->modelCount) % d->modelCount; if (itemIndex < d->items.count()) { if (QDeclarativeItem *item = d->items.at(itemIndex)) { if (QDeclarativePathViewAttached *att = d->attached(item)) @@ -560,10 +566,10 @@ void QDeclarativePathView::setCurrentIndex(int idx) d->currentItem = 0; d->moveReason = QDeclarativePathViewPrivate::SetIndex; d->currentIndex = idx; - if (d->model->count()) { + if (d->modelCount) { if (d->haveHighlightRange && d->highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange) d->snapToCurrent(); - int itemIndex = (idx - d->firstIndex + d->model->count()) % d->model->count(); + int itemIndex = (idx - d->firstIndex + d->modelCount) % d->modelCount; if (itemIndex < d->items.count()) { d->currentItem = d->items.at(itemIndex); d->currentItem->setFocus(true); @@ -600,10 +606,10 @@ void QDeclarativePathView::incrementCurrentIndex() void QDeclarativePathView::decrementCurrentIndex() { Q_D(QDeclarativePathView); - if (d->model && d->model->count()) { + if (d->model && d->modelCount) { int idx = currentIndex()-1; if (idx < 0) - idx = d->model->count() - 1; + idx = d->modelCount - 1; setCurrentIndex(idx); } } @@ -632,9 +638,9 @@ void QDeclarativePathViewPrivate::setOffset(qreal o) Q_Q(QDeclarativePathView); if (offset != o) { if (isValid() && q->isComponentComplete()) { - offset = qmlMod(o, qreal(model->count())); + offset = qmlMod(o, qreal(modelCount)); if (offset < 0) - offset += qreal(model->count()); + offset += qreal(modelCount); q->refill(); } else { offset = o; @@ -643,6 +649,11 @@ void QDeclarativePathViewPrivate::setOffset(qreal o) } } +void QDeclarativePathViewPrivate::setAdjustedOffset(qreal o) +{ + setOffset(o+offsetAdj); +} + /*! \qmlproperty Component PathView::highlight This property holds the component to use as the highlight. @@ -705,6 +716,8 @@ QDeclarativeItem *QDeclarativePathView::highlightItem() These properties set the preferred range of the highlight (current item) within the view. The preferred values must be in the range 0.0-1.0. + If highlightRangeMode is set to \e PathView.NoHighlightRange + If highlightRangeMode is set to \e PathView.ApplyRange the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the path @@ -1071,14 +1084,14 @@ void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) d->moveReason = QDeclarativePathViewPrivate::Mouse; qreal newPc; d->pointNear(event->pos(), &newPc); - qreal diff = (newPc - d->startPc)*d->model->count()*d->mappedRange; + qreal diff = (newPc - d->startPc)*d->modelCount*d->mappedRange; if (diff) { setOffset(d->offset + diff); - if (diff > d->model->count()/2) - diff -= d->model->count(); - else if (diff < -d->model->count()/2) - diff += d->model->count(); + if (diff > d->modelCount/2) + diff -= d->modelCount; + else if (diff < -d->modelCount/2) + diff += d->modelCount; d->lastElapsed = QDeclarativeItemPrivate::restart(d->lastPosTime); d->lastDist = diff; @@ -1102,15 +1115,15 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) qreal elapsed = qreal(d->lastElapsed + QDeclarativeItemPrivate::elapsed(d->lastPosTime)) / 1000.; qreal velocity = elapsed > 0. ? d->lastDist / elapsed : 0; - if (d->model && d->model->count() && qAbs(velocity) > 1.) { - qreal count = d->pathItems == -1 ? d->model->count() : d->pathItems; + if (d->model && d->modelCount && qAbs(velocity) > 1.) { + qreal count = d->pathItems == -1 ? d->modelCount : d->pathItems; if (qAbs(velocity) > count * 2) // limit velocity velocity = (velocity > 0 ? count : -count) * 2; // Calculate the distance to be travelled qreal v2 = velocity*velocity; qreal accel = d->deceleration/10; // + 0.25 to encourage moving at least one item in the flick direction - qreal dist = qMin(qreal(d->model->count()-1), qreal(v2 / (accel * 2.0) + 0.25)); + qreal dist = qMin(qreal(d->modelCount-1), qreal(v2 / (accel * 2.0) + 0.25)); if (d->haveHighlightRange && d->highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange) { // round to nearest item. if (velocity > 0.) @@ -1125,6 +1138,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) accel = v2 / (2.0f * qAbs(dist)); } } + d->offsetAdj = 0.0; d->moveOffset.setValue(d->offset); d->tl.accel(d->moveOffset, velocity, accel, dist); d->tl.callback(QDeclarativeTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d)); @@ -1260,79 +1274,81 @@ void QDeclarativePathView::refill() d->updateItem(item, 1.0); d->releaseItem(item); if (it == d->items.begin()) { - if (++d->firstIndex >= d->model->count()) + if (++d->firstIndex >= d->modelCount) d->firstIndex = 0; } it = d->items.erase(it); } ++idx; - if (idx >= d->model->count()) + if (idx >= d->modelCount) idx = 0; } - // add items to beginning and end - int count = d->pathItems == -1 ? d->model->count() : qMin(d->pathItems, d->model->count()); - if (d->items.count() < count) { - int idx = qRound(d->model->count() - d->offset) % d->model->count(); - qreal startPos = 0.0; - if (d->haveHighlightRange && d->highlightRangeMode != QDeclarativePathView::NoHighlightRange) - startPos = d->highlightRangeStart; - if (d->firstIndex >= 0) { - startPos = d->positionOfIndex(d->firstIndex); - idx = (d->firstIndex + d->items.count()) % d->model->count(); - } - qreal pos = d->positionOfIndex(idx); - while ((pos > startPos || !d->items.count()) && d->items.count() < count) { -// qDebug() << "append" << idx; - QDeclarativeItem *item = d->getItem(idx); - if (d->model->completePending()) - item->setZValue(idx+1); - if (d->currentIndex == idx) { - item->setFocus(true); - if (QDeclarativePathViewAttached *att = d->attached(item)) - att->setIsCurrentItem(true); - currentVisible = true; - d->currentItemOffset = pos; - d->currentItem = item; + if (d->modelCount) { + // add items to beginning and end + int count = d->pathItems == -1 ? d->modelCount : qMin(d->pathItems, d->modelCount); + if (d->items.count() < count) { + int idx = qRound(d->modelCount - d->offset) % d->modelCount; + qreal startPos = 0.0; + if (d->haveHighlightRange && d->highlightRangeMode != QDeclarativePathView::NoHighlightRange) + startPos = d->highlightRangeStart; + if (d->firstIndex >= 0) { + startPos = d->positionOfIndex(d->firstIndex); + idx = (d->firstIndex + d->items.count()) % d->modelCount; } - if (d->items.count() == 0) - d->firstIndex = idx; - d->items.append(item); - d->updateItem(item, pos); - if (d->model->completePending()) - d->model->completeItem(); - ++idx; - if (idx >= d->model->count()) - idx = 0; - pos = d->positionOfIndex(idx); - } - - idx = d->firstIndex - 1; - if (idx < 0) - idx = d->model->count() - 1; - pos = d->positionOfIndex(idx); - while (pos >= 0.0 && pos < startPos) { -// qDebug() << "prepend" << idx; - QDeclarativeItem *item = d->getItem(idx); - if (d->model->completePending()) - item->setZValue(idx+1); - if (d->currentIndex == idx) { - item->setFocus(true); - if (QDeclarativePathViewAttached *att = d->attached(item)) - att->setIsCurrentItem(true); - currentVisible = true; - d->currentItemOffset = pos; - d->currentItem = item; + qreal pos = d->positionOfIndex(idx); + while ((pos > startPos || !d->items.count()) && d->items.count() < count) { + // qDebug() << "append" << idx; + QDeclarativeItem *item = d->getItem(idx); + if (d->model->completePending()) + item->setZValue(idx+1); + if (d->currentIndex == idx) { + item->setFocus(true); + if (QDeclarativePathViewAttached *att = d->attached(item)) + att->setIsCurrentItem(true); + currentVisible = true; + d->currentItemOffset = pos; + d->currentItem = item; + } + if (d->items.count() == 0) + d->firstIndex = idx; + d->items.append(item); + d->updateItem(item, pos); + if (d->model->completePending()) + d->model->completeItem(); + ++idx; + if (idx >= d->modelCount) + idx = 0; + pos = d->positionOfIndex(idx); } - d->items.prepend(item); - d->updateItem(item, pos); - if (d->model->completePending()) - d->model->completeItem(); - d->firstIndex = idx; + idx = d->firstIndex - 1; if (idx < 0) - idx = d->model->count() - 1; + idx = d->modelCount - 1; pos = d->positionOfIndex(idx); + while (pos >= 0.0 && pos < startPos) { + // qDebug() << "prepend" << idx; + QDeclarativeItem *item = d->getItem(idx); + if (d->model->completePending()) + item->setZValue(idx+1); + if (d->currentIndex == idx) { + item->setFocus(true); + if (QDeclarativePathViewAttached *att = d->attached(item)) + att->setIsCurrentItem(true); + currentVisible = true; + d->currentItemOffset = pos; + d->currentItem = item; + } + d->items.prepend(item); + d->updateItem(item, pos); + if (d->model->completePending()) + d->model->completeItem(); + d->firstIndex = idx; + idx = d->firstIndex - 1; + if (idx < 0) + idx = d->modelCount - 1; + pos = d->positionOfIndex(idx); + } } } @@ -1348,6 +1364,8 @@ void QDeclarativePathView::refill() if (QDeclarativePathViewAttached *att = d->attached(d->highlightItem)) att->setOnPath(currentVisible); } + while (d->itemCache.count()) + d->releaseItem(d->itemCache.takeLast()); } void QDeclarativePathView::itemsInserted(int modelIndex, int count) @@ -1357,16 +1375,25 @@ void QDeclarativePathView::itemsInserted(int modelIndex, int count) if (!d->isValid() || !isComponentComplete()) return; - QList removedItems = d->items; + d->itemCache += d->items; d->items.clear(); if (modelIndex <= d->currentIndex) { d->currentIndex += count; emit currentIndexChanged(); + } else if (d->offset != 0) { + d->offset += count; + d->offsetAdj += count; + } + + d->modelCount = d->model->count(); + if (d->flicking || d->moving) { + d->regenerate(); + d->updateCurrent(); + } else { + d->firstIndex = -1; + d->updateMappedRange(); + d->scheduleLayout(); } - d->regenerate(); - while (removedItems.count()) - d->releaseItem(removedItems.takeLast()); - d->updateCurrent(); emit countChanged(); } @@ -1374,7 +1401,7 @@ void QDeclarativePathView::itemsRemoved(int modelIndex, int count) { //XXX support animated removal Q_D(QDeclarativePathView); - if (!d->isValid() || !isComponentComplete()) + if (!d->model || !d->modelCount || !d->model->isValid() || !d->path || !isComponentComplete()) return; // fix current @@ -1384,7 +1411,7 @@ void QDeclarativePathView::itemsRemoved(int modelIndex, int count) currentChanged = true; } else if (d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count) { // current item has been removed. - d->currentIndex = qMin(modelIndex, d->model->count()-1); + d->currentIndex = qMin(modelIndex, d->modelCount-1); if (d->currentItem) { if (QDeclarativePathViewAttached *att = d->attached(d->currentItem)) att->setIsCurrentItem(true); @@ -1392,15 +1419,21 @@ void QDeclarativePathView::itemsRemoved(int modelIndex, int count) currentChanged = true; } - QList removedItems = d->items; + d->itemCache += d->items; d->items.clear(); - if (d->offset >= d->model->count()) - d->offset = d->model->count() - 1; + if (modelIndex > d->currentIndex) { + if (d->offset >= count) { + d->offset -= count; + d->offsetAdj -= count; + } + } + + d->modelCount = d->model->count(); d->regenerate(); - while (removedItems.count()) - d->releaseItem(removedItems.takeLast()); d->updateCurrent(); + if (!d->modelCount) + update(); if (currentChanged) emit currentIndexChanged(); emit countChanged(); @@ -1431,6 +1464,7 @@ void QDeclarativePathView::itemsMoved(int /*from*/, int /*to*/, int /*count*/) void QDeclarativePathView::modelReset() { Q_D(QDeclarativePathView); + d->modelCount = d->model->count(); d->regenerate(); emit countChanged(); } @@ -1488,11 +1522,11 @@ int QDeclarativePathViewPrivate::calcCurrentIndex() { int current = -1; if (model && items.count()) { - offset = qmlMod(offset, model->count()); + offset = qmlMod(offset, modelCount); if (offset < 0) - offset += model->count(); - current = qRound(qAbs(qmlMod(model->count() - offset, model->count()))); - current = current % model->count(); + offset += modelCount; + current = qRound(qAbs(qmlMod(modelCount - offset, modelCount))); + current = current % modelCount; } return current; @@ -1508,7 +1542,7 @@ void QDeclarativePathViewPrivate::updateCurrent() int idx = calcCurrentIndex(); if (model && idx != currentIndex) { - int itemIndex = (currentIndex - firstIndex + model->count()) % model->count(); + int itemIndex = (currentIndex - firstIndex + modelCount) % modelCount; if (itemIndex < items.count()) { if (QDeclarativeItem *item = items.at(itemIndex)) { if (QDeclarativePathViewAttached *att = attached(item)) @@ -1517,7 +1551,7 @@ void QDeclarativePathViewPrivate::updateCurrent() } currentIndex = idx; currentItem = 0; - itemIndex = (idx - firstIndex + model->count()) % model->count(); + itemIndex = (idx - firstIndex + modelCount) % modelCount; if (itemIndex < items.count()) { currentItem = items.at(itemIndex); currentItem->setFocus(true); @@ -1549,25 +1583,26 @@ void QDeclarativePathViewPrivate::fixOffset() void QDeclarativePathViewPrivate::snapToCurrent() { - if (!model || model->count() <= 0) + if (!model || modelCount <= 0) return; - qreal targetOffset = model->count() - currentIndex; + qreal targetOffset = modelCount - currentIndex; moveReason = Other; + offsetAdj = 0.0; tl.reset(moveOffset); moveOffset.setValue(offset); const int duration = highlightMoveDuration; - if (targetOffset - offset > model->count()/2) { - qreal distance = model->count() - targetOffset + offset; + if (targetOffset - offset > modelCount/2) { + qreal distance = modelCount - targetOffset + offset; tl.move(moveOffset, 0.0, QEasingCurve(QEasingCurve::InQuad), int(duration * offset / distance)); - tl.set(moveOffset, model->count()); - tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::OutQuad), int(duration * (model->count()-targetOffset) / distance)); - } else if (targetOffset - offset <= -model->count()/2) { - qreal distance = model->count() - offset + targetOffset; - tl.move(moveOffset, model->count(), QEasingCurve(QEasingCurve::InQuad), int(duration * (model->count()-offset) / distance)); + tl.set(moveOffset, modelCount); + tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::OutQuad), int(duration * (modelCount-targetOffset) / distance)); + } else if (targetOffset - offset <= -modelCount/2) { + qreal distance = modelCount - offset + targetOffset; + tl.move(moveOffset, modelCount, QEasingCurve(QEasingCurve::InQuad), int(duration * (modelCount-offset) / distance)); tl.set(moveOffset, 0.0); tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::OutQuad), int(duration * targetOffset / distance)); } else { diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h index 035a64b..62a8c44 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h @@ -226,6 +226,7 @@ public: emit pathChanged(); } } + qreal m_percent; Q_SIGNALS: void currentItemChanged(); diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h index 9abec2e..dfebe35 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h @@ -75,19 +75,19 @@ class QDeclarativePathViewPrivate : public QDeclarativeItemPrivate, public QDecl public: QDeclarativePathViewPrivate() : path(0), currentIndex(0), currentItemOffset(0.0), startPc(0), lastDist(0) - , lastElapsed(0), mappedRange(1.0) + , lastElapsed(0), offset(0.0), offsetAdj(0.0), mappedRange(1.0) , stealMouse(false), ownModel(false), interactive(true), haveHighlightRange(true) , autoHighlight(true), highlightUp(false), layoutScheduled(false) , moving(false), flicking(false) , dragMargin(0), deceleration(100) - , moveOffset(this, &QDeclarativePathViewPrivate::setOffset) + , moveOffset(this, &QDeclarativePathViewPrivate::setAdjustedOffset) , firstIndex(-1), pathItems(-1), requestedIndex(-1) , moveReason(Other), attType(0), highlightComponent(0), highlightItem(0) , moveHighlight(this, &QDeclarativePathViewPrivate::setHighlightPosition) , highlightPosition(0) , highlightRangeStart(0), highlightRangeEnd(0) , highlightRangeMode(QDeclarativePathView::StrictlyEnforceRange) - , highlightMoveDuration(300) + , highlightMoveDuration(300), modelCount(0) { } @@ -96,6 +96,8 @@ public: void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) { if ((newGeometry.size() != oldGeometry.size()) && (!highlightItem || item != highlightItem)) { + if (QDeclarativePathViewAttached *att = attached(item)) + att->m_percent = -1; scheduleLayout(); } } @@ -126,6 +128,7 @@ public: static void fixOffsetCallback(void*); void fixOffset(); void setOffset(qreal offset); + void setAdjustedOffset(qreal offset); void regenerate(); void updateItem(QDeclarativeItem *, qreal); void snapToCurrent(); @@ -140,6 +143,7 @@ public: qreal lastDist; int lastElapsed; qreal offset; + qreal offsetAdj; qreal mappedRange; bool stealMouse : 1; bool ownModel : 1; @@ -160,6 +164,7 @@ public: int pathItems; int requestedIndex; QList items; + QList itemCache; QDeclarativeGuard model; QVariant modelVariant; enum MovementReason { Other, SetIndex, Mouse }; @@ -173,6 +178,7 @@ public: qreal highlightRangeEnd; QDeclarativePathView::HighlightRangeMode highlightRangeMode; int highlightMoveDuration; + int modelCount; }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index e2ccfd2..74d2f0a 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -367,9 +367,11 @@ void tst_QDeclarativePathView::dataModel() QCOMPARE(item->y(), 10.0); model.insertItem(4, "orange", "10"); + QTest::qWait(100); - int itemCount = findItems(pathview, "wrapper").count(); - QCOMPARE(itemCount, 10); + QTRY_COMPARE(findItems(pathview, "wrapper").count(), 10); + + QVERIFY(pathview->currentIndex() == 0); QDeclarativeText *text = findItem(pathview, "myText", 4); QVERIFY(text); @@ -384,26 +386,27 @@ void tst_QDeclarativePathView::dataModel() QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties"); QVERIFY(testObject->error() == false); - itemCount = findItems(pathview, "wrapper").count(); - QCOMPARE(itemCount, 5); + QTRY_COMPARE(findItems(pathview, "wrapper").count(), 5); QDeclarativeRectangle *testItem = findItem(pathview, "wrapper", 4); QVERIFY(testItem != 0); testItem = findItem(pathview, "wrapper", 5); QVERIFY(testItem == 0); + pathview->setCurrentIndex(1); + model.insertItem(2, "pink", "2"); + QTest::qWait(100); - itemCount = findItems(pathview, "wrapper").count(); - QCOMPARE(itemCount, 5); + QTRY_COMPARE(findItems(pathview, "wrapper").count(), 5); + QVERIFY(pathview->currentIndex() == 1); text = findItem(pathview, "myText", 2); QVERIFY(text); QCOMPARE(text->text(), model.name(2)); model.removeItem(3); - itemCount = findItems(pathview, "wrapper").count(); - QCOMPARE(itemCount, 5); + QTRY_COMPARE(findItems(pathview, "wrapper").count(), 5); text = findItem(pathview, "myText", 3); QVERIFY(text); QCOMPARE(text->text(), model.name(3)); -- cgit v0.12 From 9f56ef9d1538e9edf9dc7bdb3bf696e647c0c092 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Mon, 6 Sep 2010 08:41:04 +0200 Subject: Doc: Updating known-issues page. --- doc/src/getting-started/known-issues.qdoc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc index 0fa23f6..0c2d8d8 100644 --- a/doc/src/getting-started/known-issues.qdoc +++ b/doc/src/getting-started/known-issues.qdoc @@ -63,10 +63,6 @@ \list - \o Performing a new install of the Qt 4.6 beta on Snow Leopard - triggers a bug in the installer that causes the install to fail. - Updating an existing Qt installation works fine. - \o There are two workarounds, either disable spotlight for the target drive during the install, or do a custom install where you deselect documentation and examples. Run the installer again as a full -- cgit v0.12 From dc7f31dbd698e00cd25d36b4568b03dd83032ecc Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 6 Sep 2010 16:46:28 +1000 Subject: Fix recording of QML visual tests when using a QGLWidget viewport. In order for the event filter to work, we need to set the QGLWidget as the viewport before constructing the QDeclarativeTester. --- tools/qml/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 7421b5e..78cd64d 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -441,6 +441,7 @@ static QDeclarativeViewer *createViewer() QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags); viewer->setAttribute(Qt::WA_DeleteOnClose, true); + viewer->setUseGL(opts.useGL); if (!opts.scriptopts.isEmpty()) { viewer->setScriptOptions(opts.scriptOptions); @@ -492,8 +493,6 @@ void showViewer(QDeclarativeViewer *viewer) viewer->showMaximized(); else viewer->show(); - - viewer->setUseGL(opts.useGL); viewer->raise(); } -- cgit v0.12 From c3848a886448a15ae87801099849018d761026ed Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 6 Sep 2010 16:48:16 +1000 Subject: Fix AnchorAnimation for multiple AnchorChanges with dependancies. When rewinding, don't reapply bindings, only values. This is consistent with how we handle rewinding other property bindings. Task-number: QTBUG-13398 --- .../util/qdeclarativestateoperations.cpp | 17 +- .../util/qdeclarativetransitionmanager.cpp | 2 +- .../animation/qtbug13398/data/qtbug13398.0.png | Bin 0 -> 1265 bytes .../animation/qtbug13398/data/qtbug13398.qml | 447 +++++++++++++++++++++ .../qmlvisual/animation/qtbug13398/qtbug13398.qml | 68 ++++ 5 files changed, 518 insertions(+), 16 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.0.png create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.qml create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 6e6f0cb..845b3da 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -1427,6 +1427,7 @@ void QDeclarativeAnchorChanges::clearBindings() if (!d->target) return; + //### should this (saving "from" values) be moved to saveCurrentValues()? d->fromX = d->target->x(); d->fromY = d->target->y(); d->fromWidth = d->target->width(); @@ -1486,22 +1487,8 @@ void QDeclarativeAnchorChanges::rewind() return; QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target); - //restore previous anchors - if (d->rewindLeft.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setLeft(d->rewindLeft); - if (d->rewindRight.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setRight(d->rewindRight); - if (d->rewindHCenter.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setHorizontalCenter(d->rewindHCenter); - if (d->rewindTop.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setTop(d->rewindTop); - if (d->rewindBottom.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setBottom(d->rewindBottom); - if (d->rewindVCenter.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setVerticalCenter(d->rewindVCenter); - if (d->rewindBaseline.anchorLine != QDeclarativeAnchorLine::Invalid) - targetPrivate->anchors()->setBaseline(d->rewindBaseline); + //restore previous values (but not previous bindings, i.e. anchors) d->target->setX(d->rewindX); d->target->setY(d->rewindY); if (targetPrivate->widthValid) { diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp index 9f198e4..d82c4bb 100644 --- a/src/declarative/util/qdeclarativetransitionmanager.cpp +++ b/src/declarative/util/qdeclarativetransitionmanager.cpp @@ -176,7 +176,7 @@ void QDeclarativeTransitionManager::transition(const QList & if (action.event->isReversable()) { action.event->clearBindings(); action.event->rewind(); - action.event->clearBindings(); + action.event->clearBindings(); //### shouldn't be needed } continue; } diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.0.png b/tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.0.png new file mode 100644 index 0000000..16adc51 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.0.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.qml b/tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.qml new file mode 100644 index 0000000..0cc98ce --- /dev/null +++ b/tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.qml @@ -0,0 +1,447 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 32 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 48 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 64 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 80 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 96 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 112 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 128 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 144 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 160 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 176 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 192 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 208 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 224 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 240 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 256 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 272 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 288 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 304 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 320 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 336 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 352 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 368 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 384 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 400 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 416 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 432 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 448 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 464 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 480 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 496 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 220; y: 270 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 512 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 528 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 544 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 560 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 576 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 220; y: 271 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 220; y: 271 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 592 + hash: "2452007928bf86b9c42e666c7a7afc89" + } + Frame { + msec: 608 + hash: "96e8e81d61bffe02b8f41f47a4a7e8fc" + } + Frame { + msec: 624 + hash: "75881a2779bd7d7f683f87c4a7393769" + } + Frame { + msec: 640 + hash: "2ef628328d2a6393095e78db80b0513f" + } + Frame { + msec: 656 + hash: "390926f2c2c27dfa10c9b393ee466ce6" + } + Frame { + msec: 672 + hash: "ea07d93e7d8a53f56cff19d9d3b282a4" + } + Frame { + msec: 688 + hash: "8aa6be919b1ef4b7e102a319a453707e" + } + Frame { + msec: 704 + hash: "6ebc518fb53ffe42fca20b9f16a21b36" + } + Frame { + msec: 720 + hash: "ee7a93b157e24e22efa84604e7e44fe6" + } + Frame { + msec: 736 + hash: "de3bf8f67e51b036db4976fd3b4b6c3c" + } + Frame { + msec: 752 + hash: "648be4298ebe3bbc7e5c4a4c9c46f193" + } + Frame { + msec: 768 + hash: "1ccf3b73e22a4b98ce1df098af9466f2" + } + Frame { + msec: 784 + hash: "73a2fb047728b2b8e613f0fb8dfe429d" + } + Frame { + msec: 800 + hash: "bbb4cabec4b98ea8ca94dff91a0d8c99" + } + Frame { + msec: 816 + hash: "3337e86bd9fcfbce939389928fb1fb72" + } + Frame { + msec: 832 + hash: "cb4a2a330e8470c61de9e9b6d2dc4597" + } + Frame { + msec: 848 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 864 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 880 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 896 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 912 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 928 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 944 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 960 + image: "qtbug13398.0.png" + } + Frame { + msec: 976 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 992 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1008 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1024 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1040 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1056 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1072 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1088 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1104 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1120 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1136 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1152 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1168 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1184 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1200 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1216 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1232 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 220; y: 271 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1248 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1264 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1280 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1296 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1312 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1328 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 220; y: 271 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1344 + hash: "e09a359578935b988ac1cc8c40b25547" + } + Frame { + msec: 1360 + hash: "697a4fd182ff90cd557f224174bad43a" + } + Frame { + msec: 1376 + hash: "99e5ca9a77df1acfed628f31b9050179" + } + Frame { + msec: 1392 + hash: "1f0dc00d3e3536b40a6becf775b31cee" + } + Frame { + msec: 1408 + hash: "5b81ddd35d74be222bc8a40d2573884b" + } + Frame { + msec: 1424 + hash: "4e236f5de69048e87add0e4380f2c3e6" + } + Frame { + msec: 1440 + hash: "a901c9c0c77e03d98a2b95267cca8514" + } + Frame { + msec: 1456 + hash: "78bbdf6781c2968c67982ffdb747dbbe" + } + Frame { + msec: 1472 + hash: "a245ca593649f60980be982eb8fda57e" + } + Frame { + msec: 1488 + hash: "c27fddc147749da24eaeb92aeaf61738" + } + Frame { + msec: 1504 + hash: "b9674af46b618dc1eedabd4f18253b11" + } + Frame { + msec: 1520 + hash: "8ae3c0cc0888fd0a607bc5b537a9ce0a" + } + Frame { + msec: 1536 + hash: "f1981bd3fb08233622a4078e2f717011" + } + Frame { + msec: 1552 + hash: "4dce834c9e3988fe535391fedc942add" + } + Frame { + msec: 1568 + hash: "ca7356dee61e156d04b0b46ea033498e" + } + Frame { + msec: 1584 + hash: "97499f6e04cbe690bc12458aef4b66a5" + } + Frame { + msec: 1600 + hash: "2452007928bf86b9c42e666c7a7afc89" + } +} diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml b/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml new file mode 100644 index 0000000..8f388bc --- /dev/null +++ b/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml @@ -0,0 +1,68 @@ +import Qt 4.7 + +Item { + width: 300 + height: 400 + + Rectangle { + id: root + color: "darkkhaki" + + x: 50 + y: 50 + + width: 200 + height: 300 + + Rectangle { + id: statusbar + color: "chocolate" + + height: 30 + + anchors.top: root.top + anchors.left: root.left + anchors.right: root.right + } + + Rectangle { + id: titlebar + color: "crimson" + + height: 60 + + anchors.top: statusbar.bottom + anchors.left: root.left + anchors.right: root.right + } + + MouseArea { + anchors.fill: parent + onClicked: { + root.state = root.state ? "" : "fullscreen"; + } + } + + states: [ + State { + name: "fullscreen" + AnchorChanges { + target: statusbar + anchors.top: undefined + anchors.bottom: titlebar.top + } + AnchorChanges { + target: titlebar + anchors.top: undefined + anchors.bottom: root.top + } + } + ] + + transitions: [ + Transition { + AnchorAnimation { } + } + ] + } +} -- cgit v0.12 From 342dd15d61b56f97714a5d483454397e2c978c97 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 6 Sep 2010 10:26:03 +0200 Subject: Fix compilation of qmake with MSVC Reviewed-by: TrustMe --- qmake/Makefile.win32 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 4565c22..354a73f 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -23,13 +23,14 @@ LINK = link # specific stuff for VS2005 # !if "$(QMAKESPEC)" == "win32-msvc2005" -CFLAGS = /Zc:wchar_t- +CFLAGS_EXTRA = /Zc:wchar_t- !elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" -CFLAGS = /MP +CFLAGS_EXTRA = /MP !endif CFLAGS_BARE = -c -Fo./ \ -W3 -nologo -O2 \ + $(CFLAGS_EXTRA) \ -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \ -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \ -I$(SOURCE_PATH)\include -I$(SOURCE_PATH)\include\QtCore \ -- cgit v0.12 From b163780ff12c3b36cc7e2d5ef1f79001e67ccec6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 6 Sep 2010 10:28:53 +0200 Subject: Fix compilation on ARM: don't include kernel headers Kernel headers are sometimes evil that they are incompatible or missing. At least one toolchain on ARM doesn't have them, so don't include. Instead, copy the definitions. The kernel ABI is stable so these values won't change on us. Reviewed-by: Benjamin Poulain --- src/corelib/tools/qsimd.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 7349432..a9c33f1 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -54,8 +54,20 @@ #if defined(Q_OS_LINUX) && defined(__arm__) #include "private/qcore_unix_p.h" -#include -#include +// the kernel header definitions for HWCAP_* +// (the ones we need/may need anyway) + +// copied from (ARM) +#define HWCAP_IWMMXT 512 +#define HWCAP_CRUNCH 1024 +#define HWCAP_THUMBEE 2048 +#define HWCAP_NEON 4096 +#define HWCAP_VFPv3 8192 +#define HWCAP_VFPv3D16 16384 + +// copied from +#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ + #endif QT_BEGIN_NAMESPACE -- cgit v0.12 From 59cb434370edeabb9566af38a93f86777f1f9961 Mon Sep 17 00:00:00 2001 From: Victor Ostashevsky Date: Mon, 6 Sep 2010 10:57:46 +0200 Subject: Install translators earlier in assistant Help message and command line parsing errors will be shown translated Merge-request: 2466 Reviewed-by: Oswald Buddenhagen --- tools/assistant/tools/assistant/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index 02507ae..bb86bfe 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -316,6 +316,7 @@ int main(int argc, char *argv[]) TRACE_OBJ QApplication a(argc, argv, useGui(argc, argv)); a.addLibraryPath(a.applicationDirPath() + QLatin1String("/plugins")); + setupTranslations(); // Parse arguments. CmdLineParser cmd(a.arguments()); @@ -419,8 +420,6 @@ int main(int argc, char *argv[]) cachedCollection.setCurrentFilter(cmd.currentFilter()); } - setupTranslations(); - /* * We need to be careful here: The main window has to be deleted before * the help engine wrapper, which has to be deleted before the -- cgit v0.12 From f4bada8cbba5f209556ad4e3703d412e4146a0af Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 6 Sep 2010 12:01:08 +0300 Subject: QPixmaps try to access FBS connection after the connection has been closed. This patch fixed the issue by tracking pixmaps and destroying native bitmaps before FBS connection is closed. Task-number: QTBUG-9112 Reviewed-by: Jason Barron --- src/gui/image/qpixmap_s60.cpp | 43 +++++++++++++++++++++++++++++++++++++++++-- src/gui/image/qpixmap_s60_p.h | 12 ++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 9d571b5..dbdf0bc 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -63,6 +63,42 @@ QT_BEGIN_NAMESPACE const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; +static bool cleanup_function_registered = false; +static QS60PixmapData *firstPixmap = 0; + +static void qt_symbian_register_pixmap(QS60PixmapData *pd) +{ + if(!cleanup_function_registered) { + qAddPostRoutine(qt_symbian_release_pixmaps); + cleanup_function_registered = true; + } + + pd->next = firstPixmap; + pd->prev = 0; + if (firstPixmap) + firstPixmap->prev = pd; + firstPixmap = pd; +} + +static void qt_symbian_unregister_pixmap(QS60PixmapData *pd) +{ + if (pd->next) + pd->next->prev = pd->prev; + if (pd->prev) + pd->prev->next = pd->next; + else + firstPixmap = pd->next; +} + +static void qt_symbian_release_pixmaps() +{ + // Scan all QS60PixmapData objects in the system and destroy them. + QS60PixmapData *pd = firstPixmap; + while (pd != 0) { + pd->release(); + pd = pd->next; + } +} /* \class QSymbianFbsClient @@ -356,15 +392,18 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), cfbsBitmap(0), pengine(0), bytes(0), - formatLocked(false) + formatLocked(false), + next(0), + prev(0) { - + qt_symbian_register_pixmap(this); } QS60PixmapData::~QS60PixmapData() { release(); delete symbianBitmapDataAccess; + qt_symbian_unregister_pixmap(this); } void QS60PixmapData::resize(int width, int height) diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index 85c9ebe..a82f5c2 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -63,6 +63,11 @@ class CFbsBitGc; class QSymbianBitmapDataAccess; +class QS60PixmapData; +void qt_symbian_register_pixmap(QS60PixmapData *pd); +void qt_symbian_unregister_pixmap(QS60PixmapData *pd); +void qt_symbian_release_pixmaps(); + class QSymbianFbsHeapLock { public: @@ -120,6 +125,13 @@ private: bool formatLocked; + QS60PixmapData *next; + QS60PixmapData *prev; + + friend void qt_symbian_register_pixmap(QS60PixmapData *pd); + friend void qt_symbian_unregister_pixmap(QS60PixmapData *pd); + friend void qt_symbian_release_pixmaps(); + friend class QPixmap; friend class QS60WindowSurface; friend class QS60PaintEngine; -- cgit v0.12 From f3d8f3d0d17f9df678b83eff48f45eb4b622b45b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 6 Sep 2010 12:24:33 +0200 Subject: search translator comments Task-number: QTBUG-4165 --- tools/linguist/linguist/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 7d11823..265df05 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -1030,6 +1030,8 @@ void MainWindow::findAgain() break; if (searchItem(m->extraComment())) break; + if (searchItem(m->translatorComment())) + break; m_foundWhere = DataModel::NoLocation; // did not find the search string in this message } -- cgit v0.12 From 5cfc65d04858563e53987b224f36ee71356aa73c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 6 Sep 2010 13:22:39 +0200 Subject: Doc: Worked on two more elements, replacing an image. --- doc/src/declarative/pics/flipable.gif | Bin 80659 -> 131710 bytes doc/src/declarative/qml-intro.qdoc | 4 +- doc/src/snippets/declarative/flipable.qml | 77 ----------------- doc/src/snippets/declarative/flipable/flipable.qml | 77 +++++++++++++++++ .../graphicsitems/qdeclarativeflipable.cpp | 29 ++++--- .../qdeclarativefolderlistmodel.cpp | 96 +++++++++++++++------ 6 files changed, 170 insertions(+), 113 deletions(-) delete mode 100644 doc/src/snippets/declarative/flipable.qml create mode 100644 doc/src/snippets/declarative/flipable/flipable.qml diff --git a/doc/src/declarative/pics/flipable.gif b/doc/src/declarative/pics/flipable.gif index 6386f06..da37b2b 100644 Binary files a/doc/src/declarative/pics/flipable.gif and b/doc/src/declarative/pics/flipable.gif differ diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc index 9130be0..d735042 100644 --- a/doc/src/declarative/qml-intro.qdoc +++ b/doc/src/declarative/qml-intro.qdoc @@ -58,12 +58,12 @@ would be a property. The basic syntax of an \l{QML Elements}{element} is -\code +\qml SomeElement { id: myObject ... some other things here ... } -\endcode +\endqml Here we are defining a new object. We specify its 'type' first as SomeElement. Then within matching braces { ... } we specify the various parts of our diff --git a/doc/src/snippets/declarative/flipable.qml b/doc/src/snippets/declarative/flipable.qml deleted file mode 100644 index c2ecbbe..0000000 --- a/doc/src/snippets/declarative/flipable.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//! [0] -import Qt 4.7 - -Flipable { - id: flipable - width: 240 - height: 240 - - property int angle: 0 - property bool flipped: false - - front: Image { source: "front.png" } - back: Image { source: "back.png" } - - transform: Rotation { - origin.x: flipable.width/2; origin.y: flipable.height/2 - axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis - angle: flipable.angle - } - - states: State { - name: "back" - PropertyChanges { target: flipable; angle: 180 } - when: flipable.flipped - } - - transitions: Transition { - NumberAnimation { properties: "angle"; duration: 1000 } - } - - MouseArea { - anchors.fill: parent - onClicked: flipable.flipped = !flipable.flipped - } -} -//! [0] - diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/declarative/flipable/flipable.qml new file mode 100644 index 0000000..c2ecbbe --- /dev/null +++ b/doc/src/snippets/declarative/flipable/flipable.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [0] +import Qt 4.7 + +Flipable { + id: flipable + width: 240 + height: 240 + + property int angle: 0 + property bool flipped: false + + front: Image { source: "front.png" } + back: Image { source: "back.png" } + + transform: Rotation { + origin.x: flipable.width/2; origin.y: flipable.height/2 + axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis + angle: flipable.angle + } + + states: State { + name: "back" + PropertyChanges { target: flipable; angle: 180 } + when: flipable.flipped + } + + transitions: Transition { + NumberAnimation { properties: "angle"; duration: 1000 } + } + + MouseArea { + anchors.fill: parent + onClicked: flipable.flipped = !flipable.flipped + } +} +//! [0] + diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index 69dd66a..4ecf87b 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -71,31 +71,40 @@ public: \qmlclass Flipable QDeclarativeFlipable \since 4.7 \ingroup qml-basic-interaction-elements - \brief The Flipable item provides a surface that can be flipped. \inherits Item Flipable is an item that can be visibly "flipped" between its front and - back sides. It is used together with \l Rotation and \l {State}/\l {Transition} to - produce a flipping effect. + back sides, like a card. It is used together with \l Rotation, \l State + and \l Transition elements to produce a flipping effect. + + The \l front and \l back properties are used to hold the items that are + shown respectively on the front and back sides of the flipable item. - Here is a Flipable that flips whenever it is clicked: + \section1 Example Usage - \snippet doc/src/snippets/declarative/flipable.qml 0 + \beginfloatright + \inlineimage flipable.gif + \endfloat - \image flipable.gif + The following example shows a Flipable item that flips whenever it is + clicked, rotating about the y-axis. The \l Rotation element is used to specify the angle and axis of the flip. - When \c flipped is \c true, the item changes to the "back" state, where + When \c flipped is true, the item changes to the "back" state, where the angle is changed to 180 degrees to produce the flipping effect. - Finally, the \l Transition creates the animation that changes the - angle over one second: when the item changes between its "back" and + + \clearfloat + \snippet doc/src/snippets/declarative/flipable/flipable-snippet.qml 0 + + The \l Transition creates the animation that changes the angle over the + duration of one second. When the item changes between its "back" and default states, the NumberAnimation animates the angle between its old and new values. See the \l {QML States} and \l {QML Animation} documentation for more details on state changes and how animations work within transitions. - + \sa {declarative/ui-components/flipable}{Flipable example} */ diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index 6c38911..4983840 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -95,30 +95,61 @@ public: /*! \qmlclass FolderListModel QDeclarativeFolderListModel \ingroup qml-working-with-data - \brief The FolderListModel provides a model of the contents of a folder in a filesystem. + \brief The FolderListModel provides a model of the contents of a file system folder. - FolderListModel provides access to the local filesystem. The \e folder property - specifies the folder to list. + FolderListModel provides access to information about the contents of a folder + in the local file system, exposing a list of files to views and other data components. - Qt uses "/" as a universal directory separator in the same way that "/" is - used as a path separator in URLs. If you always use "/" as a directory - separator, Qt will translate your paths to conform to the underlying - operating system. - - This type is made available by importing the \c Qt.labs.folderlistmodel module. - \e {Elements in the Qt.labs module are not guaranteed to remain compatible + \note This type is made available by importing the \c Qt.labs.folderlistmodel module. + \e{Elements in the Qt.labs module are not guaranteed to remain compatible in future versions.} \bold{import Qt.labs.folderlistmodel 1.0} - The roles available are: + The \l folder property specifies the folder to access. Information about the + files and directories in the folder is supplied via the model's interface. + Components access names and paths via the following roles: + \list \o fileName \o filePath \endlist - Additionally a file entry can be differentiated from a folder entry - via the \l isFolder() method. + Additionally a file entry can be differentiated from a folder entry via the + isFolder() method. + + \section1 Filtering + + Various properties can be set to filter the number of files and directories + exposed by the model. + + The \l nameFilters property can be set to contain a list of wildcard filters + that are applied to names of files and directories, causing only those that + match the filters to be exposed. + + Directories can be included or excluded using the \l showDirs property, and + navigation directories can also be excluded by setting the \l showDotAndDotDot + property to false. + + It is sometimes useful to limit the files and directories exposed to those + that the user can access. The \l showOnlyReadable property can be set to + enable this feature. + + \section1 Example Usage + + The following example shows a FolderListModel being used to provide a list + of QML files in a \l ListView: + + \snippet doc/src/snippets/declarative/folderlistmodel.qml 0 + + \section1 Path Separators + + Qt uses "/" as a universal directory separator in the same way that "/" is + used as a path separator in URLs. If you always use "/" as a directory + separator, Qt will translate your paths to conform to the underlying + operating system. + + \sa {QML Data Models} */ QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) @@ -168,9 +199,13 @@ int QDeclarativeFolderListModel::rowCount(const QModelIndex &parent) const /*! \qmlproperty string FolderListModel::folder - The \a folder property holds the folder the model is currently providing. + The \a folder property holds a URL for the folder that the model is + currently providing. - It is a URL, but must be a file: or qrc: URL (or relative to such a URL). + The value is a URL expressed as a string, and must be a \c file: or \c qrc: + URL, or a relative URL. + + By default, the value is an invalid URL. */ QUrl QDeclarativeFolderListModel::folder() const { @@ -214,16 +249,18 @@ QUrl QDeclarativeFolderListModel::parentFolder() const /*! \qmlproperty list FolderListModel::nameFilters - The \a nameFilters property contains a list of filename filters. + The \a nameFilters property contains a list of file name filters. The filters may include the ? and * wildcards. The example below filters on PNG and JPEG files: - \code + \qml FolderListModel { nameFilters: [ "*.png", "*.jpg" ] } - \endcode + \endqml + + \note Directories are not excluded by filters. */ QStringList QDeclarativeFolderListModel::nameFilters() const { @@ -335,9 +372,14 @@ void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QM /*! \qmlproperty bool FolderListModel::showDirs - If true (the default), directories are included in the model. + If true, directories are included in the model; otherwise only files + are included. + + By default, this property is true. - Note that the nameFilters are ignored for directories. + Note that the nameFilters are not applied to directories. + + \sa showDotAndDotDot */ bool QDeclarativeFolderListModel::showDirs() const { @@ -357,9 +399,12 @@ void QDeclarativeFolderListModel::setShowDirs(bool on) /*! \qmlproperty bool FolderListModel::showDotAndDotDot - If true, the "." and ".." directories are included in the model. + If true, the "." and ".." directories are included in the model; otherwise + they are excluded. + + By default, this property is false. - The default is false. + \sa showDirs */ bool QDeclarativeFolderListModel::showDotAndDotDot() const { @@ -379,9 +424,12 @@ void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on) /*! \qmlproperty bool FolderListModel::showOnlyReadable - If true, only readable files and directories are shown. + If true, only readable files and directories are shown; otherwise all files + and directories are shown. + + By default, this property is false. - The default is false. + \sa showDirs */ bool QDeclarativeFolderListModel::showOnlyReadable() const { -- cgit v0.12 From db6c4246f5bce98d0ec8f16186618d99b7db5dcc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 6 Sep 2010 13:43:14 +0200 Subject: Doc: update the documentation of QUrl about HTML Form encoding HTML forms deviate slightly from URL encoding. They encode spaces as plus signs (+) and the plus sign is encoded as %2b. QUrl is a strict URL/URI tool, so it does not know about HTML form encoding. Add a note to the methods that encode/decode queries about this difference. Task-number: QTBUG-13403 --- src/corelib/io/qurl.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index f57a402..56a03c9 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -4958,6 +4958,10 @@ void QUrl::setEncodedQuery(const QByteArray &query) pairDelimiter(), and the key and value are delimited by valueDelimiter(). + \note This method does not encode spaces (ASCII 0x20) as plus (+) signs, + like HTML forms do. If you need that kind of encoding, you must encode + the value yourself and use QUrl::setEncodedQueryItems. + \sa setQueryDelimiters(), queryItems(), setEncodedQueryItems() */ void QUrl::setQueryItems(const QList > &query) @@ -5028,6 +5032,10 @@ void QUrl::setEncodedQueryItems(const QList > &que character returned by valueDelimiter(). Each key/value pair is delimited by the character returned by pairDelimiter(). + \note This method does not encode spaces (ASCII 0x20) as plus (+) signs, + like HTML forms do. If you need that kind of encoding, you must encode + the value yourself and use QUrl::addEncodedQueryItem. + \sa addEncodedQueryItem() */ void QUrl::addQueryItem(const QString &key, const QString &value) @@ -5084,6 +5092,10 @@ void QUrl::addEncodedQueryItem(const QByteArray &key, const QByteArray &value) /*! Returns the query string of the URL, as a map of keys and values. + \note This method does not decode spaces plus (+) signs as spaces (ASCII + 0x20), like HTML forms do. If you need that kind of decoding, you must + use QUrl::encodedQueryItems and decode the data yourself. + \sa setQueryItems(), setEncodedQuery() */ QList > QUrl::queryItems() const @@ -5188,6 +5200,10 @@ bool QUrl::hasEncodedQueryItem(const QByteArray &key) const Returns the first query string value whose key is equal to \a key from the URL. + \note This method does not decode spaces plus (+) signs as spaces (ASCII + 0x20), like HTML forms do. If you need that kind of decoding, you must + use QUrl::encodedQueryItemValue and decode the data yourself. + \sa allQueryItemValues() */ QString QUrl::queryItemValue(const QString &key) const @@ -5232,6 +5248,10 @@ QByteArray QUrl::encodedQueryItemValue(const QByteArray &key) const Returns the a list of query string values whose key is equal to \a key from the URL. + \note This method does not decode spaces plus (+) signs as spaces (ASCII + 0x20), like HTML forms do. If you need that kind of decoding, you must + use QUrl::allEncodedQueryItemValues and decode the data yourself. + \sa queryItemValue() */ QStringList QUrl::allQueryItemValues(const QString &key) const -- cgit v0.12 From d3064666be3909583ccdb873672011d1db4588e4 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 6 Sep 2010 13:36:09 +0300 Subject: Fixes for QMAKE_EXTRA_* variable handling in symbian-sbsv2 - No longer require PRE_TARGETDEPS items to be absolute, which was difficult to achieve sometimes as qmake doesn't provide method for absolutizing paths. - Do smart command replacement for commands containing $$QMAKE_* command variables, such as $$QMAKE_COPY, when generating bld.inf extensions for QMAKE_EXTRA_* variables. $$QMAKE_* command variables cannot be passed to sbsv2 toolchain directly, as it uses cygwin in windows, and they can't simply be replaced to use sbsv2 equivalents in symbian.conf, because generated wrapper makefiles need them to be Windows compatible. Reviewed-by: axis --- mkspecs/common/symbian/symbian-mmp.conf | 12 +++++++++ qmake/generators/symbian/symmake_sbsv2.cpp | 43 ++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf index 4230ad7..5292781 100644 --- a/mkspecs/common/symbian/symbian-mmp.conf +++ b/mkspecs/common/symbian/symbian-mmp.conf @@ -55,3 +55,15 @@ symbian { } } } + +# Variables for replacing equivalent QMAKE_* variables in bld.inf for FLM execution of commands +symbian-sbsv2 { + QMAKE_SBSV2_COPY = $(GNUCP) + QMAKE_SBSV2_COPY_DIR = $(GNUCP) -r + QMAKE_SBSV2_MOVE = $(GNUMV) + QMAKE_SBSV2_DEL_FILE = $(GNURM) -f + QMAKE_SBSV2_MKDIR = $(GNUMKDIR) + QMAKE_SBSV2_DEL_DIR = $(GNURMDIR) + QMAKE_SBSV2_DEL_TREE = $(GNURM) -rf +} + diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index e794351..c66c1b8 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -413,6 +413,28 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t } } + QMap commandsToReplace; + commandsToReplace.insert(project->values("QMAKE_COPY").join(" "), + project->values("QMAKE_SBSV2_COPY").join(" ")); + commandsToReplace.insert(project->values("QMAKE_COPY_DIR").join(" "), + project->values("QMAKE_SBSV2_COPY_DIR").join(" ")); + commandsToReplace.insert(project->values("QMAKE_MOVE").join(" "), + project->values("QMAKE_SBSV2_MOVE").join(" ")); + commandsToReplace.insert(project->values("QMAKE_DEL_FILE").join(" "), + project->values("QMAKE_SBSV2_DEL_FILE").join(" ")); + commandsToReplace.insert(project->values("QMAKE_MKDIR").join(" "), + project->values("QMAKE_SBSV2_MKDIR").join(" ")); + commandsToReplace.insert(project->values("QMAKE_DEL_DIR").join(" "), + project->values("QMAKE_SBSV2_DEL_DIR").join(" ")); + commandsToReplace.insert(project->values("QMAKE_DEL_TREE").join(" "), + project->values("QMAKE_SBSV2_DEL_TREE").join(" ")); + + // If commandItem starts with any $$QMAKE_* commands, do a replace for SBS equivalent + // Command replacement is done only for the start of the command or right after + // concatenation operators (&& and ||), as otherwise unwanted replacements might occur. + static QString cmdFind("(^|&&\\s*|\\|\\|\\s*)%1"); + static QString cmdReplace("\\1%1"); + // Write extra compilers and targets to initialize QMAKE_ET_* variables // Cache results to avoid duplicate calls when creating wrapper makefile QTextStream extraCompilerStream(&extraCompilersCache); @@ -424,13 +446,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t // are not necessary. QStringList allPreDeps; foreach(QString item, project->values("PRE_TARGETDEPS")) { - // Predeps get mangled in windows, so fix them to more sbsv2 friendly format -#if defined(Q_OS_WIN) - if (item.mid(1, 1) == ":") - item = item.mid(0, 1).toUpper().append(item.mid(1)); // Fix drive to uppercase -#endif - item.replace("\\", "/"); - allPreDeps << escapeDependencyPath(item); + allPreDeps.append(fileInfo(item).absoluteFilePath()); } foreach (QString item, project->values("GENERATED_SOURCES")) { @@ -460,7 +476,6 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t QStringList deps = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + item + targetItem); QString commandItem = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + item + targetItem).join(" "); - // Make sure all deps paths are absolute QString absoluteDeps; foreach (QString depItem, deps) { @@ -474,6 +489,18 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; t << "OPTION DEPS " << absoluteDeps << endl; + // Iterate command replacements in reverse alphabetical order of keys so + // that keys which are starts of other longer keys are iterated after longer keys. + QMapIterator cmdIter(commandsToReplace); + cmdIter.toBack(); + while (cmdIter.hasPrevious()) { + cmdIter.previous(); + if (commandItem.contains(cmdIter.key())) { + commandItem.replace(QRegExp(cmdFind.arg(cmdIter.key())), + cmdReplace.arg(cmdIter.value())); + } + } + if (commandItem.indexOf("$(INCPATH)") != -1) commandItem.replace("$(INCPATH)", incPath.join(" ")); if (commandItem.indexOf("$(DEFINES)") != -1) -- cgit v0.12 From da7e5f0852b86392d2de413afa2d799ba46424b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 6 Sep 2010 15:38:07 +0200 Subject: Fix failing tst_qmdisubwindow test after 71a3b1a0d3 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 16f5bd6..ddf1a27 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -234,8 +234,10 @@ QT_END_NAMESPACE // This method is called the first time the window is placed on screen and // is the earliest point in time we can connect OpenGL contexts to NSViews. QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; - qt_event_request_window_change(qwidget); - qt_mac_send_posted_gl_updates(qwidget); + if (qwidget) { + qt_event_request_window_change(qwidget); + qt_mac_send_posted_gl_updates(qwidget); + } [super setInitialFirstResponder:view]; } -- cgit v0.12 From 08c34bfec8880600138846bb895e82f69cb3f92c Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 6 Sep 2010 16:23:35 +0200 Subject: Fixed incorrect Symbian scoping. The missing install functionality is only true for mmp based systems. --- src/3rdparty/webkit/WebCore/WebCore.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 537cdd3..5ea1e77 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -2857,13 +2857,13 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) { } } -!symbian { +!symbian-abld:!symbian-sbsv2 { modfile.files = $$moduleFile modfile.path = $$[QMAKE_MKSPECS]/modules INSTALLS += modfile } else { - # INSTALLS is not implemented in qmake's s60 generators, copy headers manually + # INSTALLS is not implemented in qmake's mmp generators, copy headers manually inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} inst_modfile.input = moduleFile -- cgit v0.12 From 8cebe2a951a765c16213e5f84ac0db8101d8ea41 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 6 Sep 2010 17:28:52 +0200 Subject: make shadow builds not write into the source dir like mkspecs/features, mkspecs/modules needs special treatment. --- configure | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 07b7b97..f2b6455 100755 --- a/configure +++ b/configure @@ -2411,18 +2411,26 @@ if [ "$OPT_SHADOW" = "yes" ]; then ln -s "$relpath"/mkspecs/* "$outpath/mkspecs" rm -f "$outpath/mkspecs/default" + ShadowMkspecs() + { + rm -rf "$outpath/mkspecs/$1" + if [ "$UNAME_SYSTEM" = "Linux" ]; then + # This works with GNU coreutils, and is needed for ScratchBox + cp -rs "$relpath/mkspecs/$1" "$outpath/mkspecs/$1" + else + # A simple "cp -rs" doesn't work on Mac. :( + find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p + find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" + fi + } + # Special case for mkspecs/features directory. # To be able to place .prf files into a shadow build directory, # we're creating links for files only. The directory structure is reproduced. - rm -rf "$outpath/mkspecs/features" - if [ "$UNAME_SYSTEM" = "Linux" ]; then - # This works with GNU coreutils, and is needed for ScratchBox - cp -rs "$relpath/mkspecs/features" "$outpath/mkspecs/features" - else - # A simple "cp -rs" doesn't work on Mac. :( - find "$relpath/mkspecs/features" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p - find "$relpath/mkspecs/features" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" - fi + ShadowMkspecs features + + # The modules dir is special, too. + ShadowMkspecs modules # symlink the doc directory rm -rf "$outpath/doc" -- cgit v0.12 From 9cba567c9fb3243191735376a5de7962ad393952 Mon Sep 17 00:00:00 2001 From: liang jian Date: Mon, 6 Sep 2010 21:26:45 +0200 Subject: Allow Windows x64 to use SSE2 to speed up blending Windows 64 does not support MMX with MSVC. This is a problem with the way SSE is currently used because it rely on previous vector instructions being available. This patches fixes that by using the intended functions for SSE2 on Windows. Merge-request: 792 Reviewed-by: Benjamin Poulain --- src/gui/painting/qdrawhelper.cpp | 224 ++++++++++++++++++---------------- src/gui/painting/qdrawhelper_p.h | 35 ++++++ src/gui/painting/qdrawhelper_sse2.cpp | 72 +++++++++++ src/gui/painting/qdrawhelper_x86_p.h | 3 + 4 files changed, 229 insertions(+), 105 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index cf487b5..03ed597 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -1485,7 +1485,7 @@ static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint); }\ } -static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha) +void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha) { comp_func_Clear_impl(dest, length, const_alpha); } @@ -1499,7 +1499,7 @@ void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint cons result = s dest = s * ca + d * cia */ -static void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) { QT_MEMFILL_UINT(dest, length, color); @@ -1528,7 +1528,7 @@ void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint } } -static void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint) +void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint) { } @@ -1542,7 +1542,7 @@ void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint) = s * ca + d * (sia * ca + cia) = s * ca + d * (1 - sa*ca) */ -static void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha) { if ((const_alpha & qAlpha(color)) == 255) { QT_MEMFILL_UINT(dest, length, color); @@ -1583,7 +1583,7 @@ void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, u dest = (d + s * dia) * ca + d * cia = d + s * dia * ca */ -static void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha != 255) color = BYTE_MUL(color, const_alpha); @@ -1618,7 +1618,7 @@ void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int leng result = s * da dest = s * da * ca + d * cia */ -static void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha) { PRELOAD_INIT(dest) if (const_alpha == 255) { @@ -1661,7 +1661,7 @@ void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uin dest = d * sa * ca + d * cia = d * (sa * ca + cia) */ -static void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha) { uint a = qAlpha(color); if (const_alpha != 255) { @@ -1697,7 +1697,7 @@ void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length dest = s * dia * ca + d * cia */ -static void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha) { PRELOAD_INIT(dest) if (const_alpha == 255) { @@ -1740,7 +1740,7 @@ void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, ui dest = d * sia * ca + d * cia = d * (sia * ca + cia) */ -static void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha) { uint a = qAlpha(~color); if (const_alpha != 255) @@ -1776,7 +1776,7 @@ void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int lengt = s*ca * da + d * (sia*ca + cia) = s*ca * da + d * (1 - sa*ca) */ -static void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha != 255) { color = BYTE_MUL(color, const_alpha); @@ -1814,7 +1814,7 @@ void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, u dest = d*sa*ca + s*dia*ca + d *cia = s*ca * dia + d * (sa*ca + cia) */ -static void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha) { uint a = qAlpha(color); if (const_alpha != 255) { @@ -1857,7 +1857,7 @@ void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int leng = s*ca * dia + d * (sia*ca + cia) = s*ca * dia + d * (1 - sa*ca) */ -static void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha != 255) color = BYTE_MUL(color, const_alpha); @@ -1938,7 +1938,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Plus_impl(uint *dest, int } } -static void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Plus_impl(dest, length, color, QFullCoverage()); @@ -2002,7 +2002,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Multiply_impl(uint *dest, } } -static void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage()); @@ -2070,7 +2070,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Screen_impl(uint *dest, i } } -static void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Screen_impl(dest, length, color, QFullCoverage()); @@ -2149,7 +2149,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Overlay_impl(uint *dest, } } -static void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage()); @@ -2222,7 +2222,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Darken_impl(uint *dest, i } } -static void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Darken_impl(dest, length, color, QFullCoverage()); @@ -2295,7 +2295,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Lighten_impl(uint *dest, } } -static void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage()); @@ -2378,7 +2378,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorDodge_impl(uint *des } } -static void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage()); @@ -2461,7 +2461,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorBurn_impl(uint *dest } } -static void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage()); @@ -2541,7 +2541,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_HardLight_impl(uint *dest } } -static void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage()); @@ -2632,7 +2632,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_SoftLight_impl(uint *dest } } -static void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage()); @@ -2705,7 +2705,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Difference_impl(uint *des } } -static void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Difference_impl(dest, length, color, QFullCoverage()); @@ -2772,7 +2772,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void QT_FASTCALL comp_func_solid_Exclusion_imp } } -static void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha) +void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha) { if (const_alpha == 255) comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage()); @@ -2816,10 +2816,10 @@ void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, ui # pragma pop #endif -static void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) @@ -2836,10 +2836,10 @@ void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, *dest++ |= *src++; } -static void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); color |= 0xff000000; @@ -2859,10 +2859,10 @@ void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, } } -static void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); color &= 0x00ffffff; @@ -2882,10 +2882,10 @@ void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, } } -static void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); color = ~color; @@ -2907,10 +2907,10 @@ void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, } } -static void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); color = ~color | 0xff000000; @@ -2932,10 +2932,10 @@ void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, } } -static void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); color = ~color & 0x00ffffff; @@ -2957,8 +2957,8 @@ void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, } } -static void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, - uint color, uint const_alpha) +void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, + uint color, uint const_alpha) { Q_UNUSED(const_alpha); qt_memfill(dest, ~color | 0xff000000, length); @@ -2972,10 +2972,10 @@ void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, *dest++ = ~(*src++) | 0xff000000; } -static void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); color = ~color | 0xff000000; @@ -2997,10 +2997,10 @@ void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, } } -static void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, - int length, - uint color, - uint const_alpha) +void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, + int length, + uint color, + uint const_alpha) { Q_UNUSED(const_alpha); while (length--) { @@ -7739,6 +7739,55 @@ void qInitDrawhelperAsm() #ifdef QT_HAVE_SSE if (features & SSE) { + extern void qt_blend_rgb32_on_rgb32_sse(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + extern void qt_blend_argb32_on_argb32_sse(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + + qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse; + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse; + } +#endif // SSE + +#ifdef QT_HAVE_SSE2 + if (features & SSE2) { + extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + + qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; + } + +#ifdef QT_HAVE_SSSE3 + if (features & SSSE3) { + extern void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; + } +#endif // SSSE3 + +#endif // SSE2 + +#ifdef QT_HAVE_SSE + if (features & SSE) { functionForModeAsm = qt_functionForMode_SSE; functionForModeSolidAsm = qt_functionForModeSolid_SSE; qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_sse; @@ -7754,9 +7803,9 @@ void qInitDrawhelperAsm() #ifdef QT_HAVE_SSE2 if (features & SSE2) { extern void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, - const uint *srcPixels, - int length, - uint const_alpha); + const uint *srcPixels, + int length, + uint const_alpha); extern void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha); extern void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha); extern void QT_FASTCALL comp_func_Source_sse2(uint *dst, const uint *src, int length, uint const_alpha); @@ -7765,51 +7814,16 @@ void qInitDrawhelperAsm() functionForModeAsm[QPainter::CompositionMode_Source] = comp_func_Source_sse2; functionForModeAsm[QPainter::CompositionMode_Plus] = comp_func_Plus_sse2; functionForModeSolidAsm[0] = comp_func_solid_SourceOver_sse2; - - extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - - qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2; - qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2; - -#if defined(QT_HAVE_SSSE3) - if (features & SSSE3) { - extern void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3; - } -#endif // QT_HAVE_SSSE3 - } else -#endif - { - extern void qt_blend_rgb32_on_rgb32_sse(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - extern void qt_blend_argb32_on_argb32_sse(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - - - qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse; - qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse; } -} -#endif // SSE +#endif + } +#elif defined(QT_HAVE_SSE2) + // this is the special case when SSE2 is usable but MMX/SSE is not usable (e.g.: Windows x64 + visual studio) + if (features & SSE2) { + functionForModeAsm = qt_functionForMode_onlySSE2; + functionForModeSolidAsm = qt_functionForModeSolid_onlySSE2; + } +#endif #ifdef QT_HAVE_IWMMXT if (features & IWMMXT) { diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 5747da5..0cc2e40 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -1997,6 +1997,41 @@ void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uin void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha); void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha); +// prototypes of all the solid composition functions +void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Destination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, int length, uint color, uint const_alpha); +void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha); + QT_END_NAMESPACE #endif // QDRAWHELPER_P_H diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index 5b674b5..ba2ba32 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -311,6 +311,78 @@ void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, u } } +CompositionFunctionSolid qt_functionForModeSolid_onlySSE2[numCompositionFunctions] = { + comp_func_solid_SourceOver_sse2, + comp_func_solid_DestinationOver, + comp_func_solid_Clear, + comp_func_solid_Source, + comp_func_solid_Destination, + comp_func_solid_SourceIn, + comp_func_solid_DestinationIn, + comp_func_solid_SourceOut, + comp_func_solid_DestinationOut, + comp_func_solid_SourceAtop, + comp_func_solid_DestinationAtop, + comp_func_solid_XOR, + comp_func_solid_Plus, + comp_func_solid_Multiply, + comp_func_solid_Screen, + comp_func_solid_Overlay, + comp_func_solid_Darken, + comp_func_solid_Lighten, + comp_func_solid_ColorDodge, + comp_func_solid_ColorBurn, + comp_func_solid_HardLight, + comp_func_solid_SoftLight, + comp_func_solid_Difference, + comp_func_solid_Exclusion, + rasterop_solid_SourceOrDestination, + rasterop_solid_SourceAndDestination, + rasterop_solid_SourceXorDestination, + rasterop_solid_NotSourceAndNotDestination, + rasterop_solid_NotSourceOrNotDestination, + rasterop_solid_NotSourceXorDestination, + rasterop_solid_NotSource, + rasterop_solid_NotSourceAndDestination, + rasterop_solid_SourceAndNotDestination +}; + +CompositionFunction qt_functionForMode_onlySSE2[numCompositionFunctions] = { + comp_func_SourceOver_sse2, + comp_func_DestinationOver, + comp_func_Clear, + comp_func_Source_sse2, + comp_func_Destination, + comp_func_SourceIn, + comp_func_DestinationIn, + comp_func_SourceOut, + comp_func_DestinationOut, + comp_func_SourceAtop, + comp_func_DestinationAtop, + comp_func_XOR, + comp_func_Plus_sse2, + comp_func_Multiply, + comp_func_Screen, + comp_func_Overlay, + comp_func_Darken, + comp_func_Lighten, + comp_func_ColorDodge, + comp_func_ColorBurn, + comp_func_HardLight, + comp_func_SoftLight, + comp_func_Difference, + comp_func_Exclusion, + rasterop_SourceOrDestination, + rasterop_SourceAndDestination, + rasterop_SourceXorDestination, + rasterop_NotSourceAndNotDestination, + rasterop_NotSourceOrNotDestination, + rasterop_NotSourceXorDestination, + rasterop_NotSource, + rasterop_NotSourceAndDestination, + rasterop_SourceAndNotDestination +}; + void qt_memfill16_sse2(quint16 *dest, quint16 value, int count) { if (count < 3) { diff --git a/src/gui/painting/qdrawhelper_x86_p.h b/src/gui/painting/qdrawhelper_x86_p.h index d7282a7..09ccd77 100644 --- a/src/gui/painting/qdrawhelper_x86_p.h +++ b/src/gui/painting/qdrawhelper_x86_p.h @@ -122,6 +122,9 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha); + +extern CompositionFunction qt_functionForMode_onlySSE2[]; +extern CompositionFunctionSolid qt_functionForModeSolid_onlySSE2[]; #endif // QT_HAVE_SSE2 #ifdef QT_HAVE_IWMMXT -- cgit v0.12 From 3113a91f50f12c8ee53f2e84f6b46fde6c2c1693 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 6 Sep 2010 19:20:29 +1000 Subject: Increase maximum heap size of minehunt demo to fix crashing on Symbian Task-number: QT-3821 Reviewed-by: Martin Jones --- demos/declarative/minehunt/minehunt.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 1d56013..7a491ab 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -15,6 +15,7 @@ INSTALLS = sources target symbian:{ TARGET.EPOCALLOWDLLDATA = 1 + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) qmlminehuntfiles.sources = MinehuntCore minehunt.qml DEPLOYMENT = qmlminehuntfiles -- cgit v0.12 From d77ee9ad223c90cb5c690526632d978c0901d226 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 7 Sep 2010 13:55:22 +1000 Subject: ListView: Ensure highlight is positioned correctly in positionViewAtIndex(). Also update the currentItem position during flicking and avoid resizing the highlight on section boundaries. Task-number: QT-3870 --- .../graphicsitems/qdeclarativelistview.cpp | 71 +++++++++++++++++----- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 1c634d2..2eae0af 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -105,12 +105,23 @@ public: else return (view->orientation() == QDeclarativeListView::Vertical ? item->y() : item->x()); } + qreal itemPosition() const { + return (view->orientation() == QDeclarativeListView::Vertical ? item->y() : item->x()); + } qreal size() const { if (section) - return (view->orientation() == QDeclarativeListView::Vertical ? item->height()+section->height() : item->width()+section->height()); + return (view->orientation() == QDeclarativeListView::Vertical ? item->height()+section->height() : item->width()+section->width()); else return (view->orientation() == QDeclarativeListView::Vertical ? item->height() : item->width()); } + qreal itemSize() const { + return (view->orientation() == QDeclarativeListView::Vertical ? item->height() : item->width()); + } + qreal sectionSize() const { + if (section) + return (view->orientation() == QDeclarativeListView::Vertical ? section->height() : section->width()); + return 0.0; + } qreal endPosition() const { return (view->orientation() == QDeclarativeListView::Vertical ? item->y() + (item->height() > 0 ? item->height() : 1) @@ -131,6 +142,12 @@ public: item->setX(pos); } } + void setSize(qreal size) { + if (view->orientation() == QDeclarativeListView::Vertical) + item->setHeight(size); + else + item->setWidth(size); + } bool contains(int x, int y) const { return (x >= item->x() && x < item->x() + item->width() && y >= item->y() && y < item->y() + item->height()); @@ -256,7 +273,12 @@ public: if (!visibleItems.isEmpty()) { if (modelIndex < visibleIndex) { int count = visibleIndex - modelIndex; - return (*visibleItems.constBegin())->position() - count * (averageSize + spacing); + qreal cs = 0; + if (modelIndex == currentIndex && currentItem) { + cs = currentItem->size() + spacing; + --count; + } + return (*visibleItems.constBegin())->position() - count * (averageSize + spacing) - cs; } else { int idx = visibleItems.count() - 1; while (idx >= 0 && visibleItems.at(idx)->index == -1) @@ -716,6 +738,11 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer) if (visibleItems.count()) visiblePos = (*visibleItems.constBegin())->position(); updateAverage(); + if (currentIndex >= 0 && currentItem && !visibleItem(currentIndex)) { + currentItem->setPosition(positionAt(currentIndex)); + updateHighlight(); + } + if (sectionCriteria) updateCurrentSection(); if (header) @@ -885,8 +912,8 @@ void QDeclarativeListViewPrivate::updateHighlight() createHighlight(); if (currentItem && autoHighlight && highlight && !movingHorizontally && !movingVertically) { // auto-update highlight - highlightPosAnimator->to = currentItem->position(); - highlightSizeAnimator->to = currentItem->size(); + highlightPosAnimator->to = currentItem->itemPosition(); + highlightSizeAnimator->to = currentItem->itemSize(); if (orient == QDeclarativeListView::Vertical) { if (highlight->item->width() == 0) highlight->item->setWidth(currentItem->item->width()); @@ -987,7 +1014,7 @@ void QDeclarativeListViewPrivate::updateCurrentSection() return; } int index = 0; - while (visibleItems.at(index)->endPosition() < position() && index < visibleItems.count()) + while (index < visibleItems.count() && visibleItems.at(index)->endPosition() < position()) ++index; if (index < visibleItems.count()) @@ -1172,9 +1199,9 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m } if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) { updateHighlight(); - qreal currPos = currentItem->position(); - if (pos < currPos + currentItem->size() - highlightRangeEnd) - pos = currPos + currentItem->size() - highlightRangeEnd; + qreal currPos = currentItem->itemPosition(); + if (pos < currPos + currentItem->itemSize() - highlightRangeEnd) + pos = currPos + currentItem->itemSize() - highlightRangeEnd; if (pos > currPos - highlightRangeStart) pos = currPos - highlightRangeStart; } @@ -1191,10 +1218,10 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m } else if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) { if (currentItem) { updateHighlight(); - qreal pos = currentItem->position(); + qreal pos = currentItem->itemPosition(); qreal viewPos = position(); - if (viewPos < pos + currentItem->size() - highlightRangeEnd) - viewPos = pos + currentItem->size() - highlightRangeEnd; + if (viewPos < pos + currentItem->itemSize() - highlightRangeEnd) + viewPos = pos + currentItem->itemSize() - highlightRangeEnd; if (viewPos > pos - highlightRangeStart) viewPos = pos - highlightRangeStart; @@ -2342,6 +2369,10 @@ qreal QDeclarativeListView::minYExtent() const d->minExtent += d->header->size(); if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { d->minExtent += d->highlightRangeStart; + if (d->sectionCriteria) { + if (d->visibleItem(0)) + d->minExtent -= d->visibleItem(0)->sectionSize(); + } d->minExtent = qMax(d->minExtent, -(d->endPositionAt(0) - d->highlightRangeEnd + 1)); } d->minExtentDirty = false; @@ -2589,6 +2620,11 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode) d->moveReason = QDeclarativeListViewPrivate::Other; cancelFlick(); d->setPosition(pos); + if (d->highlight) { + d->highlight->setPosition(d->currentItem->itemPosition()); + d->highlight->setSize(d->currentItem->itemSize()); + d->updateHighlight(); + } } d->fixupPosition(); } @@ -2649,7 +2685,12 @@ void QDeclarativeListView::trackedPositionChanged() if (!d->trackedItem || !d->currentItem) return; if (d->moveReason == QDeclarativeListViewPrivate::SetIndex) { - const qreal trackedPos = qCeil(d->trackedItem->position()); + qreal trackedPos = qCeil(d->trackedItem->position()); + qreal trackedSize = d->trackedItem->size(); + if (d->trackedItem != d->currentItem) { + trackedPos -= d->currentItem->sectionSize(); + trackedSize += d->currentItem->sectionSize(); + } const qreal viewPos = d->position(); qreal pos = viewPos; if (d->haveHighlightRange) { @@ -2668,8 +2709,8 @@ void QDeclarativeListView::trackedPositionChanged() } else { if (trackedPos < viewPos + d->highlightRangeStart) { pos = trackedPos - d->highlightRangeStart; - } else if (trackedPos > viewPos + d->highlightRangeEnd - d->trackedItem->size()) { - pos = trackedPos - d->highlightRangeEnd + d->trackedItem->size(); + } else if (trackedPos > viewPos + d->highlightRangeEnd - trackedSize) { + pos = trackedPos - d->highlightRangeEnd + trackedSize; } } } @@ -2680,7 +2721,7 @@ void QDeclarativeListView::trackedPositionChanged() && d->currentItem->endPosition() >= viewPos + d->size()) { if (d->trackedItem->endPosition() <= d->currentItem->endPosition()) { pos = d->trackedItem->endPosition() - d->size() + 1; - if (d->trackedItem->size() > d->size()) + if (trackedSize > d->size()) pos = trackedPos; } else { pos = d->currentItem->endPosition() - d->size() + 1; -- cgit v0.12 From ead14cd61da071ac10e7a83b9c1d05098cf2a679 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 6 Sep 2010 18:04:13 +1000 Subject: Pause orientation sensors in Qml Viewer when the application window is not active Task-number: QTBUG-13347 Reviewed-by: Martin Jones --- tools/qml/deviceorientation.cpp | 5 ++++ tools/qml/deviceorientation.h | 3 ++ tools/qml/deviceorientation_maemo5.cpp | 53 +++++++++++++++++++++++---------- tools/qml/deviceorientation_symbian.cpp | 27 ++++++++++++++++- tools/qml/qmlruntime.cpp | 2 ++ 5 files changed, 73 insertions(+), 17 deletions(-) diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp index e7c70d5..d3014ad 100644 --- a/tools/qml/deviceorientation.cpp +++ b/tools/qml/deviceorientation.cpp @@ -53,6 +53,11 @@ public: return m_orientation; } + void pauseListening() { + } + void resumeListening() { + } + void setOrientation(Orientation o) { if (o != m_orientation) { m_orientation = o; diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h index 817bfc8..487ebd4 100644 --- a/tools/qml/deviceorientation.h +++ b/tools/qml/deviceorientation.h @@ -63,6 +63,9 @@ public: virtual Orientation orientation() const = 0; virtual void setOrientation(Orientation) = 0; + virtual void pauseListening() = 0; + virtual void resumeListening() = 0; + static DeviceOrientation *instance(); signals: diff --git a/tools/qml/deviceorientation_maemo5.cpp b/tools/qml/deviceorientation_maemo5.cpp index e942579..a324820 100644 --- a/tools/qml/deviceorientation_maemo5.cpp +++ b/tools/qml/deviceorientation_maemo5.cpp @@ -50,23 +50,9 @@ class MaemoOrientation : public DeviceOrientation Q_OBJECT public: MaemoOrientation() - : o(UnknownOrientation) + : o(UnknownOrientation), sensorEnabled(false) { - // enable the orientation sensor - QDBusConnection::systemBus().call( - QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, - MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ)); - - // query the initial orientation - QDBusMessage reply = QDBusConnection::systemBus().call( - QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, - MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET)); - if (reply.type() == QDBusMessage::ErrorMessage) { - qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage())); - } else { - o = toOrientation(reply.arguments().value(0).toString()); - } - + resumeListening(); // connect to the orientation change signal QDBusConnection::systemBus().connect(QString(), MCE_SIGNAL_PATH, MCE_SIGNAL_IF, MCE_DEVICE_ORIENTATION_SIG, @@ -91,6 +77,40 @@ public: { } + void pauseListening() { + if (sensorEnabled) { + // disable the orientation sensor + QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, + MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ)); + sensorEnabled = false; + } + } + + void resumeListening() { + if (!sensorEnabled) { + // enable the orientation sensor + QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, + MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ)); + + QDBusMessage reply = QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, + MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET)); + + if (reply.type() == QDBusMessage::ErrorMessage) { + qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage())); + } else { + Orientation orientation = toOrientation(reply.arguments().value(0).toString()); + if (o != orientation) { + o = orientation; + emit orientationChanged(); + } + sensorEnabled = true; + } + } + } + private Q_SLOTS: void deviceOrientationChanged(const QString &newOrientation) { @@ -116,6 +136,7 @@ private: private: Orientation o; + bool sensorEnabled; }; DeviceOrientation* DeviceOrientation::instance() diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp index 307c417..7710cf9 100644 --- a/tools/qml/deviceorientation_symbian.cpp +++ b/tools/qml/deviceorientation_symbian.cpp @@ -52,7 +52,7 @@ class SymbianOrientation : public DeviceOrientation, public MSensrvDataListener Q_OBJECT public: SymbianOrientation() - : DeviceOrientation(), m_current(UnknownOrientation), m_sensorChannel(0) + : DeviceOrientation(), m_current(UnknownOrientation), m_sensorChannel(0), m_channelOpen(false) { TRAP_IGNORE(initL()); if (!m_sensorChannel) @@ -84,6 +84,7 @@ public: TRAP(error, m_sensorChannel->OpenChannelL()); if (!error) { TRAP(error, m_sensorChannel->StartDataListeningL(this, 1, 1, 0)); + m_channelOpen = true; break; } if (error) { @@ -107,6 +108,30 @@ public: private: DeviceOrientation::Orientation m_current; CSensrvChannel *m_sensorChannel; + bool m_channelOpen; + void pauseListening() { + if (m_sensorChannel && m_channelOpen) { + m_sensorChannel->StopDataListening(); + m_sensorChannel->CloseChannel(); + m_channelOpen = false; + } + } + + void resumeListening() { + if (m_sensorChannel && !m_channelOpen) { + TRAPD(error, m_sensorChannel->OpenChannelL()); + if (!error) { + TRAP(error, m_sensorChannel->StartDataListeningL(this, 1, 1, 0)); + if (!error) { + m_channelOpen = true; + } + } + if (error) { + delete m_sensorChannel; + m_sensorChannel = 0; + } + } + } void DataReceived(CSensrvChannel &channel, TInt count, TInt dataLost) { diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 321b7fd..b38e80d 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -1208,8 +1208,10 @@ bool QDeclarativeViewer::event(QEvent *event) { if (event->type() == QEvent::WindowActivate) { Runtime::instance()->setActiveWindow(true); + DeviceOrientation::instance()->resumeListening(); } else if (event->type() == QEvent::WindowDeactivate) { Runtime::instance()->setActiveWindow(false); + DeviceOrientation::instance()->pauseListening(); } return QWidget::event(event); } -- cgit v0.12 From 5d4b7c1d3f7e8fb1ef84ffa102123ca267cb7eef Mon Sep 17 00:00:00 2001 From: Petri Kiiskinen Date: Wed, 4 Aug 2010 11:02:41 +0300 Subject: resolving method name does not work for Symbian so need to use ordinal instead Merge-request: 768 Signed-off-by: axis --- src/gui/kernel/qapplication.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 3d3a749..82dd83a 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -809,6 +809,12 @@ void QApplicationPrivate::construct( if (testLib.load()) { typedef void (*TasInitialize)(void); TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init"); +#ifdef Q_OS_SYMBIAN + // resolving method by name does not work on Symbian OS so need to use ordinal + if(!initFunction) { + initFunction = (TasInitialize)testLib.resolve("1"); + } +#endif if (initFunction) { initFunction(); } else { -- cgit v0.12 From 6b5ce2ed14efc6c616862044f4c8d3ce2c5f18a7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 7 Sep 2010 17:35:16 +1000 Subject: Fix incorrect license header. Reviewed-by: Trust Me --- src/xmlpatterns/parser/createTokenLookup.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/xmlpatterns/parser/createTokenLookup.sh b/src/xmlpatterns/parser/createTokenLookup.sh index 01af6ca..e11a3ba 100755 --- a/src/xmlpatterns/parser/createTokenLookup.sh +++ b/src/xmlpatterns/parser/createTokenLookup.sh @@ -71,16 +71,16 @@ license=`cat < Date: Fri, 27 Aug 2010 09:27:13 +0200 Subject: Fixed hiding a window on X11 before it was shown. On X11 show() just issues a request to show a window, so if someone tries to call hide() before the window was successfully mapped to the screen by the window manager it will not work (on most window managers unfortunately). So instead, when hide() is called we internally mark the window as "no need to show anymore" and then if we still get MapNotify event, we will hide the window right away. Reviewed-by: Markus Goetz Reviewed-by: Bradley T. Hughes --- src/gui/kernel/qapplication_x11.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index e4d9848..7495f6d 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3642,6 +3642,11 @@ int QApplication::x11ProcessEvent(XEvent* event) case MapNotify: // window shown if (widget->isWindow()) { + // if we got a MapNotify when we were not waiting for it, it most + // likely means the user has already asked to hide the window before + // it ever being shown, so we try to withdraw a window after sending + // the QShowEvent. + bool pendingHide = widget->testAttribute(Qt::WA_WState_ExplicitShowHide) && widget->testAttribute(Qt::WA_WState_Hidden); widget->d_func()->topData()->waitingForMapNotify = 0; if (widget->windowType() != Qt::Popup) { @@ -3661,6 +3666,8 @@ int QApplication::x11ProcessEvent(XEvent* event) widget->setAttribute(Qt::WA_WState_Visible, true); } } + if (pendingHide) // hide the window + XWithdrawWindow(X11->display, widget->internalWinId(), widget->x11Info().screen()); } break; -- cgit v0.12 From 201e4927f9e23150f460e711a2859dbff3e1353c Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 7 Sep 2010 10:31:41 +0200 Subject: Replaced QWeakPointer to *Pointer in QGestureManager. The QWeakPointer was part of a key in a QMap. When the QWeakPointer gets deleted, the key changes and the sorting of the Map was wrong. That leads to an random crash. It should be safe not to use QWeakPointer as we remove pointers from the objectGestures map when a widget or graphicsitem gets destroyed. Reviewed-by: Denis Dzyubenko --- src/gui/kernel/qgesturemanager.cpp | 3 ++- src/gui/kernel/qgesturemanager_p.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index cb4061e..5c80340 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -162,7 +162,7 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ QMap >::Iterator iter = m_objectGestures.begin(); while (iter != m_objectGestures.end()) { ObjectGesture objectGesture = iter.key(); - if (objectGesture.gesture == type && target == objectGesture.object.data()) { + if (objectGesture.gesture == type && target == objectGesture.object) { QSet gestures = iter.value().toSet(); for (QHash >::iterator it = m_obsoleteGestures.begin(), e = m_obsoleteGestures.end(); it != e; ++it) { @@ -172,6 +172,7 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ m_deletedRecognizers.remove(g); m_gestureToRecognizer.remove(g); } + qDeleteAll(gestures); iter = m_objectGestures.erase(iter); } else { diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h index 747cb1a..0d84b67 100644 --- a/src/gui/kernel/qgesturemanager_p.h +++ b/src/gui/kernel/qgesturemanager_p.h @@ -106,13 +106,13 @@ private: struct ObjectGesture { - QWeakPointer object; + QObject* object; Qt::GestureType gesture; ObjectGesture(QObject *o, const Qt::GestureType &g) : object(o), gesture(g) { } inline bool operator<(const ObjectGesture &rhs) const { - if (object.data() < rhs.object.data()) + if (object < rhs.object) return true; if (object == rhs.object) return gesture < rhs.gesture; -- cgit v0.12 From 5360be909d8d5e8b3a3b6e391e80b86027d7f2a2 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 7 Sep 2010 10:49:28 +0200 Subject: Make compile on gcce instead of friend use static to avoid gcce saying a formerly extern declaration turned into a static declaration. Reviewed-by: axis --- src/gui/image/qpixmap_s60.cpp | 11 +++++++---- src/gui/image/qpixmap_s60_p.h | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index dbdf0bc..68179d7 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -66,9 +66,10 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08, static bool cleanup_function_registered = false; static QS60PixmapData *firstPixmap = 0; -static void qt_symbian_register_pixmap(QS60PixmapData *pd) +// static +void QS60PixmapData::qt_symbian_register_pixmap(QS60PixmapData *pd) { - if(!cleanup_function_registered) { + if (!cleanup_function_registered) { qAddPostRoutine(qt_symbian_release_pixmaps); cleanup_function_registered = true; } @@ -80,7 +81,8 @@ static void qt_symbian_register_pixmap(QS60PixmapData *pd) firstPixmap = pd; } -static void qt_symbian_unregister_pixmap(QS60PixmapData *pd) +// static +void QS60PixmapData::qt_symbian_unregister_pixmap(QS60PixmapData *pd) { if (pd->next) pd->next->prev = pd->prev; @@ -90,7 +92,8 @@ static void qt_symbian_unregister_pixmap(QS60PixmapData *pd) firstPixmap = pd->next; } -static void qt_symbian_release_pixmaps() +// static +void QS60PixmapData::qt_symbian_release_pixmaps() { // Scan all QS60PixmapData objects in the system and destroy them. QS60PixmapData *pd = firstPixmap; diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index a82f5c2..12885ec 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -128,9 +128,9 @@ private: QS60PixmapData *next; QS60PixmapData *prev; - friend void qt_symbian_register_pixmap(QS60PixmapData *pd); - friend void qt_symbian_unregister_pixmap(QS60PixmapData *pd); - friend void qt_symbian_release_pixmaps(); + static void qt_symbian_register_pixmap(QS60PixmapData *pd); + static void qt_symbian_unregister_pixmap(QS60PixmapData *pd); + static void qt_symbian_release_pixmaps(); friend class QPixmap; friend class QS60WindowSurface; -- cgit v0.12 From cd8118835421d30ef37a29df5c2286282fb2f8ed Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 7 Sep 2010 10:51:55 +0200 Subject: Remove unused variable Reviewed-by: axis --- src/gui/image/qpixmap_s60.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 68179d7..47249d9 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -831,7 +831,6 @@ void* QS60PixmapData::toNativeType(NativeType type) bool convertToArgb32 = false; bool needsCopy = false; - QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); if (!(S60->supportsPremultipliedAlpha)) { // Convert argb32_premultiplied to argb32 since Symbian 9.2 does // not support premultipied format. -- cgit v0.12 From cbba0a1ea1e727cca4ca09c216e4f5a306083ba4 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 7 Sep 2010 10:55:06 +0200 Subject: Doc: updating the qdocconf files and the stylesheet QDocconf files was out of date in the section including extra files Style now shows numbered lists corectly --- doc/src/template/style/style.css | 17 ++++---- tools/qdoc3/test/assistant.qdocconf | 2 +- tools/qdoc3/test/designer.qdocconf | 12 ++++-- tools/qdoc3/test/linguist.qdocconf | 14 +++++-- tools/qdoc3/test/qdeclarative.qdocconf | 58 +++++++++++++++------------ tools/qdoc3/test/qmake.qdocconf | 58 +++++++++++++++------------ tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf | 12 ++---- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 12 ++---- tools/qdoc3/test/qt-defines.qdocconf | 6 --- tools/qdoc3/test/qt-html-templates.qdocconf | 16 ++++++-- tools/qdoc3/test/qt.qdocconf | 7 ---- tools/qdoc3/test/qt_ja_JP.qdocconf | 7 ---- tools/qdoc3/test/qt_zh_CN.qdocconf | 11 +++++ 13 files changed, 126 insertions(+), 106 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 9afff03..6cc1cb6 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -35,6 +35,10 @@ { list-style: none; } + ol li + { + list-style: decimal; + } caption, th { text-align: left; @@ -790,13 +794,12 @@ padding-left:12px; } - - - - - - - + .wrap .content ol li + { + background:none; + margin-bottom: 10px; + padding-left:0px; + } .content li:hover {} diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 8cf5722..836c4bf 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt Assistant description = Qt Assistant Manual -url = http://qt.nokia.com/doc/4.7 +url = http://doc.qt.nokia.com/4.7/ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index b1f37dc..9136619 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt Designer description = Qt Designer Manual -url = http://qt.nokia.com/doc/4.7 +url = http://doc.qt.nokia.com/4.7/ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index @@ -18,6 +18,9 @@ qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual qhp.Designer.extraFiles = images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -25,12 +28,12 @@ qhp.Designer.extraFiles = images/bg_l.png \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -38,7 +41,10 @@ qhp.Designer.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - style/OfflineStyle.css \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index 26fb55c..696802a 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt Linguist description = Qt Linguist Manual -url = http://qt.nokia.com/doc/4.7 +url = http://doc.qt.nokia.com/4.7/ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index @@ -18,6 +18,9 @@ qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual qhp.Linguist.extraFiles = images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -25,20 +28,23 @@ qhp.Linguist.extraFiles = images/bg_l.png \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ -s images/spinner.gif \ + images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - style/OfflineStyle.css \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 80bca29..45f48a6 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -28,32 +28,38 @@ qhp.Qml.indexTitle = Qml Reference # Files not referenced in any qdoc file # See also extraimages.HTML qhp.Qml.extraFiles = images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/arrow-down.png \ - images/spinner.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/OfflineStyle.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/arrow_down.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css qhp.Qml.filterAttributes = qt 4.7.0 qtrefdoc qhp.Qml.customFilters.Qt.name = Qt 4.7.0 diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index f069129..8125166 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -17,32 +17,38 @@ qhp.qmake.namespace = com.trolltech.qmake.470 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual qhp.qmake.extraFiles = images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/arrow-down.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/OfflineStyle.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/arrow_down.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css qhp.qmake.filterAttributes = qt 4.7.0 tools qmake qhp.qmake.customFilters.qmake.name = qmake Manual diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf index 7701cae..e0bb630 100644 --- a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf @@ -32,6 +32,9 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 qhp.Qt.extraFiles = index.html \ images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -39,12 +42,12 @@ qhp.Qt.extraFiles = index.html \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -52,17 +55,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index be459d8..297c6eb 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -32,6 +32,9 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 qhp.Qt.extraFiles = index.html \ images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -39,12 +42,12 @@ qhp.Qt.extraFiles = index.html \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -52,17 +55,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index 344bbb0..51ee0d3 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -49,20 +49,14 @@ scriptdirs = $QT_SOURCE_TREE/doc/src/template/scripts styledirs = $QT_SOURCE_TREE/doc/src/template/style scripts.HTML = functions.js \ - shBrushCpp.js \ - shCore.js \ - shLegacy.js \ narrow.js \ superfish.js \ jquery.js styles.HTML = style.css \ - shCore.css \ - shThemeDefault.css \ narrow.css \ superfish.css \ superfish_skin.css \ - OfflineStyle.css \ style_ie6.css \ style_ie7.css \ style_ie8.css diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index ed5ee17..1203357 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -164,12 +164,22 @@ HTML.footer = " \n" \ "
    \n" \ "
    X
    \n" \ "
    \n" \ - "

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and \n" \ - " requests, please use the Qt Bug Tracker.

    \n" \ + "

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and \n" \ + " requests, please use the Qt Bug Tracker.

    \n" \ "

    \n" \ "

    \n" \ "
    \n" \ "
    \n" \ "
    \n" \ + "
    \n" \ " \n" \ - " \n" + "\n" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index f78bd38..4f0d159 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -50,17 +50,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt_ja_JP.qdocconf b/tools/qdoc3/test/qt_ja_JP.qdocconf index d4141c7..f9ce142 100644 --- a/tools/qdoc3/test/qt_ja_JP.qdocconf +++ b/tools/qdoc3/test/qt_ja_JP.qdocconf @@ -57,17 +57,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index 4983f9e..5bf8171 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -34,6 +34,9 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 qhp.Qt.extraFiles = index.html \ images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -41,6 +44,7 @@ qhp.Qt.extraFiles = index.html \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ @@ -53,6 +57,13 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css language = Cpp -- cgit v0.12 From 5d044a343e398386940ac5e4c968d1bdbe127427 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 7 Sep 2010 12:54:49 +0200 Subject: Doc: adding remark on release of qt quick element support in creator --- doc/src/qt4-intro.qdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index a88b326..8684ad2 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -475,7 +475,8 @@ \i Qt Creator has been improved to support interactive editing of QML UIs through drag-and-drop. The text editor supports the QML syntax and provides authoring assistance such as auto-completion, - error lookup, help lookup and easy preview of QML UI's. + error lookup, help lookup and easy preview of QML UI's. The Qt + Quick features in Qt Creator will be released with Qt Creator 2.1 \endlist \section1 Network Bearer Management -- cgit v0.12 From 6b0e60a2f70acd7daab068443e26741b7c44db63 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 7 Sep 2010 13:05:20 +0200 Subject: Doc: updating details on Tier 2 platforms --- doc/src/platforms/supported-platforms.qdoc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index 6e9fb3d..83cd89b 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -85,11 +85,10 @@ \section1 Tier 2 Platforms - Tier 2 platforms are subjected to our unit test suite and other internal testing - tools prior to release of new product versions. Qt users should note, however, - that errors may be present in released product versions for Tier 2 platforms and, - subject to resource availability, known errors in Tier 2 platforms may or may not - be corrected prior to new version releases. + Tier 2 platforms are subject to ad hoc and internal testing. However, Qt users + should note that errors may be present in released product versions for Tier 2 + platforms and, subject to resource availability, known errors in Tier 2 platforms + may or may not be corrected prior to new version releases. \table \header \o Platform -- cgit v0.12 From 064b7fe6f97bcf214f749794c5ccab3b4cf0bcc7 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 7 Sep 2010 13:13:19 +0200 Subject: Doc: fixing page name bug caused by 07bbace404078dcfd82eff717daa97299b8ba52c changing qml elements page --- doc/src/index.qdoc | 2 +- tools/qdoc3/test/qt-html-templates.qdocconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 77856ec..edb4d1e 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -77,7 +77,7 @@ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 1203357..dc56ac9 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -89,7 +89,7 @@ HTML.postheader = "
    \n" \ "
  • Modules
  • \n" \ "
  • Namespaces
  • \n" \ "
  • Global Declarations
  • \n" \ - "
  • QML elements
  • \n" \ + "
  • QML elements
  • \n" \ " \n" \ "
    \n" \ " \n" \ -- cgit v0.12 From a93243ce81fdc71842bb133e7eadb9476e4648e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 7 Sep 2010 16:21:43 +0200 Subject: Always call QPainter::end() before using the object drawn to. This caused the background pixmap not to draw correctly on some systems. Reviewed-by: Samuel --- tests/arthur/common/paintcommands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp index 70d419e..c4f09a4 100644 --- a/tests/arthur/common/paintcommands.cpp +++ b/tests/arthur/common/paintcommands.cpp @@ -713,7 +713,7 @@ void PaintCommands::runCommands() QPainter pt(&pm); pt.fillRect(0, 0, 10, 10, QColor::fromRgba(0xffdfdfdf)); pt.fillRect(10, 10, 10, 10, QColor::fromRgba(0xffdfdfdf)); - + pt.end(); m_painter->drawTiledPixmap(0, 0, width, height, pm); } else { m_painter->fillRect(0, 0, width, height, Qt::white); -- cgit v0.12 From 3c18c2a43260a271f8a13e89053eede15d399005 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 7 Sep 2010 18:34:09 +0200 Subject: Doc: More work on the QML documentation. --- doc/src/declarative/declarativeui.qdoc | 1 + doc/src/declarative/qdeclarativedocument.qdoc | 2 +- doc/src/declarative/qdeclarativemodels.qdoc | 153 ++++++++++++--------- doc/src/declarative/qml-intro.qdoc | 2 +- doc/src/examples/qml-examples.qdoc | 2 +- doc/src/images/qml-listview-snippet.png | Bin 0 -> 2048 bytes doc/src/snippets/declarative/flickable.qml | 50 +++++++ doc/src/snippets/declarative/image.qml | 2 + .../declarative/listview/listview-snippet.qml | 52 +++++++ .../qml-data-models/dynamic-listmodel.qml | 67 +++++++++ .../declarative/qml-data-models/listelements.qml | 77 +++++++++++ .../qml-data-models/listmodel-listview.qml | 64 +++++++++ .../WebKit/qt/declarative/qdeclarativewebview.cpp | 86 ++++++++---- .../graphicsitems/qdeclarativeflickable.cpp | 56 +++++--- .../graphicsitems/qdeclarativeimage.cpp | 2 +- src/declarative/qml/qdeclarativetypeloader.cpp | 2 +- 16 files changed, 502 insertions(+), 116 deletions(-) create mode 100644 doc/src/images/qml-listview-snippet.png create mode 100644 doc/src/snippets/declarative/flickable.qml create mode 100644 doc/src/snippets/declarative/listview/listview-snippet.qml create mode 100644 doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml create mode 100644 doc/src/snippets/declarative/qml-data-models/listelements.qml create mode 100644 doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index ae64e2a..2f43682 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -109,6 +109,7 @@ Module. \list \o \l{Using QML Positioner and Repeater Items} \o \l{QML Data Models} +\o \l{Presenting Data with QML} \o \l{Network Transparency} \endlist diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc index 4aed63f..8ca6c11 100644 --- a/doc/src/declarative/qdeclarativedocument.qdoc +++ b/doc/src/declarative/qdeclarativedocument.qdoc @@ -79,7 +79,7 @@ Each instance is created with a different value for its \c text property: \o application.qml \row -\o \snippet doc/src/snippets/declarative/qmldocuments.qml document +\o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document \o \qml import Qt 4.7 diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index ace0465..7548c96 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -41,30 +41,7 @@ delegate may bind to. Here is a ListModel with two roles, \e type and \e age, and a ListView with a delegate that binds to these roles to display their values: -\qml -import Qt 4.7 - -Item { - width: 200; height: 250 - - ListModel { - id: myModel - ListElement { type: "Dog"; age: 8 } - ListElement { type: "Cat"; age: 5 } - } - - Component { - id: myDelegate - Text { text: type + ", " + age } - } - - ListView { - anchors.fill: parent - model: myModel - delegate: myDelegate - } -} -\endqml +\snippet doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml document If there is a naming clash between the model's properties and the delegate's properties, the roles can be accessed with the qualified \e model name instead. @@ -91,6 +68,10 @@ QML provides several types of data models among the built-in set of QML elements. In addition, models can be created with C++ and then made available to QML components. +The views used to access data models are described in \l{Presenting Data with QML}. +The use of positioner items to arrange items from a model is covered in +\l{Using QML Positioner and Repeater Items}. + \section1 QML Data Models @@ -99,38 +80,12 @@ made available to QML components. ListModel is a simple hierarchy of elements specified in QML. The available roles are specified by the \l ListElement properties. -\code -ListModel { - id: fruitModel - - ListElement { - name: "Apple" - cost: 2.45 - } - ListElement { - name: "Orange" - cost: 3.25 - } - ListElement { - name: "Banana" - cost: 1.95 - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-data-models/listelements.qml model The above model has two roles, \e name and \e cost. These can be bound to by a ListView delegate, for example: -\code -ListView { - width: 200; height: 250 - model: fruitModel - delegate: Row { - Text { text: "Fruit: " + name } - Text { text: "Cost: $" + cost } - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-data-models/listelements.qml view ListModel provides methods to manipulate the ListModel directly via JavaScript. In this case, the first item inserted determines the roles available @@ -138,16 +93,9 @@ to any views that are using the model. For example, if an empty ListModel is created and populated via JavaScript, the roles provided by the first insertion are the only roles that will be shown in the view: -\code -Item { - ListModel { id: fruitModel } - - MouseArea { - anchors.fill: parent - onClicked: fruitModel.append({"cost": 5.95, "name":"Pizza"}) - } -} -\endcode +\snippet doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml model +\dots +\snippet doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml mouse area When the MouseArea is clicked, \c fruitModel will have two roles, \e cost and \e name. Even if subsequent roles are added, only the first two will be handled by views @@ -515,3 +463,84 @@ a function in the model, e.g.: updated, and that \e{value} holds the new value. */ + +/*! +\page qml-presenting-data.html +\title Presenting Data with QML + +\section1 Introduction + +Qt Quick contains a set of standard items that can be used to present data in a +number of different ways. For simple user interfaces, +\l{Using QML Positioner and Repeater Items#Repeaters}{Repeaters} can be used +in combination with +\l{Using QML Positioner and Repeater Items#Positioners}{Positioners} +to obtain pieces of data and arrange them in a user interface. However, when +large quantities of data are involved, it is often better to use models with +the standard views since these contain many built-in display and navigation +features. + +\section1 Views + +Views are scrolling containers for collections of items. They are feature-rich, +supporting many of the use cases found in typical applications, and can be +customized to meet requirements on style and behavior. + +A set of standard views are provided in the basic set of Qt Quick +graphical elements: + +\list +\o \l{#ListView}{ListView} arranges items in a horizontal or vertical list +\o \l{#GridView}{GridView} arranges items in a grid within the available space +\o \l{#PathView}{PathView} arranges items on a path +\endlist + +Unlike these items, \l WebView is not a fully-featured view item, and needs +to be combined with a \l Flickable item to create a view that performs like +a Web browser. + +\section2 ListView + +\l ListView shows a classic list of items with horizontal or vertical placing +of items. + +\beginfloatright +\inlineimage qml-listview-snippet.png +\endfloat + +The following example shows a minimal ListView displaying a sequence of +numbers (using an \l{QML Data Models#An Integer}{integer as a model}). +A simple delegate is used to define an items for each piece of data in the +model. + +\clearfloat +\snippet doc/src/snippets/declarative/listview/listview-snippet.qml document + + + +\section2 GridView + +\l GridView displays items in a grid like an file manager's icon view. + +\section2 PathView + +\l PathView displays items on a path, where the selection remains in +the same place and the items move around it. + +\section1 Decorating Views + +\section2 Headers and Footers + +\section2 Sections + +\section2 Navigation + +In traditional user interfaces, views can be scrolled using standard +controls, such as scroll bars and arrow buttons. In some situations, it +is also possible to drag the view directly by pressing and holding a +mouse button while moving the cursor. In touch-based user interfaces, +this dragging action is often complemented with a flicking action, where +scrolling continues after the user has stopped touching the view. + +\section1 Further Reading +*/ diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc index d735042..b77611c 100644 --- a/doc/src/declarative/qml-intro.qdoc +++ b/doc/src/declarative/qml-intro.qdoc @@ -583,7 +583,7 @@ rectangle. The \c value attribute of 'dial' is set to a value based on the the rotation of the needle image. Notice this piece of code in Dial where the change in \c value modifies the position of the needle. -\snippet examples/declarative/ui-components/dialcontrol/Dial.qml needle angle +\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle angle This is part of the \c needleRotation that rotates the needle and causes the rotation of its shadow. \l SpringAnimation is an element that modifies the value diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 8752d14..745baa3 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -375,7 +375,7 @@ \title Models and Views: WebView Example \example declarative/modelviews/webview - These examples shows how to use the WebView element. + These examples show how to use the WebView element. \table \row diff --git a/doc/src/images/qml-listview-snippet.png b/doc/src/images/qml-listview-snippet.png new file mode 100644 index 0000000..0ee0ffc Binary files /dev/null and b/doc/src/images/qml-listview-snippet.png differ diff --git a/doc/src/snippets/declarative/flickable.qml b/doc/src/snippets/declarative/flickable.qml new file mode 100644 index 0000000..d7a163b --- /dev/null +++ b/doc/src/snippets/declarative/flickable.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Flickable { + width: 200; height: 200 + contentWidth: image.width; contentHeight: image.height + + Image { id: image; source: "bigImage.png" } +} +//! [document] diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/declarative/image.qml index b0ae032..42efb8f 100644 --- a/doc/src/snippets/declarative/image.qml +++ b/doc/src/snippets/declarative/image.qml @@ -38,8 +38,10 @@ ** ****************************************************************************/ +//! [document] import Qt 4.7 Image { source: "pics/qtlogo.png" } +//! [document] diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/declarative/listview/listview-snippet.qml new file mode 100644 index 0000000..c510472 --- /dev/null +++ b/doc/src/snippets/declarative/listview/listview-snippet.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE: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 Qt 4.7 + +ListView { + width: 50; height: 200 + model: 4 + delegate: Text { + text: index; + font.pixelSize: 40 + } +} +//! [document] diff --git a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml new file mode 100644 index 0000000..72e27f3 --- /dev/null +++ b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Item { + width: 200; height: 250 + + //! [model] + ListModel { id: fruitModel } + //! [model] + + //! [view] + ListView { + anchors.fill: parent + model: fruitModel + delegate: Row { + Text { text: "Fruit: " + name } + Text { text: "Cost: $" + cost } + } + } + //! [view] + + //! [mouse area] + MouseArea { + anchors.fill: parent + onClicked: fruitModel.append({"cost": 5.95, "name":"Pizza"}) + } + //! [mouse area] +} diff --git a/doc/src/snippets/declarative/qml-data-models/listelements.qml b/doc/src/snippets/declarative/qml-data-models/listelements.qml new file mode 100644 index 0000000..d9cea81 --- /dev/null +++ b/doc/src/snippets/declarative/qml-data-models/listelements.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Item { + width: 200; height: 250 + + //! [model] + ListModel { + id: fruitModel + + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } + } + //! [model] + + //! [view] + ListView { + anchors.fill: parent + model: fruitModel + delegate: Row { + Text { text: "Fruit: " + name } + Text { text: "Cost: $" + cost } + } + } + //! [view] +} +//! [document] diff --git a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml new file mode 100644 index 0000000..92107f1 --- /dev/null +++ b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Item { + width: 200; height: 250 + + ListModel { + id: myModel + ListElement { type: "Dog"; age: 8 } + ListElement { type: "Cat"; age: 5 } + } + + Component { + id: myDelegate + Text { text: type + ", " + age } + } + + ListView { + anchors.fill: parent + model: myModel + delegate: myDelegate + } +} +//! [document] diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index 1538133..67ce708 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -141,46 +141,76 @@ void GraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* event) \qmlclass WebView QDeclarativeWebView \ingroup qml-view-elements \since 4.7 - \brief The WebView item allows you to add web content to a canvas. + \brief The WebView item allows you to add Web content to a canvas. \inherits Item - A WebView renders web content based on a URL. + A WebView renders Web content based on a URL. This type is made available by importing the \c QtWebKit module: \bold{import QtWebKit 1.0} - If the width and height of the item is not set, they will - dynamically adjust to a size appropriate for the content. - This width may be large for typical online web pages. + The WebView item includes no scrolling, scaling, toolbars, or other common browser + components. These must be implemented around WebView. See the \l{QML Web Browser} + example for a demonstration of this. - If the width or height is explictly set, the rendered website - will be clipped, not scaled, to fit into the set dimensions. + The page to be displayed by the item is specified using the \l url property, + and this can be changed to fetch and display a new page. While the page loads, + the \l progress property is updated to indicate how much of the page has been + loaded. - If the preferredWidth is set, the width will be this amount or larger, - usually laying out the web content to fit the preferredWidth. + \section1 Appearance - \qml - import QtWebKit 1.0 + If the width and height of the item is not set, they will dynamically adjust + to a size appropriate for the content. This width may be large for typical + online web pages, typically greater than 800 by 600 pixels. - WebView { - url: "http://www.nokia.com" - preferredWidth: 490 - preferredHeight: 400 - scale: 0.5 - smooth: false - smoothCache: true - } - \endqml + If the \l{Item::}{width} or \l{Item::}{height} is explictly set, the rendered Web site will be + clipped, not scaled, to fit into the set dimensions. - \image webview.png + If the preferredWidth property is set, the width will be this amount or larger, + usually laying out the Web content to fit the preferredWidth. - The item includes no scrolling, scaling, - toolbars, etc., those must be implemented around WebView. See the WebBrowser example - for a demonstration of this. + The appearance of the content can be controlled to a certain extent by changing + the settings.standardFontFamily property and other settings related to fonts. + + The page can be zoomed by calling the heuristicZoom() method, which performs a + series of tests to determine whether zoomed content will be displayed in an + appropriate way in the space allocated to the item. + + \section1 User Interaction and Navigation + + By default, certain mouse and touch events are delivered to other items in + preference to the Web content. For example, when a scrolling view is created + by placing a WebView in a Flickable, move events are delivered to the Flickable + so that the user can scroll the page. This prevents the user from accidentally + selecting text in a Web page instead of scrolling. + + The pressGrabTime property defines the time the user must touch or press a + mouse button over the WebView before the Web content will receive the move + events it needs to select text and images. + + When this item has keyboard focus, all keyboard input will be sent directly to + the Web page within. + + When the navigates by clicking on links, the item records the pages visited + in its internal history + + Because this item is designed to be used as a component in a browser, it + exposes \l{Action}{actions} for \l back, \l forward, \l reload and \l stop. + These can be triggered to change the current page displayed by the item. + + \section1 Example Usage + + \beginfloatright + \inlineimage webview.png + \endfloat + + The following example displays a scaled down Web page at a fixed size. + + \snippet doc/src/snippets/declarative/webview/webview.qml document - When this item has keyboard focus, all keyboard input will be sent directly to the - web page within. + \clearfloat \sa {declarative/modelviews/webview}{WebView example}, {demos/declarative/webbrowser}{Web Browser demo} */ @@ -555,11 +585,11 @@ bool QDeclarativeWebView::heuristicZoom(int clickX, int clickY, qreal maxZoom) \qmlproperty int WebView::pressGrabTime The number of milliseconds the user must press before the WebView - starts passing move events through to the web engine (rather than + starts passing move events through to the Web engine (rather than letting other QML elements such as a Flickable take them). Defaults to 400ms. Set to 0 to always grab and pass move events to - the web engine. + the Web engine. */ int QDeclarativeWebView::pressGrabTime() const { diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index b302393..062bbfb 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -350,24 +350,34 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() \brief The Flickable item provides a surface that can be "flicked". \inherits Item - Flickable places its children on a surface that can be dragged and flicked. + The Flickable item places its children on a surface that can be dragged + and flicked, causing the view onto the child items to scroll. This + behavior forms the basis of Items that are designed to show large numbers + of child items, such as \l ListView and \l GridView. - \code - import Qt 4.7 + In traditional user interfaces, views can be scrolled using standard + controls, such as scroll bars and arrow buttons. In some situations, it + is also possible to drag the view directly by pressing and holding a + mouse button while moving the cursor. In touch-based user interfaces, + this dragging action is often complemented with a flicking action, where + scrolling continues after the user has stopped touching the view. - Flickable { - width: 200; height: 200 - contentWidth: image.width; contentHeight: image.height + Flickable does not automatically clip its contents. If it is not used as + a full-screen item, you should consider setting the \l{Item::}{clip} property + to true. - Image { id: image; source: "bigImage.png" } - } - \endcode + \section1 Example Usage + + \beginfloatright + \inlineimage flickable.gif + \endfloat - \image flickable.gif + The following example shows a large - Flickable does not automatically clip its contents. If - it is not full-screen it is likely that \l {Item::clip}{clip} should be set - to \c true. + \clearfloat + \snippet doc/src/snippets/declarative/flickable.qml document + + \section1 Limitations \note Due to an implementation detail, items placed inside a Flickable cannot anchor to it by \c id. Use \c parent instead. @@ -491,12 +501,15 @@ void QDeclarativeFlickable::setContentY(qreal pos) /*! \qmlproperty bool Flickable::interactive - This property holds whether the user can interact with the Flickable. A user - cannot drag or flick a Flickable that is not interactive. + This property describes whether the user can interact with the Flickable. + A user cannot drag or flick a Flickable that is not interactive. + + By default, this property is true. This property is useful for temporarily disabling flicking. This allows - special interaction with Flickable's children: for example, you might want to - freeze a flickable map while scrolling through a pop-up dialog that is a child of the Flickable. + special interaction with Flickable's children; for example, you might want + to freeze a flickable map while scrolling through a pop-up dialog that + is a child of the Flickable. */ bool QDeclarativeFlickable::isInteractive() const { @@ -1333,8 +1346,8 @@ bool QDeclarativeFlickable::isFlicking() const \qmlproperty bool Flickable::flickingHorizontally \qmlproperty bool Flickable::flickingVertically - These properties hold whether the view is currently moving horizontally - or vertically due to the user flicking the view. + These properties describe whether the view is currently moving horizontally, + vertically or in either direction, due to the user flicking the view. */ bool QDeclarativeFlickable::isFlickingHorizontally() const { @@ -1386,8 +1399,9 @@ bool QDeclarativeFlickable::isMoving() const \qmlproperty bool Flickable::movingHorizontally \qmlproperty bool Flickable::movingVertically - These properties hold whether the view is currently moving horizontally - or vertically due to the user either dragging or flicking the view. + These properties describe whether the view is currently moving horizontally, + vertically or in either direction, due to the user either dragging or + flicking the view. */ bool QDeclarativeFlickable::isMovingHorizontally() const { diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 2fab373..9cd9ad6 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE The following example shows the simplest usage of the Image element. - \snippet doc/src/snippets/declarative/image.qml + \snippet doc/src/snippets/declarative/image.qml document \beginfloatleft \image declarative-qtlogo.png diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index ed41314..9b42065 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -224,7 +224,7 @@ void QDeclarativeDataBlob::setError(const QDeclarativeError &errors) } /*! -\override +\overload */ void QDeclarativeDataBlob::setError(const QList &errors) { -- cgit v0.12 From c997a4ff5d83c8f41f5ed7d8c44dfbe61c67b486 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 7 Sep 2010 20:43:00 +0200 Subject: Fix text size issues for high ppi displays Many layout sizes in flickr are specified by the artwork sizes. The heights and widths are defined in static pixel sizes. Therefore the text has to obey the size restrictions, and should not overlap. This patch sets the font sizes in pixels. Otherwise the default font sizes in points may be too big on high ppi displays. (XM5800 has ~230 ppi) --- demos/declarative/flickr/common/Progress.qml | 2 +- demos/declarative/flickr/mobile/Button.qml | 2 +- demos/declarative/flickr/mobile/ImageDetails.qml | 2 +- demos/declarative/flickr/mobile/ListDelegate.qml | 6 +++--- demos/declarative/flickr/mobile/TitleBar.qml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demos/declarative/flickr/common/Progress.qml b/demos/declarative/flickr/common/Progress.qml index 99e1a7b..23bffb9 100644 --- a/demos/declarative/flickr/common/Progress.qml +++ b/demos/declarative/flickr/common/Progress.qml @@ -68,6 +68,6 @@ Item { text: Math.round(progress * 100) + "%" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - color: "white"; font.bold: true + color: "white"; font.bold: true; font.pixelSize: 15 } } diff --git a/demos/declarative/flickr/mobile/Button.qml b/demos/declarative/flickr/mobile/Button.qml index 93a6661..6228606 100644 --- a/demos/declarative/flickr/mobile/Button.qml +++ b/demos/declarative/flickr/mobile/Button.qml @@ -66,7 +66,7 @@ Item { } Text { color: "white" - anchors.centerIn: buttonImage; font.bold: true + anchors.centerIn: buttonImage; font.bold: true; font.pixelSize: 15 text: container.text; style: Text.Raised; styleColor: "black" } states: [ diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 7441ecc..6408fc6 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -96,7 +96,7 @@ Flipable { Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 } Common.Progress { - anchors.centerIn: parent; width: 200; height: 18 + anchors.centerIn: parent; width: 200; height: 22 progress: bigImage.progress; visible: bigImage.status != Image.Ready } diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml index 3dd2868..9ec02e1 100644 --- a/demos/declarative/flickr/mobile/ListDelegate.qml +++ b/demos/declarative/flickr/mobile/ListDelegate.qml @@ -55,9 +55,9 @@ Component { } Column { x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2 - Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } - Text { text: photoAuthor; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } - Text { text: photoDate; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: title; color: "white"; width: parent.width; font.pixelSize: 14; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } + Text { text: photoAuthor; width: parent.width; font.pixelSize: 14; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: photoDate; width: parent.width; font.pixelSize: 14; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" } } } } diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 335c315..60ca4dc 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -78,7 +78,7 @@ Item { } elide: Text.ElideLeft text: (rssModel.tags=="" ? untaggedString : taggedString + rssModel.tags) - font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black" + font.bold: true; font.pixelSize: 15; color: "White"; style: Text.Raised; styleColor: "Black" } Button { -- cgit v0.12 From 12d8ce6f03db8a577271ac042cd310a25dde0c21 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Tue, 7 Sep 2010 22:37:59 +0300 Subject: Remove unnecessary function declarations from qpixmap_s60_p.h Reviewed-by: TRUSTME --- src/gui/image/qpixmap_s60_p.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index 12885ec..42cc830 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -63,11 +63,6 @@ class CFbsBitGc; class QSymbianBitmapDataAccess; -class QS60PixmapData; -void qt_symbian_register_pixmap(QS60PixmapData *pd); -void qt_symbian_unregister_pixmap(QS60PixmapData *pd); -void qt_symbian_release_pixmaps(); - class QSymbianFbsHeapLock { public: -- cgit v0.12 From 2ac7d2691e6c69eedb3b4ae62a47ec2af85612d5 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 30 Aug 2010 13:54:29 +1000 Subject: Fix Worker ListModel to emit the right signal when items change --- src/declarative/util/qdeclarativelistmodelworkeragent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index 498de6d..d9df169 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -232,7 +232,7 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) emit m_orig->itemsMoved(change.index, change.to, change.count); break; case Change::Changed: - emit m_orig->itemsMoved(change.index, change.to, change.count); + emit m_orig->itemsChanged(change.index, change.to, orig->m_roles.keys()); break; } } -- cgit v0.12 From ef7ab65e1dd371d62fb8c93c78ac518e11e2810b Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 31 Aug 2010 10:38:35 +1000 Subject: Remove unused object --- src/declarative/util/qdeclarativelistmodel.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 60d8aa9..f290ab2 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -1247,7 +1247,6 @@ void ModelNode::setObjectValue(const QScriptValue& valuemap) { } void ModelNode::setListValue(const QScriptValue& valuelist) { - QScriptValueIterator it(valuelist); values.clear(); int size = valuelist.property(QLatin1String("length")).toInt32(); for (int i=0; i Date: Wed, 1 Sep 2010 15:42:14 +1000 Subject: Document difference between property binding and assignment Task-number: QTBUG-12629 --- doc/src/declarative/javascriptblocks.qdoc | 34 +++++++++++++++++++++++++++++++ doc/src/declarative/propertybinding.qdoc | 33 +++++++++++++++++++++++++----- 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc index 18da3d2..d290690 100644 --- a/doc/src/declarative/javascriptblocks.qdoc +++ b/doc/src/declarative/javascriptblocks.qdoc @@ -173,6 +173,40 @@ handler to execute at startup, they are run sequentially in an undefined order. Likewise, the \l {Component::onDestruction} attached property is triggered on component destruction. + +\section1 Property Assignment vs 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: + +\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. + + \section1 QML JavaScript Restrictions QML executes standard JavaScript code, with the following restrictions: diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index 552b9e4..314bf67 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -94,10 +94,29 @@ Rectangle { } \endcode -Imperatively assigning a value directly to a property will also implicitly remove a binding -on a property. A property can only have one value at a time, and if code explicitly sets -this value the binding must be removed. The \l Rectangle in the example below will have -a width of 13, regardless of the otherItem's width. + +\section1 Effects of Property Assignment in JavaScript + +Assigning a property value from JavaScript does \e not create a property binding. +For example: + +\code +Rectangle { + + Component.onCompleted: { + width = otherItem.width; + } +} +\endcode + +Instead of creating a property binding, this simply sets the \c width of the \l Rectangle +to the value of \c other.width at the time the JavaScript code is invoked. See +\l {Property Assignment vs Property Binding} for more details. + +Also note that assigning a value to a property that is currently bound will remove the binding. +A property can only have one value at a time, and if any code explicitly sets +this value, the binding is removed. The \l Rectangle in the example below will have +a width of 13, regardless of the \c otherItem's width. \code Rectangle { @@ -109,7 +128,9 @@ Rectangle { } \endcode -There is no way to create a property binding directly from imperative JavaScript code. +There is no way to create a property binding directly from imperative JavaScript code, +although it is possible to set up a \l Binding object (shown below). + \section1 Binding Element @@ -126,5 +147,7 @@ Binding { value: slider.value } \endqml + + */ -- cgit v0.12 From fb4eb36e78a9d9337fd3decf70a6c13774ba551a Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 8 Sep 2010 14:16:04 +1000 Subject: SpringAnimation velocity animation stop logic was fragile. Rather than stopping the animation when the target was reached, calculate the duration it will take. This eliminates the possibility of rounding errors causing the animation to stop at the wrong time. Task-number: QTBUG-13044 Reviewed-by: Aaron Kennedy --- .../util/qdeclarativespringanimation.cpp | 37 +++++++++++++++------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp index fce4097..e0fc45d 100644 --- a/src/declarative/util/qdeclarativespringanimation.cpp +++ b/src/declarative/util/qdeclarativespringanimation.cpp @@ -62,10 +62,12 @@ public: struct SpringAnimation { SpringAnimation() - : currentValue(0), to(0), velocity(0){} + : currentValue(0), to(0), velocity(0), start(0), duration(0) {} qreal currentValue; qreal to; qreal velocity; + int start; + int duration; }; QHash activeAnimations; @@ -135,7 +137,6 @@ void QDeclarativeSpringAnimationPrivate::tick(int time) bool QDeclarativeSpringAnimationPrivate::animate(const QDeclarativeProperty &property, SpringAnimation &animation, int elapsed) { - qreal srcVal = animation.to; bool stop = false; @@ -192,18 +193,14 @@ bool QDeclarativeSpringAnimationPrivate::animate(const QDeclarativeProperty &pro animation.currentValue += moveBy; if (haveModulus) animation.currentValue = fmod(animation.currentValue, modulus); - if (animation.currentValue > animation.to) { - animation.currentValue = animation.to; - stop = true; - } } else { animation.currentValue -= moveBy; if (haveModulus && animation.currentValue < 0.0) animation.currentValue = fmod(animation.currentValue, modulus) + modulus; - if (animation.currentValue < animation.to) { - animation.currentValue = animation.to; - stop = true; - } + } + if (lastTime - animation.start >= animation.duration) { + animation.currentValue = animation.to; + stop = true; } } @@ -222,8 +219,18 @@ void QDeclarativeSpringAnimationPrivate::updateMode() mode = Track; else if (spring > 0.) mode = Spring; - else + else { mode = Velocity; + QHash::iterator it; + for (it = activeAnimations.begin(); it != activeAnimations.end(); ++it) { + SpringAnimation &animation = *it; + animation.start = lastTime; + qreal dist = qAbs(animation.currentValue - animation.to); + if (haveModulus && dist > modulus / 2) + dist = modulus - fmod(dist, modulus); + animation.duration = dist / velocityms; + } + } } /*! @@ -378,6 +385,7 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus) if (d->modulus != modulus) { d->haveModulus = modulus != 0.0; d->modulus = modulus; + d->updateMode(); emit modulusChanged(); } } @@ -429,10 +437,17 @@ void QDeclarativeSpringAnimation::transition(QDeclarativeStateActions &actions, QDeclarativeSpringAnimationPrivate::SpringAnimation &animation = d->activeAnimations[property]; animation.to = d->actions->at(i).toValue.toReal(); + animation.start = d->lastTime; if (d->fromIsDefined) animation.currentValue = d->actions->at(i).fromValue.toReal(); else animation.currentValue = property.read().toReal(); + if (d->mode == QDeclarativeSpringAnimationPrivate::Velocity) { + qreal dist = qAbs(animation.currentValue - animation.to); + if (d->haveModulus && dist > d->modulus / 2) + dist = d->modulus - fmod(dist, d->modulus); + animation.duration = dist / d->velocityms; + } } } } -- cgit v0.12 From 461c27265a812ccadb707151afbf22a1874cce04 Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Mon, 6 Sep 2010 16:23:27 +0200 Subject: fix for compilation with namespace --- examples/tutorials/modelview/3_changingmodel/mymodel.h | 6 +++++- examples/tutorials/modelview/5_edit/mainwindow.h | 6 +++++- examples/tutorials/modelview/6_treeview/mainwindow.h | 8 ++++++-- examples/tutorials/modelview/7_selections/mainwindow.h | 8 ++++++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h index 87c3dba..91e3cb9 100755 --- a/examples/tutorials/modelview/3_changingmodel/mymodel.h +++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h @@ -42,7 +42,11 @@ #define MYMODEL_H #include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTimer; // forward declaration +QT_END_NAMESPACE + class MyModel : public QAbstractTableModel { diff --git a/examples/tutorials/modelview/5_edit/mainwindow.h b/examples/tutorials/modelview/5_edit/mainwindow.h index ac5b77b..41b15d1 100755 --- a/examples/tutorials/modelview/5_edit/mainwindow.h +++ b/examples/tutorials/modelview/5_edit/mainwindow.h @@ -42,7 +42,11 @@ #define MAINWINDOW_H #include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTableView; //forward declaration +QT_END_NAMESPACE + class MainWindow : public QMainWindow { diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h index 4c4ddb0..dcc9284 100755 --- a/examples/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/tutorials/modelview/6_treeview/mainwindow.h @@ -42,8 +42,12 @@ #define MAINWINDOW_H #include -#include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTreeView; //forward declarations +class QStandardItemModel; +class QStandardItem; +QT_END_NAMESPACE class MainWindow : public QMainWindow diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h index a8f8488..5dc973c 100755 --- a/examples/tutorials/modelview/7_selections/mainwindow.h +++ b/examples/tutorials/modelview/7_selections/mainwindow.h @@ -42,8 +42,12 @@ #define MAINWINDOW_H #include -#include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTreeView; //forward declarations +class QStandardItemModel; +class QItemSelection; +QT_END_NAMESPACE class MainWindow : public QMainWindow -- cgit v0.12 From c5a7645007947e6ef00f69d2984e4ee6203cd60d Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Tue, 7 Sep 2010 11:32:16 +0200 Subject: minor formatting fix --- examples/tutorials/modelview/6_treeview/mainwindow.h | 2 +- examples/tutorials/modelview/7_selections/mainwindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h index dcc9284..16d3140 100755 --- a/examples/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/tutorials/modelview/6_treeview/mainwindow.h @@ -43,7 +43,7 @@ #include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code class QTreeView; //forward declarations class QStandardItemModel; class QStandardItem; diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h index 5dc973c..0d2dd0e 100755 --- a/examples/tutorials/modelview/7_selections/mainwindow.h +++ b/examples/tutorials/modelview/7_selections/mainwindow.h @@ -43,7 +43,7 @@ #include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code class QTreeView; //forward declarations class QStandardItemModel; class QItemSelection; -- cgit v0.12 From 2f50f7e98413a375c843dba174e8a7b92906a117 Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Mon, 6 Sep 2010 16:23:27 +0200 Subject: fix for compilation with namespace --- examples/tutorials/modelview/6_treeview/mainwindow.h | 2 +- examples/tutorials/modelview/7_selections/mainwindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h index 16d3140..dcc9284 100755 --- a/examples/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/tutorials/modelview/6_treeview/mainwindow.h @@ -43,7 +43,7 @@ #include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code class QTreeView; //forward declarations class QStandardItemModel; class QStandardItem; diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h index 0d2dd0e..5dc973c 100755 --- a/examples/tutorials/modelview/7_selections/mainwindow.h +++ b/examples/tutorials/modelview/7_selections/mainwindow.h @@ -43,7 +43,7 @@ #include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code class QTreeView; //forward declarations class QStandardItemModel; class QItemSelection; -- cgit v0.12 From dea1c74bfe9006ee23ff08d0f99614bfdddb42a8 Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Tue, 7 Sep 2010 11:32:16 +0200 Subject: minor formatting fix --- examples/tutorials/modelview/6_treeview/mainwindow.h | 2 +- examples/tutorials/modelview/7_selections/mainwindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h index dcc9284..16d3140 100755 --- a/examples/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/tutorials/modelview/6_treeview/mainwindow.h @@ -43,7 +43,7 @@ #include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code class QTreeView; //forward declarations class QStandardItemModel; class QStandardItem; diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h index 5dc973c..0d2dd0e 100755 --- a/examples/tutorials/modelview/7_selections/mainwindow.h +++ b/examples/tutorials/modelview/7_selections/mainwindow.h @@ -43,7 +43,7 @@ #include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code class QTreeView; //forward declarations class QStandardItemModel; class QItemSelection; -- cgit v0.12 From f0845337d687d86061eb0b894c0954559c772ec6 Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Wed, 8 Sep 2010 10:43:24 +0200 Subject: small fixes on the modelview tutorial --- doc/src/tutorials/modelview.qdoc | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc index 65f6674..e47fe83 100644 --- a/doc/src/tutorials/modelview.qdoc +++ b/doc/src/tutorials/modelview.qdoc @@ -30,7 +30,7 @@ \startpage {index.html}{Qt Reference Documentation} - \title Model/View Contents + \title Model/View Tutorial \brief An introduction to ModelView programming Every UI developer should know about ModelView programming and the goal of @@ -103,13 +103,13 @@ Let's have a closer look at a standard table widget. A table widget is a 2D array of the data elements that the user can change. The table widget can be integrated into a program flow by reading and writing the data elements that - the table widget provides. This method is very intuitive and useful in many - applications. - - Displaying and editing a database table with a standard table widget can be - problematic. Two copies of the data have to be coordinated: one outside the + 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 widget; one inside the widget. The developer is responsible for - synchronizing both versions. The tight coupling of presentation and data + synchronizing both versions. Besides this, the tight coupling of presentation and data makes it harder to write unit tests. \section2 1.2 Model/View to the Rescue @@ -184,7 +184,13 @@ \section1 2. A Simple Model/View Application - If you want to develop a model/view application, where should you start? We recommend starting with a simple example and extending it step-by-step. This makes understanding the architecture a lot easier. Trying to understand the model/view architecture in detail before invoking the IDE has proven to be less convenient for many developers. It is substantially easier to start with a simple model/view application that has demo data. Give it a try! Simply replace the data in the examples below with your own. + If you want to develop a model/view application, where should you start? + We recommend starting with a simple example and extending it step-by-step. + This makes understanding the architecture a lot easier. Trying to understand + the model/view architecture in detail before invoking the IDE has proven + to be less convenient for many developers. It is substantially easier to + start with a simple model/view application that has demo data. Give it a + try! Simply replace the data in the examples below with your own. Below are 7 very simple and independent applications that show different sides of model/view programming. The source code can be found inside the @@ -596,20 +602,22 @@ \list 1 \o \bold{C++ GUI Programming with Qt 4} / Jasmin Blanchette, Mark Summerfield, \e{Prentice Hall, 2nd edition}, ISBN 0-13-235416-0. Also available in - German: C++ GUI Programmierung mit Qt 4: Die offizielle Einführung, + German: \bold{C++ GUI Programmierung mit Qt 4: Die offizielle Einführung}, \e{Addison-Wesley}, ISBN 3-827327-29-6 \o \bold{The Book of Qt4, The Art of Building Qt Applications} / Daniel Molkentin, \e{Open Source Press}, ISBN 1-59327-147-6. Translated from \bold{Qt 4, Einführung in die Applikationsentwicklung}, \e{Open Source Press}, ISBN 3-937514-12-0. \o \bold{Foundations of Qt Development} / Johan Thelin, \e{Apress}, ISBN 1-59059-831-8. + \o \bold{Advanced Qt Programming} / Mark Summerfield, \e{Prentice Hall}, ISBN 0-321-63590-6. + This book covers Model/View programming on more than 150 pages. \endlist More information about these books is available on the \l{Books about Qt Programming}{Qt Web site}. - The following list provides an overview of example programs contained in the - books above. Some of them make very good templates for developing similar + The following list provides an overview of example programs contained in the first three + books listed above. Some of them make very good templates for developing similar applications. \table -- cgit v0.12 From dfb50fd81e3dfb721cd60635c781125dbe42bfb1 Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Wed, 8 Sep 2010 12:11:04 +0200 Subject: moving tutorials out of gitignore. Reviewed by Robert Griebl --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4d5aa9b..7bacc11 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ examples/*/*/* !examples/*/*/README examples/*/*/*[.]app !examples/declarative/* +!examples/tutorials/* !examples/ja_JP/*/* demos/*/* !demos/spectrum/* -- cgit v0.12