2
* Copyright (C) 2013-2014 Canonical Ltd
4
* This file is part of Ubuntu Calendar App
6
* Ubuntu Calendar App is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 3 as
8
* published by the Free Software Foundation.
10
* Ubuntu Calendar App is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
import Ubuntu.Components 1.1
20
import Ubuntu.Components.Popups 1.0
21
import Ubuntu.Components.ListItems 1.0
22
import Ubuntu.Components.Themes.Ambiance 1.0
23
import QtOrganizer 5.0
26
import "Defines.js" as Defines
30
objectName: "contactPopover"
32
signal contactSelected(var contact);
36
anchors.centerIn: parent
37
text: i18n.tr("No contact")
38
visible: contactModel.contacts.length === 0
45
detail: ContactDetail.Name
47
matchFlags: Filter.MatchContains
51
detail: ContactDetail.Name
53
matchFlags: Filter.MatchContains
57
detail: ContactDetail.DisplayLabel
58
field: DisplayLabel.Label
59
matchFlags: Filter.MatchContains
73
anchors.top: parent.top
74
anchors.left: parent.left
75
anchors.right: parent.right
76
anchors.margins: units.gu(1)
80
objectName: "contactPopoverInput"
83
placeholderText: i18n.tr("Search contact")
85
height: parent.height*0.5
86
width: parent.height*0.5
87
anchors.verticalCenter: parent.verticalCenter
94
objectName: "contactPopoverList"
100
objectName: "contactPopoverList%1".arg(index)
101
property var item: contactModel.contacts[index]
103
text: item ? item.displayLabel.label : ""
106
root.contactSelected(item);
107
onClicked: PopupUtils.close(root)