From 5c1496d8839010653a9273586c10d99e0eeb66b2 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 3 Mar 2010 18:36:44 +1000 Subject: More renaming: MouseRegion -> MouseArea --- doc/src/declarative/tutorial.qdoc | 6 +++--- examples/declarative/colorbrowser/colorbrowser.qml | 2 +- examples/declarative/colorbrowser/qml/ColorDelegate.qml | 2 +- examples/declarative/package/Delegate.qml | 2 +- src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 98efe12..310b776 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -173,10 +173,10 @@ In this case the rectangle will have the same size as its parent (see \l{anchor- \snippet examples/declarative/tutorials/helloworld/Cell.qml 3 -In order to change the color of the text when clicking on a cell, we create a \l MouseRegion element with +In order to change the color of the text when clicking on a cell, we create a \l MouseArea element with the same size as its parent. -A \l MouseRegion defines a signal called \e clicked. +A \l MouseArea defines a signal called \e clicked. When this signal is triggered we want to emit our own \e clicked signal with the color as parameter. \section2 The main QML file @@ -214,7 +214,7 @@ Here is the QML code: \snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2 First, we create a new \e down state for our text element. -This state will be activated when the \l MouseRegion is pressed, and deactivated when it is released. +This state will be activated when the \l MouseArea is pressed, and deactivated when it is released. The \e down state includes a set of property changes from our implicit \e {default state} (the items as they were initially defined in the QML). diff --git a/examples/declarative/colorbrowser/colorbrowser.qml b/examples/declarative/colorbrowser/colorbrowser.qml index ebd49c6..421ae07 100644 --- a/examples/declarative/colorbrowser/colorbrowser.qml +++ b/examples/declarative/colorbrowser/colorbrowser.qml @@ -53,7 +53,7 @@ Rectangle { Text { id: albumTitle; text: name; color: 'white'; font.bold: true; anchors.centerIn: parent } } - MouseRegion { anchors.fill: parent; onClicked: wrapper.state = 'inGrid' } + MouseArea { anchors.fill: parent; onClicked: wrapper.state = 'inGrid' } states: [ State { diff --git a/examples/declarative/colorbrowser/qml/ColorDelegate.qml b/examples/declarative/colorbrowser/qml/ColorDelegate.qml index 605e45b..c123d12 100644 --- a/examples/declarative/colorbrowser/qml/ColorDelegate.qml +++ b/examples/declarative/colorbrowser/qml/ColorDelegate.qml @@ -27,7 +27,7 @@ Package { value: hex; when: delegate.open && list.ListView.isCurrentItem } - MouseRegion { + MouseArea { anchors.fill: parent acceptedButtons: Qt.RightButton | Qt.LeftButton onClicked: { diff --git a/examples/declarative/package/Delegate.qml b/examples/declarative/package/Delegate.qml index 62198d0..f35314f 100644 --- a/examples/declarative/package/Delegate.qml +++ b/examples/declarative/package/Delegate.qml @@ -11,7 +11,7 @@ Package { color: 'lightsteelblue' Text { text: display; anchors.centerIn: parent } - MouseRegion { + MouseArea { anchors.fill: parent onClicked: { if (wrapper.state == 'inList') diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index a0aed46..55f1c89 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -144,7 +144,7 @@ QDeclarativeVisualItemModel::QDeclarativeVisualItemModel() QDeclarativeListProperty QDeclarativeVisualItemModel::children() { Q_D(QDeclarativeVisualItemModel); - return QDeclarativeListProperty(this, d, d->children_append, + return QDeclarativeListProperty(this, d, d->children_append, d->children_count, d->children_at); } @@ -483,7 +483,7 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId) QDeclarativeVisualDataModelData::QDeclarativeVisualDataModelData(int index, QDeclarativeVisualDataModel *model) -: m_index(index), m_model(model), +: m_index(index), m_model(model), m_meta(new QDeclarativeVisualDataModelDataMetaObject(this, QDeclarativeVisualDataModelPrivate::get(model)->m_delegateDataType)) { QDeclarativeVisualDataModelPrivate *modelPriv = QDeclarativeVisualDataModelPrivate::get(model); @@ -550,7 +550,7 @@ QVariant QDeclarativeVisualDataModelPartsMetaObject::initialValue(int id) } QDeclarativeVisualDataModelParts::QDeclarativeVisualDataModelParts(QDeclarativeVisualDataModel *parent) -: QObject(parent), model(parent) +: QObject(parent), model(parent) { new QDeclarativeVisualDataModelPartsMetaObject(this); } @@ -840,7 +840,7 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate) Rectangle { height: 25; width: 100 Text { text: path } - MouseRegion { + MouseArea { anchors.fill: parent; onClicked: myModel.setRoot(path) } @@ -969,7 +969,7 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q QObject *QDeclarativeVisualDataModel::parts() { Q_D(QDeclarativeVisualDataModel); - if (!d->m_parts) + if (!d->m_parts) d->m_parts = new QDeclarativeVisualDataModelParts(this); return d->m_parts; } -- cgit v0.12