diff options
Diffstat (limited to 'desktop_devguide/chapter_07/src/notezapp/qml')
9 files changed, 23 insertions, 23 deletions
diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Marker.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Marker.qml index e94407c..157c482 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Marker.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Marker.qml @@ -36,10 +36,10 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 // Marker.qml -// The Image element as top level is convenient as the Marker component +// The Image type as top level is convenient as the Marker component // simply is a graphical UI with a clicked() signal. Image { id: root @@ -89,7 +89,7 @@ Image { } ] - // creating a MouseArea element to intercept the mouse click + // creating a MouseArea type to intercept the mouse click MouseArea { id: mouseArea anchors.fill: parent diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/MarkerPanel.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/MarkerPanel.qml index 8885083..a645f24 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/MarkerPanel.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/MarkerPanel.qml @@ -36,7 +36,7 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 // MarkerPanel.qml diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Note.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Note.qml index 75235a5..3a8442f 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Note.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Note.qml @@ -36,7 +36,7 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 // Note.qml Item { @@ -105,7 +105,7 @@ Item { onPaintedHeightChanged: updateNoteHeight() } - // defining a behavior when the height property changes for root element + // defining a behavior when the height property changes for root type Behavior on height { NumberAnimation {} } // javascript helper function that calculates the height of the note diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/NoteToolbar.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/NoteToolbar.qml index b8bf590..082b2db 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/NoteToolbar.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/NoteToolbar.qml @@ -36,7 +36,7 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 // NoteToolbar.qml @@ -55,11 +55,11 @@ Item { border.right: 10; border.bottom: 10 } - //declaring a property alias to the drag property of MouseArea element + //declaring a property alias to the drag property of MouseArea type property alias drag: mousearea.drag //this default property enables us to create QML Items that will be automatically - //laid out in the Row element and considered as toolItems + //laid out in the Row type and considered as toolItems default property alias toolItems: layout.children MouseArea { @@ -74,7 +74,7 @@ Item { onPressed: root.pressed() } - //using a Row element for laying out tool items to be added when using the NoteToolbar + //using a Row type for laying out tool items to be added when using the NoteToolbar Row { id: layout layoutDirection: Qt.RightToLeft @@ -83,10 +83,10 @@ Item { } spacing: 20 - //the opacity depends if the mousearea elements has the cursor of the mouse. + //the opacity depends if the mousearea types has the cursor of the mouse. opacity: mousearea.containsMouse ? 1 : 0 - //using the behavior element to specify the behavior of the layout element + //using the behavior type to specify the behavior of the layout type //when on the opacity changes. Behavior on opacity { //Using NumberAnimation to animate the opacity value in a duration of 350 ms diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Page.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Page.qml index 482244b..0b9c2ef 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Page.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Page.qml @@ -36,7 +36,7 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 import "noteDB.js" as NoteDB @@ -64,7 +64,7 @@ Item { Note { } } - // creting an Item element that will be used as a note container + // creting an Item type that will be used as a note container // we anchor the container to fill the parent as it will be used // later in the code to control the dragging area for notes Item { id: container; anchors.fill: parent } @@ -99,7 +99,7 @@ Item { } // a Javascript helper function for iterating through - // the children elements of the container item + // the children types of the container item // and calls destroy() for deleting them function clear() { for (var i=0; i<container.children.length; ++i) { diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/PagePanel.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/PagePanel.qml index e495cb2..d8c4908 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/PagePanel.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/PagePanel.qml @@ -36,7 +36,7 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 import "noteDB.js" as NoteDB // PagePane.qml diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Tool.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Tool.qml index c89a87e..e439418 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Tool.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/Tool.qml @@ -36,18 +36,18 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 // Tool.qml -// Use Image as the top level element +// Use Image as the top level type Image { id: root //defining the clicked signal signal clicked() - //using a MouseArea element to capture the mouse click of the user + //using a MouseArea type to capture the mouse click of the user MouseArea { anchors.fill: parent onClicked: root.clicked() diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/main.qml b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/main.qml index 35bc299..eb6e9b9 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/main.qml +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/main.qml @@ -36,7 +36,7 @@ ** ****************************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 import "noteDB.js" as NoteDB @@ -95,7 +95,7 @@ Rectangle { } // the toolbar - - // using a Column element to layout the Tool items vertically + // using a Column type to layout the Tool items vertically Column { id: toolbar spacing: 16 diff --git a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/noteDB.js b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/noteDB.js index 9f31b65..b2b91f8 100644 --- a/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/noteDB.js +++ b/desktop_devguide/chapter_07/src/notezapp/qml/noteapp/noteDB.js @@ -40,14 +40,14 @@ //making the nodeDB.js a stateless library .pragma library - +.import QtQuick.LocalStorage 2.0 as Sql // declaring a global variable for storing the database instance var _db // function openDB() { print("noteDB.createDB()") - _db = openDatabaseSync("StickyNotesDB","1.0","The stickynotes Database",1000000); + _db = Sql.LocalStorage.openDatabaseSync("StickyNotesDB","1.0","The stickynotes Database",1000000); createNoteTable(); } |