I have made the following changes intended for :
  CE:Apps:MTF / qmlcontacts

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/5596

Thank You,
Robin Burchell

[This message was auto-generated]

---

Request # 5596:

Messages from BOSS:

State: review at 2012-08-12T21:09:37 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:w00t:branches:CE:Apps:MTF / qmlcontacts -> CE:Apps:MTF / 
qmlcontacts
  
changes files:
--------------
--- qmlcontacts.changes
+++ qmlcontacts.changes
@@ -0,0 +1,7 @@
+* Sun Aug 12 2012 Robin Burchell <[email protected]> - 0.3.14
+- Implemented support for voice calling in contact card (Tom Swindell)
+- Remove some unused junk (Robin)
+- Basic UI for contact import (Robin)
+- Simple implementation for contact export (Robin)
+- Remove a stale, broken dependency, obsoletes 
0001-remove-old-dependency-on-mobility-contacts.patch (Robin)
+

old:
----
  0001-remove-old-dependency-on-mobility-contacts.patch
  qmlcontacts-0.3.12.tar.bz2

new:
----
  qmlcontacts-0.3.14.tar.bz2

spec files:
-----------
--- qmlcontacts.spec
+++ qmlcontacts.spec
@@ -9,18 +9,19 @@
 # << macros
 
 Summary:    Contacts application for nemo
-Version:    0.3.12
+Version:    0.3.14
 Release:    1
 Group:      Applications/System
 License:    GPLv2
 URL:        https://github.com/nemomobile/qmlcontacts
 Source0:    %{name}-%{version}.tar.bz2
 Source100:  qmlcontacts.yaml
-Patch0:     0001-remove-old-dependency-on-mobility-contacts.patch
 Requires:   qt-components
 Requires:   nemo-qml-plugins-thumbnailer
 Requires:   nemo-qml-plugins-contacts
+Requires:   nemo-qml-plugins-folderlistmodel
 Requires:   qmlgallery
+Requires:   qmlfilemuncher
 BuildRequires:  pkgconfig(QtCore) >= 4.7.0
 BuildRequires:  pkgconfig(QtDeclarative)
 BuildRequires:  pkgconfig(QtContacts)
@@ -47,8 +48,6 @@
 %prep
 %setup -q -n %{name}
 
-# 0001-remove-old-dependency-on-mobility-contacts.patch
-%patch0 -p1
 # >> setup
 # << setup
 

other changes:
--------------

++++++ qmlcontacts-0.3.12.tar.bz2 -> qmlcontacts-0.3.14.tar.bz2
--- src/main.cpp
+++ src/main.cpp
@@ -82,7 +82,10 @@
     view->setAttribute(Qt::WA_NoSystemBackground);
     view->viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
     view->viewport()->setAttribute(Qt::WA_NoSystemBackground);
+
+    // TODO: we could do with a plugin to access QDesktopServices paths
     view->rootContext()->setContextProperty("systemAvatarDirectory", 
QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
+    view->rootContext()->setContextProperty("DocumentsLocation", 
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
 
     if (isFullscreen)
         view->showFullScreen();
--- src/qml/ContactCardContentWidget.qml
+++ src/qml/ContactCardContentWidget.qml
@@ -1,6 +1,7 @@
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import org.nemomobile.contacts 1.0
+import stage.rubyx.voicecall 1.0
 
 Flickable {
     id: detailViewPortrait
@@ -10,6 +11,7 @@
     clip: true
 
     property Person contact
+    property VoiceCallManager callManager
 
     Item {
         id: detailsList
@@ -47,7 +49,7 @@
                     Button {
                         height: parent.height
                         iconSource: 
"image://theme/icon-m-telephony-incoming-call";
-                        onClicked: console.log("TODO: Make call to " + 
contact.firstName)
+                        onClicked: 
callManager.dial(callManager.defaultProviderId, model.modelData);
                     }
                     Button {
                         height: parent.height
--- src/qml/ContactCardPage.qml
+++ src/qml/ContactCardPage.qml
@@ -3,11 +3,14 @@
 import "constants.js" as Constants
 import org.nemomobile.qmlcontacts 1.0
 import org.nemomobile.contacts 1.0
+import stage.rubyx.voicecall 1.0
 
 Page {
     id: detailViewPage
     property Person contact
 
+    VoiceCallManager {id:callManager}
+
     Connections {
         target: contact
         onContactRemoved: {
@@ -30,6 +33,7 @@
         anchors.left: parent.left
         anchors.right: parent.right
         contact: detailViewPage.contact
+        callManager:callManager
     }
 
     tools: ToolBarLayout {
--- src/qml/ContactImportSheet.qml
+++ src/qml/ContactImportSheet.qml
@@ -0,0 +1,71 @@
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import "constants.js" as Constants
+import org.nemomobile.contacts 1.0
+import org.nemomobile.folderlistmodel 1.0
+import org.nemomobile.qmlfilemuncher 1.0
+
+Sheet {
+    id: newContactViewPage
+    acceptButtonText: "Import"
+    rejectButtonText: "Cancel"
+
+    content: Item {
+        id: sheetContent
+        anchors.leftMargin: UiConstants.DefaultMargin
+        anchors.rightMargin: UiConstants.DefaultMargin
+        anchors.fill: parent
+        property string fileName
+
+        ListView {
+            anchors.fill: parent
+
+            model: FolderListModel {
+                id: folderListModel
+                path: DocumentsLocation
+                showDirectories: false
+                nameFilters: [ "*.vcf" ]
+            }
+
+            delegate: FileListDelegate {
+                selected: sheetContent.fileName == model.fileName
+                onClicked: {
+                    sheetContent.fileName = model.fileName
+                    console.log(model.fileName)
+                }
+            }
+        }
+    }
+
+    onAccepted: doImport();
+
+    function doImport() {
+        // TODO: would be nice if folderlistmodel had a role for the full
+        // resolved path
+        var count = app.contactListModel.count
+        console.log("Importing " + sheetContent.fileName)
+        app.contactListModel.importContacts(folderListModel.path + "/" + 
sheetContent.fileName)
+        var newCount = app.contactListModel.count
+        importCompletedDialog.contactCount = newCount - count
+        importCompletedDialog.open()
+    }
+
+    Dialog {
+        id: importCompletedDialog
+        property int contactCount: 0
+
+        title: Label {
+            color: "white"
+            text: "Import completed"
+        }
+
+        content: Label {
+            color: "white"
+            text: "Imported " + importCompletedDialog.contactCount + " 
contacts"
+            width: parent.width
+            height: paintedHeight
+        }
+    }
+}
+
+
--- src/qml/ContactListPage.qml
+++ src/qml/ContactListPage.qml
@@ -59,6 +59,52 @@
                 );
             }
         }
+
+        ToolIcon {
+            iconId: "icon-m-toolbar-view-menu"
+            onClicked: (pageMenu.status == DialogStatus.Closed) ? 
pageMenu.open() : pageMenu.close()
+        }
+    }
+
+    Menu {
+        id: pageMenu
+        MenuLayout {
+            MenuItem {
+                text: "Import contacts"
+                onClicked: {
+                    Constants.loadSingleton("ContactImportSheet.qml", 
groupedViewPage,
+                    function(editor) {
+                        editor.open()
+                    })
+                }
+            }
+
+            MenuItem {
+                text: "Export contacts"
+                onClicked: {
+                    var path = app.contactListModel.exportContacts()
+                    exportCompleteDialog.path = path
+                    exportCompleteDialog.open()
+                }
+            }
+        }
+    }
+
+    Dialog {
+        id: exportCompleteDialog
+        property string path
+
+        title: Label {
+            color: "white"
+            text: "Export completed"
+        }
+
+        content: Label {
+            color: "white"
+            text: "Export completed to " + exportCompleteDialog.path
+            width: parent.width
+            height: paintedHeight
+        }
     }
 }
 
--- src/qml/api/ContactListWidget.qml
+++ src/qml/api/ContactListWidget.qml
@@ -7,7 +7,6 @@
  */
 
 import QtQuick 1.1
-import QtMobility.contacts 1.1
 import com.nokia.meego 1.0
 
 Item {
--- src/qml/main.qml
+++ src/qml/main.qml
@@ -13,7 +13,6 @@
 PageStackWindow {
     id: app
     showToolBar: true;
-//    automaticBookSwitching: false 
 
     property variant accountItem
 
@@ -52,20 +51,6 @@
 
     property int animationDuration: 250
 
-    Loader{
-        id: dialogLoader
-        anchors.fill: parent
-    }
-
-    //Need empty page place holder for filtering
-    Component {
-        id: myAppFavContacts
-        Page {
-            id: favContactsPage
-//            pageTitle: filterFavorites 
-        }
-    }
-
     initialPage: ContactListPage {}
 
     ToolBar {
--- src/res.qrc
+++ src/res.qrc
@@ -4,6 +4,7 @@
         <file>qml/ContactCardContentWidget.qml</file>
         <file>qml/ContactCardPage.qml</file>
         <file>qml/ContactEditorSheet.qml</file>
+        <file>qml/ContactImportSheet.qml</file>
         <file>qml/EditableList.qml</file>
         <file>qml/ContactListPage.qml</file>
         <file>qml/DeleteContactDialog.qml</file>

++++++ qmlcontacts.yaml
--- qmlcontacts.yaml
+++ qmlcontacts.yaml
@@ -1,14 +1,12 @@
 Name:  qmlcontacts
 Summary: Contacts application for nemo
-Version: 0.3.12
+Version: 0.3.14
 Release: 1
 Group: Applications/System
 License: GPLv2
 URL: https://github.com/nemomobile/qmlcontacts
 Sources:
     - "%{name}-%{version}.tar.bz2"
-Patches:
-    - 0001-remove-old-dependency-on-mobility-contacts.patch
 Provides:
     - meego-handset-people > 0.2.32
     - meego-handset-people-branding-upstream > 0.2.32
@@ -28,7 +26,9 @@
     - qt-components
     - nemo-qml-plugins-thumbnailer
     - nemo-qml-plugins-contacts
+    - nemo-qml-plugins-folderlistmodel
     - qmlgallery
+    - qmlfilemuncher
  
 Files:
     - "%{_bindir}/qmlcontacts"

++++++ deleted files:
--- 0001-remove-old-dependency-on-mobility-contacts.patch



Reply via email to