2
* Copyright (C) 2012-2013 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 0.1
19
import Ubuntu.Components.ListItems 0.1 as ListItem
20
import Ubuntu.Components.Popups 0.1 as Popups
21
import Ubuntu.Contacts 0.1 as ContactsUI
25
objectName: "ContactList"
27
title: i18n.tr("Contacts")
35
title: i18n.tr("Error")
36
text: i18n.tr("Fail to Load contacts")
40
gradient: UbuntuColors.greyGradient
41
onClicked: PopupUtils.close(dialogue)
46
ContactsUI.ContactListView {
50
onError: PopupUtils.open(dialog, null)
55
anchors.centerIn: parent
56
running: contactListView.loading
61
pageStack.push(Qt.resolvedUrl("../ContactView/ContactView.qml"),
62
{model: contactList.model, contactId: contactId})
70
iconSource: "artwork:/add.png"
72
var newContact = Qt.createQmlObject("import QtContacts 5.0; Contact{ }", mainPage)
73
pageStack.push(Qt.resolvedUrl("../ContactEdit/ContactEditor.qml"),
74
{model: contactList.model, contact: newContact})