Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / doc / src / snippets / declarative / mousearea / mousearea-snippet.qml
index 6f5b61a..237c0c3 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the documentation of the Qt Toolkit.
 **
 ** 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 QtQuick 1.0
+import QtQuick 2.0
 
 //! [parent begin]
 Rectangle {
@@ -47,51 +47,51 @@ Rectangle {
     width: 500; height: 500
     color: "green"
 
-Column {
-//! [anchor fill]
-Rectangle {
-    id: button
-    width: 100; height: 100
+    Column {
+        //! [anchor fill]
+        Rectangle {
+            id: button
+            width: 100; height: 100
 
-    MouseArea {
-        anchors.fill: parent
-        onClicked: console.log("button clicked")
-    }
-    MouseArea {
-        width:150; height: 75
-        onClicked: console.log("irregular area clicked")
-    }
-}
-//! [anchor fill]
+            MouseArea {
+                anchors.fill: parent
+                onClicked: console.log("button clicked")
+            }
+            MouseArea {
+                width:150; height: 75
+                onClicked: console.log("irregular area clicked")
+            }
+        }
+        //! [anchor fill]
 
-Rectangle {
-    width: 100; height: 100
+        Rectangle {
+            width: 100; height: 100
 
-//! [enable handlers]
-    MouseArea {
-        hoverEnabled: true
-        acceptedButtons: Qt.LeftButton | Qt.RightButton
-        onEntered: console.log("mouse entered the area")
-        onExited: console.log("mouse left the area")
-    }
-//! [enable handlers]
-}
+        //! [enable handlers]
+            MouseArea {
+                hoverEnabled: true
+                acceptedButtons: Qt.LeftButton | Qt.RightButton
+                onEntered: console.log("mouse entered the area")
+                onExited: console.log("mouse left the area")
+            }
+        //! [enable handlers]
+        }
 
-Rectangle {
-    width: 100; height: 100
+        Rectangle {
+            width: 100; height: 100
 
-//! [mouse handlers]
-    MouseArea {
-        anchors.fill: parent
-        onClicked: console.log("area clicked")
-        onDoubleClicked: console.log("area double clicked")
-        onEntered: console.log("mouse entered the area")
-        onExited: console.log("mouse left the area")
-    }
-//! [mouse handlers]
-}
+        //! [mouse handlers]
+            MouseArea {
+                anchors.fill: parent
+                onClicked: console.log("area clicked")
+                onDoubleClicked: console.log("area double clicked")
+                onEntered: console.log("mouse entered the area")
+                onExited: console.log("mouse left the area")
+            }
+        //! [mouse handlers]
+        }
 
-} //end of column
+    } //end of column
 //! [parent end]
 }
 //! [parent end]