diff options
author | Jerome Pasion <jerome.pasion@digia.com> | 2013-03-25 12:37:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-26 22:45:31 +0100 |
commit | 363385a549f33b2b0a34ac9cc8149376f456655c (patch) | |
tree | ff7da1b3cbae0f42666a3cc30d26e32781f6dbbd /src/qml/doc | |
parent | aaa8fd67a499b75f8ec3dc4eea2b53bbdeff11d2 (diff) |
Doc: Fixed some uses of terminolgies in qdoc files.
-"element" -> "type" or "object" (not in all cases where this change applies)
-some instances of QtQuick. It should be "Qt Quick".
-only in qdoc files. Examples and source code changes will be done later.
Task-number: QTBUG-30180
Change-Id: Ie587461a138e97606f761ad1e90909c91b479303
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/cppintegration/contextproperties.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/cppintegration/definetypes.qdoc | 6 | ||||
-rw-r--r-- | src/qml/doc/src/cppintegration/extending-tutorial.qdoc | 8 | ||||
-rw-r--r-- | src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/documents/scope.qdoc | 34 | ||||
-rw-r--r-- | src/qml/doc/src/javascript/expressions.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/javascript/hostenvironment.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/modules/cppplugins.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/qmlfunctions.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/typesystem/basictypes.qdoc | 3 |
10 files changed, 31 insertions, 32 deletions
diff --git a/src/qml/doc/src/cppintegration/contextproperties.qdoc b/src/qml/doc/src/cppintegration/contextproperties.qdoc index b40eec7f6e..aaac43e470 100644 --- a/src/qml/doc/src/cppintegration/contextproperties.qdoc +++ b/src/qml/doc/src/cppintegration/contextproperties.qdoc @@ -77,7 +77,7 @@ QML code invokes a method on the object instance: \l{QML:Qt::formatDateTime}{Qt.formatDateTime()} and associated functions.) If the QML item needs to receive signals from the context property, it can connect to them using the -\l Connections element. For example, if \c ApplicationData has a signal named \c +\l Connections type. For example, if \c ApplicationData has a signal named \c dataChanged(), this signal can be connected to using an \c onDataChanged handler within a \l Connections object: diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc index 84eb4bb2cd..be5f26a865 100644 --- a/src/qml/doc/src/cppintegration/definetypes.qdoc +++ b/src/qml/doc/src/cppintegration/definetypes.qdoc @@ -168,7 +168,7 @@ are constructed and owned by the QQmlEngine, and will be destroyed when the engine is destroyed. A QObject singleton type can be interacted with in a manner simlar to any -other QObject or instantiated element, except that only one (engine constructed +other QObject or instantiated type, except that only one (engine constructed and owned) instance will exist, and it must be referenced by type name rather than id. Q_PROPERTYs of QObject singleton types may be bound to, and Q_INVOKABLE functions of QObject module APIs may be used in signal handler expressions. @@ -230,7 +230,7 @@ version of their type definition, \c root.x now resolves to a different value because \c root is also the \c id of the top level component. The author could specify that the new \c root property is available from a specific minor version. This permits new properties and features to be added to existing -elements without breaking existing programs. +types without breaking existing programs. The REVISION tag is used to mark the \c root property as added in revision 1 of the type. Methods such as Q_INVOKABLE's, signals and slots can also be @@ -263,7 +263,7 @@ qmlRegisterType<CppType,1>("MyTypes", 1, 1, "CppType") \c root is only available when \c MyTypes version 1.1 is imported. -For the same reason, new elements introduced in later versions should use +For the same reason, new types introduced in later versions should use the minor version argument of qmlRegisterType. This feature of the language allows for behavioural changes to be made diff --git a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc index 63c06e2706..247e60411f 100644 --- a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc +++ b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc @@ -69,7 +69,7 @@ and \l {qtqml-cppintegration-definetypes.html}{Defining QML Types from C++}. A common task when extending QML is to provide a new QML type that supports some custom functionality beyond what is provided by the built-in \l {Qt Quick QML Types}{QtQuick types}. For example, this could be done to implement particular data models, or provide -elements with custom painting and drawing capabilities, or access system features +types with custom painting and drawing capabilities, or access system features like network programming that are not accessible through built-in QML features. In this tutorial, we will show how to use the C++ classes in the Qt Declarative @@ -210,8 +210,8 @@ Try out the example yourself with the updated code in Qt's \c examples/quick/tut \example quick/tutorials/extending/chapter3-bindings Property binding is a powerful feature of QML that allows values of different -elements to be synchronized automatically. It uses signals to notify and update -other elements' values when property values are changed. +types to be synchronized automatically. It uses signals to notify and update +other types' values when property values are changed. Let's enable property bindings for the \c color property. That means if we have code like this: @@ -245,7 +245,7 @@ Then, we emit this signal in \c setPieSlice(): It's important for \c setColor() to check that the color value has actually changed before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and -also prevents loops when other elements respond to the value change. +also prevents loops when other types respond to the value change. The use of bindings is essential to QML. You should always add NOTIFY signals for properties if they are able to be implemented, so that your diff --git a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc index 04b278106f..15d98ec405 100644 --- a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc +++ b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc @@ -143,7 +143,7 @@ or QObject::setProperty() and QObject::property(): You should always use QObject::setProperty(), QQmlProperty or QMetaProperty::write() to change a QML property value, to ensure the QML engine is made aware of the property change. For example, say you have a -custom element \c PushButton with a \c buttonText property that internally +custom type \c PushButton with a \c buttonText property that internally reflects the value of a \c m_buttonText member variable. Modifying the member variable directly like this is not a good idea: diff --git a/src/qml/doc/src/documents/scope.qdoc b/src/qml/doc/src/documents/scope.qdoc index e72b07d092..9da77a4905 100644 --- a/src/qml/doc/src/documents/scope.qdoc +++ b/src/qml/doc/src/documents/scope.qdoc @@ -74,11 +74,11 @@ Every JavaScript expression, function or file in QML has its own unique variable object. Local variables declared in one will never conflict with local variables declared in another. -\section1 Element Names and Imported JavaScript Files +\section1 Type Names and Imported JavaScript Files -\l {QML Document}s include import statements that define the element names +\l {QML Document}s include import statements that define the type names and JavaScript files visible to the document. In addition to their use in the -QML declaration itself, element names are used by JavaScript code when accessing +QML declaration itself, type names are used by JavaScript code when accessing \l {Attached Properties} and enumeration values. The effect of an import applies to every property binding, and JavaScript @@ -130,10 +130,10 @@ Consequently unqualified attached property reads will always resolve to an attached property on the scope object, which is not always what the programmer intended. -For example, the \l PathView element attaches interpolated value properties to +For example, the \l PathView type attaches interpolated value properties to its delegates depending on their position in the path. As PathView only -meaningfully attaches these properties to the root element in the delegate, any -sub-element that accesses them must explicitly qualify the root object, as shown +meaningfully attaches these properties to the root object in the delegate, any +sub-object that accesses them must explicitly qualify the root object, as shown below. \code @@ -149,7 +149,7 @@ PathView { } \endcode -If the \l Image element omitted the \c root prefix, it would inadvertently access +If the \l Image object omitted the \c root prefix, it would inadvertently access the unset \c {PathView.scale} attached property on itself. \section1 Component Scope @@ -157,21 +157,21 @@ the unset \c {PathView.scale} attached property on itself. Each QML component in a QML document defines a logical scope. Each document has at least one root component, but can also have other inline sub-components. The component scope is the union of the object ids within the component and the -component's root element's properties. +component's root object's properties. \code Item { property string title Text { - id: titleElement + id: title text: "<b>" + title + "</b>" font.pixelSize: 22 anchors.top: parent.top } Text { - text: titleElement.text + text: title.text font.pixelSize: 18 anchors.bottom: parent.bottom } @@ -180,15 +180,15 @@ Item { The example above shows a simple QML component that displays a rich text title string at the top, and a smaller copy of the same text at the bottom. The first -\c Text element directly accesses the component's \c title property when -forming the text to display. That the root element's properties are directly +\c Text type directly accesses the component's \c title property when +forming the text to display. That the root type's properties are directly accessible makes it trivial to distribute data throughout the component. -The second \c Text element uses an id to access the first's text directly. IDs +The second \c Text type uses an id to access the first's text directly. IDs are specified explicitly by the QML programmer so they always take precedence over other property names (except for those in the \l {JavaScript Scope}). For example, in the unlikely event that the binding's \l {Binding Scope Object}{scope -object} had a \c titleElement property in the previous example, the \c titleElement +object} had a \c titletype property in the previous example, the \c titletype id would still take precedence. \section1 Component Instance Hierarchy @@ -215,13 +215,13 @@ Item { \endcode The component instance hierarchy allows instances of the delegate component -to access the \c defaultColor property of the \c Item element. Of course, +to access the \c defaultColor property of the \c Item type. Of course, had the delegate component had a property called \c defaultColor that would have taken precedence. The component instance scope hierarchy extends to out-of-line components, too. In the following example, the \c TitlePage.qml component creates two -\c TitleText instances. Even though the \c TitleText element is in a separate +\c TitleText instances. Even though the \c TitleText type is in a separate file, it still has access to the \c title property when it is used from within the \c TitlePage. QML is a dynamically scoped language - depending on where it is used, the \c title property may resolve differently. @@ -341,7 +341,7 @@ will refer to one or the other, but not both. \section1 JavaScript Global Object -QML disallows element, id and property names that conflict with the properties +QML disallows type, id and property names that conflict with the properties on the global object to prevent any confusion. Programmers can be confident that \c Math.min(10, 9) will always work as expected! diff --git a/src/qml/doc/src/javascript/expressions.qdoc b/src/qml/doc/src/javascript/expressions.qdoc index a90d794864..a8e6fc8ac0 100644 --- a/src/qml/doc/src/javascript/expressions.qdoc +++ b/src/qml/doc/src/javascript/expressions.qdoc @@ -142,7 +142,7 @@ QML object types can emit signals in reaction to certain events occurring. Those signals can be handled by signal handler functions, which can be defined by clients to implement custom program logic. -Suppose that a button represented by a Rectangle element has a MouseArea and a +Suppose that a button represented by a Rectangle type has a MouseArea and a Text label. The MouseArea will emit its "pressed" signal when the user presses the defined interactive area, which will automatically trigger the \l{MouseArea::}{onPressed} handler, which can be defined by clients. The QML diff --git a/src/qml/doc/src/javascript/hostenvironment.qdoc b/src/qml/doc/src/javascript/hostenvironment.qdoc index 7a517c77d5..a63ef617c0 100644 --- a/src/qml/doc/src/javascript/hostenvironment.qdoc +++ b/src/qml/doc/src/javascript/hostenvironment.qdoc @@ -144,7 +144,7 @@ The \c this keyword is supported when binding properties from JavaScript. In all other situations, the value of \c this is undefined in QML. -To refer to any element, provide an \c id. For example: +To refer to a specific object, provide an \c id. For example: \qml Item { diff --git a/src/qml/doc/src/modules/cppplugins.qdoc b/src/qml/doc/src/modules/cppplugins.qdoc index a5fbafbdfc..af2a36c903 100644 --- a/src/qml/doc/src/modules/cppplugins.qdoc +++ b/src/qml/doc/src/modules/cppplugins.qdoc @@ -65,7 +65,7 @@ \section1 Plugin Example Suppose there is a new \c TimeModel C++ class that should be made available - as a new QML element. It provides the current time through \c hour and \c minute + as a new QML type. It provides the current time through \c hour and \c minute properties. \snippet qml/plugins/plugin.cpp 0 diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc index 81b8fd594f..4a4de0531c 100644 --- a/src/qml/doc/src/qmlfunctions.qdoc +++ b/src/qml/doc/src/qmlfunctions.qdoc @@ -289,7 +289,7 @@ of the given type T as a singleton type. A QObject singleton type may be referenced via the type name with which it was registered, and this - typename may be used as the target in a \l Connections element or otherwise used as any other element id would. + typename may be used as the target in a \l Connections type or otherwise used as any other type id would. One exception to this is that a QObject singleton type property may not be aliased (because the singleton type name does not identify an object within the same component as any other item). diff --git a/src/qml/doc/src/typesystem/basictypes.qdoc b/src/qml/doc/src/typesystem/basictypes.qdoc index f8b050e7fe..6f468d42bc 100644 --- a/src/qml/doc/src/typesystem/basictypes.qdoc +++ b/src/qml/doc/src/typesystem/basictypes.qdoc @@ -132,7 +132,7 @@ property is only invoked when the property is reassigned to a different object v The \c int type refers to a whole number, e.g. 0, 10, or -20. The possible \c int values range from around -2000000000 to around 2000000000, - although most elements will only accept a reduced range (which they + although most types will only accept a reduced range (which they mention in their documentation). Example: @@ -673,4 +673,3 @@ property is only invoked when the property is reassigned to a different object v \sa {QML Basic Types} */ - |