From bdfb4a6363a5bc3cac79bf10aa38542ca2261291 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 26 Aug 2009 09:21:24 +1000 Subject: doc fixes --- doc/src/declarative/qmlintro.qdoc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc index 41da36e..3d167ac 100644 --- a/doc/src/declarative/qmlintro.qdoc +++ b/doc/src/declarative/qmlintro.qdoc @@ -153,7 +153,7 @@ Item { \section3 The 'id' property -The id property is a special property of type \e id. Assigning an id to an object allows you +The \c id property is a special property of type \e id. Assigning an id to an object allows you to refer to it elsewhere. \code @@ -168,7 +168,7 @@ Item { } \endcode -ids must begin with a letter. We recommended that you start your ids with a capital letter. +\c ids must begin with a letter. We recommend that you start your ids with a capital letter. \section2 List properties @@ -195,9 +195,10 @@ Image { \section2 Default properties -Each object type can specify one of it's list properties as its default property. -If a list property has been the default property, it means the property tag can emitted: +Each object type can specify one of its list properties as its default property. +If a list property has been declared as the default property, the property tag can be omitted. +For example this code: \code State { changes: [ @@ -207,7 +208,7 @@ State { } \endcode -can be simplified to +can be simplified to: \code State { @@ -216,6 +217,8 @@ State { } \endcode +because \c changes is the default property of the \c State type. + \section2 Dot Properties \section2 Attached Properties -- cgit v0.12 From a3fcbe0ddcc87df39afc118b31ac04d543564003 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 26 Aug 2009 09:22:40 +1000 Subject: small flickr fixes --- demos/declarative/flickr/flickr-mobile.qml | 2 +- demos/declarative/flickr/mobile/GridDelegate.qml | 2 +- demos/declarative/flickr/mobile/ListDelegate.qml | 2 +- demos/declarative/flickr/mobile/TitleBar.qml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/declarative/flickr/flickr-mobile.qml b/demos/declarative/flickr/flickr-mobile.qml index a4692a3..ee6366d 100644 --- a/demos/declarative/flickr/flickr-mobile.qml +++ b/demos/declarative/flickr/flickr-mobile.qml @@ -33,7 +33,7 @@ Item { } } - Common.ImageDetails { id: ImageDetails; width: parent.width; x: parent.width; height: parent.height } + Mobile.ImageDetails { id: ImageDetails; width: parent.width; x: parent.width; height: parent.height } Mobile.TitleBar { id: TitleBar; width: parent.width; height: 40; opacity: 0.9 } Mobile.ToolBar { id: ToolBar; height: 40; anchors.bottom: parent.bottom; width: parent.width; opacity: 0.9 } diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index 8090cd4..30abb05 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -31,7 +31,7 @@ Rectangle { id: WhiteRect; width: 77; height: 77; anchors.centerIn: parent; color: "#dddddd"; smooth: true Image { id: Thumb; source: imagePath; x: 1; y: 1; smooth: true} - Image { source: "mobile/images/gloss.png"; smooth: true} + Image { source: "images/gloss.png" } } Connection { diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml index b9ec7f2..fa6f8ea 100644 --- a/demos/declarative/flickr/mobile/ListDelegate.qml +++ b/demos/declarative/flickr/mobile/ListDelegate.qml @@ -6,7 +6,7 @@ Component { id: Wrapper; width: Wrapper.ListView.view.width; height: 86 Item { id: MoveMe - Rectangle { color: "black"; opacity: Wrapper.ListView.index % 2 ? 0.2 : 0.3; height: 84; width: Wrapper.width; y: 1 } + Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: Wrapper.width; y: 1 } Rectangle { id: WhiteRect; x: 6; y: 4; width: 77; height: 77; color: "white"; smooth: true diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 59b8365..6d655a6 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -23,7 +23,7 @@ Item { anchors.verticalCenter: parent.verticalCenter elide: "ElideLeft" text: (RssModel.tags=="" ? "Uploads from everyone" : "Recent Uploads tagged " + RssModel.tags) - font.pointSize: 10; font.bold: true; color: "white"; style: "Raised"; styleColor: "black" + font.bold: true; color: "white"; style: "Raised"; styleColor: "black" } Button { -- cgit v0.12 From 1a9eeae1ee92516abd2278b0ebf23687ff865cd7 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 26 Aug 2009 13:21:47 +1000 Subject: doc fixes --- doc/src/declarative/anchor-layout.qdoc | 32 ++++++++++++++++---------------- doc/src/declarative/tutorial2.qdoc | 8 ++++---- doc/src/declarative/tutorial3.qdoc | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 69e2eda..6f047a4 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -1,20 +1,20 @@ -/*! +/*! \page anchor-layout.html \target anchor-layout \title Anchor-based Layout -In additional to the more traditional Fx layouts GridLayout, HorizontalLayout, and VerticalLayout, QML also provides a way to layout items using the concept of anchors. Each visual Fx item can be thought of as having a set of 6 invisible "anchor lines": \e left, \e horizontalCenter, \e right, \e top, \e verticalCenter, and \e bottom. +In addition to the more traditional \l Grid, \l Row, and \l Column, QML also provides a way to layout items using the concept of anchors. Each item can be thought of as having a set of 6 invisible "anchor lines": \e left, \e horizontalCenter, \e right, \e top, \e verticalCenter, and \e bottom. \image edges_qml.png The Fx anchoring system allows you to define relationships between the anchor lines of different items. For example, you can write: \code -Rectangle { id: rect1; ... } -Rectangle { id: rect2; anchors.left: rect1.right; ... } +Rectangle { id: Rect1; ... } +Rectangle { id: Rect2; anchors.left: Rect1.right; ... } \endcode -In this case, the left edge of \e rect2 is bound to the right edge of rect1, producing the following: +In this case, the left edge of \e Rect2 is bound to the right edge of Rect1, producing the following: \image edge1.png @@ -25,19 +25,19 @@ The anchoring system also allows you to specify margins and offsets. Margins spe The following example specifies a left margin: \code -Rectangle { id: rect1; ... } -Rectangle { id: rect2; anchors.left: rect1.right; anchors.leftMargin: 5; ... } +Rectangle { id: Rect1; ... } +Rectangle { id: Rect2; anchors.left: Rect1.right; anchors.leftMargin: 5; ... } \endcode -In this case, a margin of 5 pixels is reserved to the left of \e rect2, producing the following: +In this case, a margin of 5 pixels is reserved to the left of \e Rect2, producing the following: \image edge2.png You can specify multiple anchors. For example: \code -Rectangle { id: rect1; ... } -Rectangle { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... } +Rectangle { id: Rect1; ... } +Rectangle { id: Rect2; anchors.left: Rect1.right; anchors.top: Rect1.bottom; ... } \endcode \image edge3.png @@ -45,9 +45,9 @@ Rectangle { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... By specifying multiple horizontal or vertical anchors you can control the size of an item. For example: \code -Rectangle { id: rect1; x: 0; ... } -Rectangle { id: rect2; anchors.left: rect1.right; anchors.right: rect3.left; ... } -Rectangle { id: rect3; x: 150; ... } +Rectangle { id: Rect1; x: 0; ... } +Rectangle { id: Rect2; anchors.left: Rect1.right; anchors.right: Rect3.left; ... } +Rectangle { id: Rect3; x: 150; ... } \endcode \image edge4.png @@ -56,12 +56,12 @@ Rectangle { id: rect3; x: 150; ... } For performance reasons, you can only anchor an item to its siblings and direct parent. For example, the following anchor would be considered invalid and would produce a warning: -\code +\badcode Item { id: group1 } - Rectangle { id: rect1; ... } + Rectangle { id: Rect1; ... } } Item id: group2"> - Rectangle { id: rect2; anchors.left: rect1.right; ... } // invalid anchor! + Rectangle { id: Rect2; anchors.left: Rect1.right; ... } // invalid anchor! } \endcode diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc index 9c1e98b..c6fd06b 100644 --- a/doc/src/declarative/tutorial2.qdoc +++ b/doc/src/declarative/tutorial2.qdoc @@ -46,7 +46,7 @@ Rectangle { y: 30 anchors.horizontalCenter: Page.horizontalCenter } - GridLayout { + Grid { id: ColorPicker x: 0 anchors.bottom: Page.bottom @@ -91,7 +91,7 @@ Rectangle { Our cell component is basically a colored rectangle. -The \c anchors.fill property is a convenient way to set the size of an element. In this case the \c Rect will have the same size as its parent. +The \c anchors.fill property is a convenient way to set the size of an element. In this case the \c Rectangle will have the same size as its parent. We bind the \c color property of this \c Rectangle to the color property of our component. @@ -109,7 +109,7 @@ The \c onClicked property sets the \c color property of the element named \e Hel \section2 The main QML file \code -GridLayout { +Grid { id: ColorPicker x: 0 anchors.bottom: Page.bottom @@ -124,7 +124,7 @@ GridLayout { } \endcode -In the main QML file, the only thing we have to do is to create a color picker by putting 6 cells with different colors in a grid layout. +In the main QML file, the only thing we have to do is to create a color picker by putting 6 cells with different colors in a grid. [Previous: \l tutorial1] [Next: \l tutorial3] diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc index 1330c43..a0d842c 100644 --- a/doc/src/declarative/tutorial3.qdoc +++ b/doc/src/declarative/tutorial3.qdoc @@ -48,7 +48,7 @@ Rectangle { ] } MouseRegion { id: MouseRegion; anchors.fill: HelloText } - GridLayout { + Grid { id: ColorPicker x: 0 anchors.bottom: Page.bottom -- cgit v0.12 From 20e9783d0fc3c71b2a569edda407801aa2e3c371 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 26 Aug 2009 13:28:05 +1000 Subject: Use Q_SLOTS and Q_SIGNALS. --- src/declarative/debugger/qmldebugclient.cpp | 2 +- src/declarative/debugger/qmldebugservice.cpp | 2 +- src/declarative/debugger/qpacketprotocol.cpp | 4 ++-- src/declarative/extra/qfxflowview.cpp | 2 +- src/declarative/extra/qmlsqlquery.h | 4 ++-- src/declarative/extra/qmlxmllistmodel.cpp | 2 +- src/declarative/fx/qfxcomponentinstance.h | 2 +- src/declarative/fx/qfxgridview.cpp | 2 +- src/declarative/fx/qfxitem.cpp | 4 ++-- src/declarative/fx/qfxlistview.cpp | 2 +- src/declarative/fx/qfxvisualitemmodel.cpp | 2 +- src/declarative/qml/qmlbindingoptimizations_p.h | 2 +- src/declarative/qml/qmlcomponentjs_p.h | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/declarative/debugger/qmldebugclient.cpp b/src/declarative/debugger/qmldebugclient.cpp index 7c5c37b..d13de57 100644 --- a/src/declarative/debugger/qmldebugclient.cpp +++ b/src/declarative/debugger/qmldebugclient.cpp @@ -57,7 +57,7 @@ public: QStringList enabled; QHash plugins; -public slots: +public Q_SLOTS: void connected(); void readyRead(); }; diff --git a/src/declarative/debugger/qmldebugservice.cpp b/src/declarative/debugger/qmldebugservice.cpp index 3576a94..b83a4b1 100644 --- a/src/declarative/debugger/qmldebugservice.cpp +++ b/src/declarative/debugger/qmldebugservice.cpp @@ -59,7 +59,7 @@ public: static QmlDebugServer *instance(); void wait(); -private slots: +private Q_SLOTS: void readyRead(); private: diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index d109836..6bccf4b 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -131,12 +131,12 @@ public: this, SLOT(bytesWritten(qint64))); } -signals: +Q_SIGNALS: void readyRead(); void packetWritten(); void invalidPacket(); -public slots: +public Q_SLOTS: void aboutToClose() { inProgress.clear(); diff --git a/src/declarative/extra/qfxflowview.cpp b/src/declarative/extra/qfxflowview.cpp index 4af8af9..b2470ba 100644 --- a/src/declarative/extra/qfxflowview.cpp +++ b/src/declarative/extra/qfxflowview.cpp @@ -57,7 +57,7 @@ public: int row() const; int column() const; -signals: +Q_SIGNALS: void posChanged(); private: diff --git a/src/declarative/extra/qmlsqlquery.h b/src/declarative/extra/qmlsqlquery.h index 55e16ac..0f27709 100644 --- a/src/declarative/extra/qmlsqlquery.h +++ b/src/declarative/extra/qmlsqlquery.h @@ -115,13 +115,13 @@ public: QmlList *bindings(); const QmlList *bindings() const; -public slots: +public Q_SLOTS: void exec(); protected: void timerEvent(QTimerEvent *); -private slots: +private Q_SLOTS: void resetBinds(); void resetQuery(); diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index 9b74799..816c3fd 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -123,7 +123,7 @@ public: return m_modelData; } -signals: +Q_SIGNALS: void queryCompleted(int queryId, int size); protected: diff --git a/src/declarative/fx/qfxcomponentinstance.h b/src/declarative/fx/qfxcomponentinstance.h index 940fb6d..0ba11a6 100644 --- a/src/declarative/fx/qfxcomponentinstance.h +++ b/src/declarative/fx/qfxcomponentinstance.h @@ -68,7 +68,7 @@ public: Q_SIGNALS: void instanceChanged(); -private slots: +private Q_SLOTS: void updateSize(); private: diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index b445e49..e2c7fa3 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -92,7 +92,7 @@ public: void emitAdd() { emit add(); } void emitRemove() { emit remove(); } -signals: +Q_SIGNALS: void currentItemChanged(); void delayRemoveChanged(); void add(); diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 7938dc9..d1e21a3 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -378,7 +378,7 @@ public: static QFxKeyNavigationAttached *qmlAttachedProperties(QObject *); -signals: +Q_SIGNALS: void changed(); private: @@ -860,7 +860,7 @@ public: static QFxKeysAttached *qmlAttachedProperties(QObject *); -signals: +Q_SIGNALS: void enabledChanged(); void pressed(QFxKeyEvent *event); void released(QFxKeyEvent *event); diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 4b28462..048cb0f 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -110,7 +110,7 @@ public: void emitAdd() { emit add(); } void emitRemove() { emit remove(); } -signals: +Q_SIGNALS: void currentItemChanged(); void sectionChanged(); void prevSectionChanged(); diff --git a/src/declarative/fx/qfxvisualitemmodel.cpp b/src/declarative/fx/qfxvisualitemmodel.cpp index fd2796c..82bec09 100644 --- a/src/declarative/fx/qfxvisualitemmodel.cpp +++ b/src/declarative/fx/qfxvisualitemmodel.cpp @@ -87,7 +87,7 @@ public: return rv; } -signals: +Q_SIGNALS: void indexChanged(); public: diff --git a/src/declarative/qml/qmlbindingoptimizations_p.h b/src/declarative/qml/qmlbindingoptimizations_p.h index ab264c7..4862007 100644 --- a/src/declarative/qml/qmlbindingoptimizations_p.h +++ b/src/declarative/qml/qmlbindingoptimizations_p.h @@ -99,7 +99,7 @@ public: virtual void setEnabled(bool); virtual int propertyIndex(); -private slots: +private Q_SLOTS: virtual void update(); private: diff --git a/src/declarative/qml/qmlcomponentjs_p.h b/src/declarative/qml/qmlcomponentjs_p.h index 8c69b5f..cee3035 100644 --- a/src/declarative/qml/qmlcomponentjs_p.h +++ b/src/declarative/qml/qmlcomponentjs_p.h @@ -87,7 +87,7 @@ Q_SIGNALS: void isErrorChanged(); void isReadyChanged(); void isLoadingChanged(); -private slots: +private Q_SLOTS: void statusChange(QmlComponent::Status newStatus); }; -- cgit v0.12 From 620a05f762b647ea70a2a42e8e7cf48033cb1381 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 26 Aug 2009 13:31:06 +1000 Subject: doc fixes --- src/declarative/fx/qfxitem.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index d1e21a3..0e781c9 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -301,11 +301,11 @@ void QFxContents::setItem(QFxItem *item) /* Key filters can be installed on a QFxItem, but not removed. Currently they - are only used by attached objects (which are only destroyed on Item - destruction), so this isn't a problem. If in future this becomes any form + are only used by attached objects (which are only destroyed on Item + destruction), so this isn't a problem. If in future this becomes any form of public API, they will have to support removal too. -*/ -class QFxItemKeyFilter +*/ +class QFxItemKeyFilter { public: QFxItemKeyFilter(QFxItem * = 0); @@ -321,7 +321,7 @@ private: QFxItemKeyFilter::QFxItemKeyFilter(QFxItem *item) : m_next(0) { - QFxItemPrivate *p = + QFxItemPrivate *p = item?static_cast(QGraphicsItemPrivate::get(item)):0; if (p) { m_next = p->keyHandler; @@ -346,7 +346,7 @@ void QFxItemKeyFilter::keyReleased(QKeyEvent *event) class QFxKeyNavigationAttachedPrivate : public QObjectPrivate { public: - QFxKeyNavigationAttachedPrivate() + QFxKeyNavigationAttachedPrivate() : QObjectPrivate(), left(0), right(0), up(0), down(0) {} QFxItem *left; @@ -965,7 +965,7 @@ bool QFxKeysAttachedPrivate::isConnected(const char *signalName) } QFxKeysAttached::QFxKeysAttached(QObject *parent) -: QObject(*(new QFxKeysAttachedPrivate), parent), +: QObject(*(new QFxKeysAttachedPrivate), parent), QFxItemKeyFilter(qobject_cast(parent)) { } @@ -1076,18 +1076,6 @@ QFxKeysAttached *QFxKeysAttached::qmlAttachedProperties(QObject *obj) */ /*! - \fn void QFxItem::xChanged() - - This signal is emitted when the x coordinate of the item changes. -*/ - -/*! - \fn void QFxItem::yChanged() - - This signal is emitted when the y coordinate of the item changes. -*/ - -/*! \fn void QFxItem::widthChanged() This signal is emitted when the width of the item changes. -- cgit v0.12 From 2c89c36f1b5316ccb1d77b5e768fa3ec168a659f Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 26 Aug 2009 14:45:56 +1000 Subject: doc fixes --- doc/src/declarative/anchor-layout.qdoc | 4 +- doc/src/declarative/binding.qdoc | 2 +- doc/src/declarative/cppitem.qdoc | 8 +-- doc/src/declarative/elements.qdoc | 6 +-- doc/src/declarative/examples.qdoc | 10 ++-- doc/src/declarative/focus.qdoc | 70 +++++++++++++------------- doc/src/declarative/measuring-performance.qdoc | 4 +- doc/src/declarative/qtprogrammers.qdoc | 4 +- doc/src/declarative/tutorial.qdoc | 4 +- 9 files changed, 56 insertions(+), 56 deletions(-) diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 6f047a4..60eefe0 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -1,13 +1,13 @@ /*! \page anchor-layout.html \target anchor-layout -\title Anchor-based Layout +\title Anchor-based Layout in QML In addition to the more traditional \l Grid, \l Row, and \l Column, QML also provides a way to layout items using the concept of anchors. Each item can be thought of as having a set of 6 invisible "anchor lines": \e left, \e horizontalCenter, \e right, \e top, \e verticalCenter, and \e bottom. \image edges_qml.png -The Fx anchoring system allows you to define relationships between the anchor lines of different items. For example, you can write: +The QML anchoring system allows you to define relationships between the anchor lines of different items. For example, you can write: \code Rectangle { id: Rect1; ... } diff --git a/doc/src/declarative/binding.qdoc b/doc/src/declarative/binding.qdoc index 064f686..dfddf75 100644 --- a/doc/src/declarative/binding.qdoc +++ b/doc/src/declarative/binding.qdoc @@ -1,6 +1,6 @@ /*! \page binding.html -\title Data Binding +\title Data Binding in QML \target binding Data binding provides a declarative way of specifying the data associated with objects, as well as the relationship between data of different objects. For example, you could bind the text of a label to the value of a slider: as the value of the slider changed, the label would be automatically updated with the new value. diff --git a/doc/src/declarative/cppitem.qdoc b/doc/src/declarative/cppitem.qdoc index 794f67a..4543156 100644 --- a/doc/src/declarative/cppitem.qdoc +++ b/doc/src/declarative/cppitem.qdoc @@ -1,7 +1,7 @@ -/*! +/*! \page cppitem.html \target cppitem -\title C++ Components +\title C++ Components for QML \section1 Making a C++ object available in QML @@ -79,9 +79,9 @@ QML_DEFINE_TYPE(MyLib,1,0,5,Circle,MyCircle); would make the \e MyCircle class accessable though the \c Circle type in QML whenever MyLib 1.0 to 1.5 is imported. -\section1 Creating a new 'Fx' item in C++ +\section1 Creating a new type of QML item in C++ -You can create a new type of 'Fx' item by: +You can create a new type of QML item by: \list 1 \o Creating a subclass of QFxItem, \o Adding Q_PROPERTYs appropriate for your item (see \l {properties}{Properties}), diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index ffa5494..bfaf4ab 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -29,15 +29,15 @@ The following table lists the QML elements provided by the Qt Declarative module \o \l PropertyAnimation \o \l NumberAnimation \o \l ColorAnimation -\o \l PauseAnimation \o \l SequentialAnimation \o \l ParallelAnimation +\o \l PauseAnimation \o \l PropertyAction \o \l ParentAction \o \l ScriptAction \o \l Transition -\o \l Behavior \o \l Follow +\o \l Behavior \endlist \o @@ -60,7 +60,7 @@ The following table lists the QML elements provided by the Qt Declarative module \endlist \endtable -\bold {Fluid UI Primitives} +\bold {QML Items} \table 80% \header diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index 31c8a5d..49a825a 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -4,21 +4,21 @@ \title QML Examples A \l {qmlviewer}{viewer} application is included that allows you to quickly explore many of the -examples. It has some useful options, revealed by: +examples. It has some useful options, revealed by: \code bin/qmlviewer -help \endcode -There are several illustrative QML examples available. From your build -directory, +There are several illustrative QML examples available. From your build +directory, \code bin/qmlviewer $QT_SOURCE_DIR/demos/declarative/flickr/flickr.qml \endcode -Many other simple examples can be found under the \c examples/declarative sub -directory. Some can be run directly using the viewer like those above, and +Many other simple examples can be found under the \c examples/declarative sub +directory. Some can be run directly using the viewer like those above, and others require you to build and run an executable. More sophisticated demos of large applications can be found under the \c demos/declarative diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 5c53483..7c293ee 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -1,21 +1,21 @@ /*! \target qmlfocus \page qmlfocus.html -\title Fluid UI Keyboard Focus +\title Keyboard Focus in QML When a key is pressed or released, a key event is generated and delivered to the -focused fluid UI \l Item. To facilitate the construction of reusable components -and to address some of the cases unique to fluid UIs, the fluid UI atoms add a -"scope" based extension to Qt's traditional keyboard focus model. +focused QML \l Item. To facilitate the construction of reusable components +and to address some of the cases unique to fluid user interfaces, the QML items add a +\e scope based extension to Qt's traditional keyboard focus model. \section1 Key Handling Overview When the user presses or releases a key, the following occurs: \list 1 \o Qt receives the key action and generates a key event. -\o If the Qt widget containing the fluid UI scene has focus, the key event is delivered to the fluid UI scene. Otherwise, regular Qt key handling continues. -\o The key event is delivered by the scene to the fluid UI \l Item with \e {active focus}. If no fluid UI \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues. -\o If the fluid UI \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached. +\o If the Qt widget containing the \l QFxView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues. +\o The key event is delivered by the scene to the QML \l Item with \e {active focus}. If no \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues. +\o If the QML \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached. If the \c {Rect} element in the following example has active focus and the \e A key is pressed, it will bubble up to the \c {KeyActions}. However, pressing the \e B key will bubble up to the root item and thus subsequently be \l {QEvent::ignore()}{ignored}. @@ -34,7 +34,7 @@ Item { \section1 Querying the Active Focus Item -Whether or not an \l Item has \e {active focus} can be queried through the +Whether or not an \l Item has \e {active focus} can be queried through the read-only property \c {Item::activeFocus}. For example, here we have a \l Text element whose text is determined by whether or not it has \e {active focus}. @@ -46,7 +46,7 @@ Text { \section1 Acquiring Focus and Focus Scopes -An \l Item requests focus by setting the \c {Item::focus} property to true. +An \l Item requests focus by setting the \c {Item::focus} property to true. For very simple cases simply setting the \c {Item::focus} property is sometimes sufficient. If we run the following example in the \c qmlviewer, we see that @@ -74,8 +74,8 @@ However, were the above example to be used as a self-contained component, this simple use of the \c {Item::focus} property is no longer sufficient. The left hand side of the following table shows what we would like to be able to write. Here we create two instances of our previously defined component, and set the -second one to have focus. The intention is that when the \e A, \e B, or \e C -keys are pressed, the second of the two components receives the event and +second one to have focus. The intention is that when the \e A, \e B, or \e C +keys are pressed, the second of the two components receives the event and reponds accordingly. \table @@ -117,25 +117,25 @@ Rectangle { The right hand side of the example shows the expanded code - the equivalent QML without the use of the component \c {MyWidget}. From this, the problem is -evident - there are no less than three elements that have the \c {Item::focus} -property set to true. Ultimately only one element can have focus, and the -system has to decide which on. In this case the first appearance of the +evident - there are no less than three elements that have the \c {Item::focus} +property set to true. Ultimately only one element can have focus, and the +system has to decide which on. In this case the first appearance of the \c {Item::focus} property being set to true on line 4 is selected, and the value of \c {Item::focus} in the other two instances is reverted back to false. This is exactly the opposite of what was wanted! -This problem is fundamentally one of visibility. The \c {MyWidget} +This problem is fundamentally one of visibility. The \c {MyWidget} components each set their \c {KeyActions} as focused as that is all they can do - they don't know how they are going to be used, but they do know that when they're in use their \c {KeyActions} element is what needs focus. Likewise the code that uses the \c {MyWidget}'s sets the second \c {MyWidget} as -focused because, while it doesn't know exactly how the \c {MyWidget} is +focused because, while it doesn't know exactly how the \c {MyWidget} is implemented, it knows that it wants the second one to be focused. No one piece of code knows everything about the other, which is exactly how it should be. To solve this problem - allowing components to care about what they know about -and ignore everything else - the fluid UI atoms introduce a concept known as a -\e {focus scope}. For existing Qt users, a \e {focus scope} is like an +and ignore everything else - the QML items introduce a concept known as a +\e {focus scope}. For existing Qt users, a \e {focus scope} is like an automatic focus proxy. A \e {focus scope} is created using the \l FocusScope element. @@ -162,11 +162,11 @@ FocusScope { \o \image declarative-qmlfocus2.png \endtable -Conceptually \e {focus scopes} are quite simple. +Conceptually \e {focus scopes} are quite simple. \list -\o Within each \e {focus scope} one element may have \c {Item::focus} set to true. If more than one \l Item has the \c {Item::focus} property set, the first is selected and the others are unset, just like when there are no \e {focus scopes}. +\o Within each \e {focus scope} one element may have \c {Item::focus} set to true. If more than one \l Item has the \c {Item::focus} property set, the first is selected and the others are unset, just like when there are no \e {focus scopes}. \o When a \e {focus scope} receives \e {active focus}, the contained element with \c {Item::focus} set (if any) also gets \e {active focus}. If this element is -also a \l FocusScope, the proxying behaviour continues. Both the +also a \l FocusScope, the proxying behaviour continues. Both the \e {focus scope} and the sub-focused item will have \c {Item::activeFocus} set. \endlist @@ -176,7 +176,7 @@ application. We still set a one of the widgets as focused by default, but from then on clicking the either one gives it focus. \table -\row +\row \o \code Rectangle { color: "red"; width: 240; height: 55 @@ -195,24 +195,24 @@ FocusScope { \image declarative-qmlfocus3.png -When a fluid UI atom explicitly relinquishes focus (by setting its -\c {Item::focus} property to false while it has \e {active focus}), the system +When a QML item explicitly relinquishes focus (by setting its +\c {Item::focus} property to false while it has \e {active focus}), the system does not automatically select another element to receive focus. That is, it is possible for there to be no currently \e {active focus}. \section1 Advanced uses of Focus Scopes -Focus scopes allow focus to allocation to be easily partitioned. Several -fluid UI atoms use it to this effect. +Focus scopes allow focus to allocation to be easily partitioned. Several +QML items use it to this effect. -\l ListView, for example, is itself a focus scope. Generally this isn't +\l ListView, for example, is itself a focus scope. Generally this isn't noticable as \l ListView doesn't usually have manually added visual children. -By being a focus scope, \l ListView can focus the current list item without +By being a focus scope, \l ListView can focus the current list item without worrying about how that will effect the rest of the application. This allows the current item delegate to react to key presses. This contrived example shows how this works. Pressing the \c Return key will -print the name of the current list item. +print the name of the current list item. \table \row @@ -240,22 +240,22 @@ Rectangle { While the example is simple, there's a lot going on behind the scenes. Whenever the current item changes, the \l ListView sets the delegate's \c {Item::focus} -property. As the \l ListView is a \e {focus scope}, this doesn't effect the -rest of the application. However, if the \l ListView itself has +property. As the \l ListView is a \e {focus scope}, this doesn't effect the +rest of the application. However, if the \l ListView itself has \e {active focus} this causes the delegate itself to receive \e {active focus}. In this example, the root element of the delegate is also a \e {focus scope}, which in turn gives \e {active focus} to the \c {KeyActions} element that actually performs the work of handling the \e {Return} key. -All of the fluid UI view classes, such as \l PathView and \l GridView, behave +All of the QML view classes, such as \l PathView and \l GridView, behave in a similar mannor to allow key handling in their respective delegates. \section1 Focus Panels -Traditional UIs are composed of many top-level windows. Windows actually +Traditional UIs are composed of many top-level windows. Windows actually perform two tasks - they act as the visual bounds for a widget, and they segment -focus. Each window has a separate focused widget, that becomes (to mix -terminologies) the \e {active focus} widget when the window is the active +focus. Each window has a separate focused widget, that becomes (to mix +terminologies) the \e {active focus} widget when the window is the active window. ### Focus panels do basically the same thing. diff --git a/doc/src/declarative/measuring-performance.qdoc b/doc/src/declarative/measuring-performance.qdoc index 2387335..8c95422 100644 --- a/doc/src/declarative/measuring-performance.qdoc +++ b/doc/src/declarative/measuring-performance.qdoc @@ -1,7 +1,7 @@ -/*! +/*! \page optimizing-performance.html \target optimizing-performance -\title Optimizing Performance +\title Optimizing Performance in QML The Qt Declarative module includes several tools to help measure performance. diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc index 6777724..742fc07 100644 --- a/doc/src/declarative/qtprogrammers.qdoc +++ b/doc/src/declarative/qtprogrammers.qdoc @@ -1,4 +1,4 @@ -/* +/*! INCOMPLETE @@ -51,7 +51,7 @@ QML usage of the item. As an example, imagine you wanted a reusable Button item. If you therefore decided to write a QFxItem subclass to implement a button, just as QToolButton subclasses QWidget for this purpose, following the rule above, your -"QFxButton" would not have any appearance - just the notions of enabled, triggering, etc. +\c QFxButton would not have any appearance - just the notions of enabled, triggering, etc. But there is already an object in Qt that does this: QAction. diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 5c855ec..a2a34b9 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -1,8 +1,8 @@ -/*! +/*! \page tutorial.html \title Tutorial -This tutorial gives an introduction to QML and the Fluid UI atoms. It doesn't cover everything; the emphasis is on teaching the key principles, and features are introduced as needed. +This tutorial gives an introduction to QML. It doesn't cover everything; the emphasis is on teaching the key principles, and features are introduced as needed. Chapter one starts with a minimal "Hello world" program and the following chapters introduce new concepts. -- cgit v0.12