summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/basictypes.qdoc23
-rw-r--r--doc/src/declarative/extending.qdoc79
-rw-r--r--doc/src/declarative/modules.qdoc11
-rw-r--r--doc/src/examples/qml-webbrowser.qdoc38
-rw-r--r--doc/src/external-resources.qdoc7
-rw-r--r--doc/src/index.qdoc6
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc11
-rw-r--r--doc/src/snippets/code/doc_src_symbian-introduction.qdoc3
-rwxr-xr-xdoc/src/template/scripts/functions.js17
-rwxr-xr-xdoc/src/template/style/style.css41
10 files changed, 169 insertions, 67 deletions
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index 159f40d..109e6d5 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -400,3 +400,26 @@
\sa {QML Basic Types}
*/
+
+/*!
+ \qmlbasictype enumeration
+ \ingroup qmlbasictypes
+
+ \brief An enumeration type consists of a set of named values.
+
+ An enumeration type consists of a set of named values.
+
+ An enumeration value may be specifed as either a string:
+ \qml
+ Text { horizontalAlignment: "AlignRight" }
+ \endqml
+
+ or as \c {<Element>.<value>}:
+ \qml
+ Text { horizontalAlignment: Text.AlignRight }
+ \endqml
+
+ The second form is preferred.
+
+ \sa {QML Basic Types}
+*/
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 1ee3574..3b04ddb 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -65,20 +65,22 @@ template<typename T>
int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
\endcode
-Calling qmlRegisterType() registers the C++ type \a T with the QML system, and makes it available in QML
-under the name \a qmlName in library \a uri version \a versionMajor.versionMinor.
-The \a qmlName can be the same as the C++ type name.
+Calling qmlRegisterType() registers the C++ type \a T with the QML
+system, and makes it available in QML under the name \a qmlName in
+library \a uri version \a versionMajor.versionMinor. The \a qmlName
+can be the same as the C++ type name.
Type \a T must be a concrete type that inherits QObject and has a default
constructor.
+
\endquotation
-Types can be registered by libraries (such as Qt does), application code,
-or by plugins (see QDeclarativeExtensionPlugin).
+Types can be registered by libraries, application code, or by plugins
+(see QDeclarativeExtensionPlugin).
-Once registered, all of the \l {Qt's Property System}{properties} of a supported
-type are available for use within QML. QML has intrinsic support for properties
-of these types:
+Once registered, all \l {Qt's Property System}{properties} of the
+supported types are available in QML. QML has intrinsic support for
+properties of these types:
\list
\o bool
@@ -94,9 +96,14 @@ of these types:
\o QVariant
\endlist
-QML is typesafe. Attempting to assign an invalid value to a property will
-generate an error. For example, assuming the name property of the \c Person
-element had a type of QString, this would cause an error:
+When a property of a supported type is added to a C++ class, in a QML
+element based on the C++ class, a \e{value-changed} signal handler
+will be available. See \l{Signal Support} below.
+
+QML is typesafe. Attempting to assign an invalid value to a property
+will generate an error. For example, assuming the \e{name} property
+of the \c Person element had a type of QString, this would cause an
+error:
\code
Person {
@@ -412,7 +419,28 @@ value will not be accessible from script.
implement the onPartyStarted signal property.
If you want to use signals from items not created in QML, you can access their
-signals with the \l {Connections} element.
+signals with the \l {Connections} element.
+
+Additionally, if a property is added to a C++ class, all QML elements
+based on that C++ class will have a \e{value-changed} signal handler
+for that property. The name of the signal handler is \e{on<Property
+name>Changed}, with the first letter of the property name being upper
+cased.
+
+\note If the NOTIFY signal for the added property is not simply
+\c{<property_name>Changed()}, then you will get two equivalent signal
+handlers, one because of the signal, one because of the property. For
+example, if the property \c{test_property} with NOTIFY signal
+\c{testPropChanged()} is added to a C++ class, then QML elements based
+on that C++ class will have two signal handlers:
+\c{onTest_propertyChanged} because of the property, and
+\c{onTestPropChanged} because of the NOTIFY signal. For clarity, we
+suggest that for properties exposed to QML in this way, the name of
+the NOTIFY signal should be just \c{<property_name>Changed()}, so that
+there will be just one signal handler in QML and one naming
+convention used.
+
+See also \l {Extending types from QML}.
\section1 Property Value Sources
@@ -702,9 +730,30 @@ controls the color of the inner rectangle.
\endcode
+\section3 Property signal handlers
+
+Adding a property to an item automatically adds a \e{value-changed}
+signal handler to the item. The signal hander is named
+\c{on<Property_name>Changed}, with the first letter of the property
+name being upper case.
+
+Signal handlers can have arbitrary JavaScript code assigned. The following
+example shows how to output to a text console a new value of property
+\c{innerColor} whenever the value of this property changes.
+
+\code
+ Rectangle {
+ id: rect
+ property color innerColor: "black"
+
+ onInnerColorChanged: { console.log(rect.innerColor); }
+ }
+\endcode
+
+
\section3 Setting default properties
-The optional "default" attribute marks a property as the \e {default property}
+The optional \c default attribute for a property marks it as the \e {default property}
for a type. This allows other items to specify the default property's value
as child elements. For example, the \l Item element's default property is its
\l{Item::children}{children} property. This allows the children of an \l Item
@@ -729,12 +778,14 @@ Item {
}
\endqml
+See the \l{declarative/ui-components/tabwidget}{TabWidget} example for a
+demonstration of using default properties.
+
Specifying a default property overrides any existing default property (for
example, any default property inherited from a parent item). Using the
default attribute twice in the same type block is an error.
-
\target qml-property-aliases
\section2 Property aliases
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index a77c64e..938222a 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -103,9 +103,16 @@ the \c qmldir file. Types which you do not wish to export to users of your modul
may be marked with the \c internal keyword: \c internal <TypeName> <File>.
The same type can be provided by different files in different versions, in which
-case later earlier versions (eg. 1.2) must precede earlier versions (eg. 1.0),
+case later versions (eg. 1.2) must precede earlier versions (eg. 1.0),
since the \e first name-version match is used and a request for a version of a type
-can be fulfilled by one defined in an earlier version of the module.
+can be fulfilled by one defined in an earlier version of the module. If a user attempts
+to import a version earlier than the earliest provided or later than the latest provided,
+an error results, but if the user imports a version within the range of versions provided,
+even if no type is specific to that version, no error results.
+
+A single module, in all versions, may only be provided in a single directory (and a single \c qmldir file).
+If multiple are provided, only the first in the search path will be used (regardless of whether other versions
+are provided by directories later in the search path).
Installed and remote files without a namespace \e must be referred to by version information described above,
local files \e may have it.
diff --git a/doc/src/examples/qml-webbrowser.qdoc b/doc/src/examples/qml-webbrowser.qdoc
index d322b02..a3cef66 100644
--- a/doc/src/examples/qml-webbrowser.qdoc
+++ b/doc/src/examples/qml-webbrowser.qdoc
@@ -6,35 +6,21 @@
**
** This file is part of the documentation 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.
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index d4dc2b1..cbd66ee 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -410,6 +410,11 @@
*/
/*!
+ \externalpage http://www.iso.org/iso/date_and_time_format
+ \title ISO 8601
+*/
+
+/*!
\externalpage http://opensource.org/licenses/bsd-license.php
\title New and Modified BSD Licenses
-*/
+*/ \ No newline at end of file
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index da50a6d..18a1746 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -70,15 +70,15 @@
<li><a href="declarativeui.html">Device UI's &amp; Qt Quick</a></li>
<li><a href="qt-gui-concepts.html">Desktop UI components</a></li>
<li><a href="platform-specific.html">Platform-specific info</a></li>
- <li><a href="qt-graphics.html">Graphics, Painting &amp Printing</a></li>
- <li><a href="qt-network.html">Input/Output &amp networking</a></li>
+ <li><a href="qt-graphics.html">Graphics, Painting &amp; Printing</a></li>
+ <li><a href="qt-network.html">Input/Output &amp; networking</a></li>
</ul>
</div>
<div class="sectionlist">
<ul>
<li><a href="model-view-programming.html">Model/View programming</a></li>
<li><a href="technology-apis.html">Qt API's for other technologies</a></li>
- <li><a href="best-practices.html">Qt How-to's &amp best practices</a></li>
+ <li><a href="best-practices.html">Qt How-to's &amp; best practices</a></li>
<li><a href="developing-with-qt.html">Cross-platform development</a></li>
</ul>
</div>
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 1b3641d..22d858f 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -112,6 +112,7 @@
\row \o \c release-armv5 \o Build release binaries for hardware using RVCT.
\row \o \c run \o Run the application on the emulator.
\row \o \c runonphone \o Run the application on a device.
+ \row \o \c deploy \o Deploys the project into a device.
\row \o \c sis \o Create signed \c .sis file for project.
\row \o \c unsigned_sis \o Create unsigned \c .sis file for project.
\row \o \c installer_sis \o Create signed \l{Smart Installer}{smart installer}
@@ -172,7 +173,7 @@
By default empty.
\endtable
- The suppported options for \c QT_SIS_OPTIONS:
+ The supported options for \c QT_SIS_OPTIONS:
\target Supported options for QT_SIS_OPTIONS
\table
@@ -186,7 +187,7 @@
\endtable
Execute the \c{createpackage.pl} script without any
- parameters for detailed information about options. By default no otions are given.
+ parameters for detailed information about options. By default no options are given.
For example:
@@ -196,9 +197,9 @@
\snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 3
- If you want to install the program immediately, make sure that the device
- is connected to the computer in "PC Suite" mode, and run \c sis target
- with the \c QT_SIS_OPTIONS=-i, like this:
+ If you want to install the program immediately after creating \c .sis file,
+ make sure that the device is connected to the computer in "PC Suite" mode,
+ and use \c deploy target instead of \c sis target:
\snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 5
diff --git a/doc/src/snippets/code/doc_src_symbian-introduction.qdoc b/doc/src/snippets/code/doc_src_symbian-introduction.qdoc
index 60c69c0..a2ea686 100644
--- a/doc/src/snippets/code/doc_src_symbian-introduction.qdoc
+++ b/doc/src/snippets/code/doc_src_symbian-introduction.qdoc
@@ -63,6 +63,5 @@
//! [4]
//! [5]
- set QT_SIS_OPTIONS=-i
- make sis
+ make deploy
//! [5]
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index 2723ff2..faa4ca4 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -63,11 +63,9 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount++;
-
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element = full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd;
-
$('#ul001').append(full_li_element);
$('#ul001 .defaultLink').css('display','none');
@@ -77,7 +75,6 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount++;
-
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
@@ -103,10 +100,13 @@ function processNokiaData(response){
if(i==propertyTags.length){$('#pageType').removeClass('loading');}
}
+ if(lookupCount > 0){$('#ul001 .menuAlert').remove();$('#ul001').prepend('<li class=\"menuAlert liveResult hit\">Found ' + lookupCount + ' hits</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
+ if(articleCount > 0){$('#ul002 .menuAlert').remove();$('#ul002').prepend('<li class=\"menuAlert liveResult hit\">Found ' + articleCount + ' hits</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount > 0){$('#ul003 .menuAlert').remove();$('#ul003').prepend('<li class=\"menuAlert liveResult hit\">Found ' + articleCount + ' hits</li>');$('#ul003 li').css('display','block');}
- if(lookupCount == 0){$('#ul001').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
- if(articleCount == 0){$('#ul002').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
- if(exampleCount == 0){$('#ul003').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
+ if(lookupCount == 0){$('#ul001 .menuAlert').remove();$('#ul001').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
+ if(articleCount == 0){$('#ul002 .menuAlert').remove();$('#ul002').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount == 0){$('#ul003 .menuAlert').remove();$('#ul003').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
// reset count variables;
lookupCount=0;
articleCount = 0;
@@ -121,6 +121,7 @@ function CheckEmptyAndLoadList()
var pageVal = $('title').html();
$('#feedUrl').remove();
$('#pageVal').remove();
+ $('.menuAlert').remove();
$('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
$('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
$('.liveResult').remove();
@@ -170,6 +171,7 @@ else
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(function () {
$('#pageType').addClass('loading');
+ $('.searching').remove();
$('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
$.ajax({
contentType: "application/x-www-form-urlencoded",
@@ -180,7 +182,8 @@ else
success: function (response, textStatus) {
$('.liveResult').remove();
- $('#pageType').removeClass('loading');
+ $('.searching').remove();
+ $('#pageType').removeClass('loading');
$('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
processNokiaData(response);
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index f1a63a9..299806b 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -239,7 +239,7 @@
width: 158px;
height: 19px;
padding: 0;
- border: none;
+ border: 0px;
outline: none;
font: 13px/1.2 Verdana;
}
@@ -328,13 +328,18 @@
{
background: url(../images/box_bg.png) repeat-x 0 bottom;
}
- .sidebar .box ul li.menuAlert
+ .sidebar .box ul li.noMatch
{
background: none;
- color:gray;
+ color:#FF2A00;
font-style:italic;
}
-
+ .sidebar .box ul li.hit
+ {
+ background: none;
+ color:#AAD2F0;
+ font-style:italic;
+ }
.wrap
{
@@ -829,12 +834,14 @@
}
.qmlreadonly
{
+ padding-left: 5px;
float: right;
color: #254117;
}
.qmldefault
{
+ padding-left: 5px;
float: right;
color: red;
}
@@ -855,7 +862,7 @@
position: fixed;
top: 100px;
left: 33%;
- height: 190px;
+ height: 230px;
width: 400px;
padding: 5px;
background-color: #e6e7e8;
@@ -879,12 +886,25 @@
height: 120px;
margin: 0px 25px 10px 15px;
}
+ #noteHead
+ {
+ font-weight:bold;
+ padding:10px 10px 10px 20px;
+ }
#feedsubmit
{
display: inline;
float: right;
margin: 4px 32px 0 0;
}
+
+ .note
+ {
+ font-size:7pt;
+ padding-bottom:3px;
+ padding-left:20px;
+ }
+
#blurpage
{
display: none;
@@ -1231,12 +1251,19 @@ pre.highlightedCode {
.navTop{
float:right;
padding-right:5px;
- padding-top:15px;
+ margin-top:15px;
}
.wrap .content .toc h3{
- border-bottom:none;
+ border-bottom:0px;
+ margin-top:0px;
}
+
+ .wrap .content .toc h3 a:hover{
+ color:#00732F;
+ text-decoration:none;
+ }
+
/* end of screen media */
/* start of print media */