summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorCristiano di Flora <cristiano.di-flora@nokia.com>2012-02-23 14:24:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-02-23 15:09:50 +0100
commit2f3403123107954bf8b3bc15f75fc7f823bb8bca (patch)
treefbe0f01ffa03b3927dcf43afc3066efc3a0ab37e /examples
parent9fd46734264fe4125600374b8b810f3203486b7d (diff)
Remove obsolete contacts API example.
Change-Id: I29b4e53c2762d35e69c7f7cfdf5536099bb71d85 Reviewed-by: Tommi Anttila <tommi.4.anttila@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qmlcontacts-components/contacts.qml428
-rw-r--r--examples/qmlcontacts-components/contents/.gitattributes2
-rw-r--r--examples/qmlcontacts-components/contents/ContactListView.qml135
-rw-r--r--examples/qmlcontacts-components/contents/ContactView.qml357
-rw-r--r--examples/qmlcontacts-components/contents/FieldEdit.qml78
-rw-r--r--examples/qmlcontacts-components/contents/example.vcf159
-rw-r--r--examples/qmlcontacts-components/contents/images/search-pressed.pngbin1365 -> 0 bytes
-rw-r--r--examples/qmlcontacts-components/contents/images/search.pngbin1353 -> 0 bytes
-rwxr-xr-xexamples/qmlcontacts-components/contents/images/stripes.pngbin257 -> 0 bytes
-rw-r--r--examples/qmlcontacts-components/qmlcontacts.qmlproject14
10 files changed, 0 insertions, 1173 deletions
diff --git a/examples/qmlcontacts-components/contacts.qml b/examples/qmlcontacts-components/contacts.qml
deleted file mode 100644
index 64402dffe..000000000
--- a/examples/qmlcontacts-components/contacts.qml
+++ /dev/null
@@ -1,428 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtContacts 5.0
-import com.nokia.components 1.0
-import com.nokia.components.style 1.0
-
-import "contents"
-ApplicationWindow {
- id: screen; width: 320; height: 480
- property bool enabled: !pageStack.busy && !busy // global app flag
- property bool busy: false
- property string viewType : "contactListView"
- property bool showContact: false
- property Filter currentFilter: contactDetailFilter
- property SortOrder currentSortOrder: defaultSortOrder
-
- // let the ApplicationWindow push the first page
- initialPage: pageList
-
-
-
- Page {
- id: pageList
-
- title: "Contacts [" + contactModel.manager + "]: " +contactListView.count
-
- // TODO These should be the default/universal values
- anchors.leftMargin: 12
- anchors.rightMargin: 12
- // Add a toolbar with a tool button which
- // pops the stack, bringing you back to the
- // previous page
-
- tools: clistToolbar
-
- ToolBarLayout {
- id: clistToolbar; objectName: "clistToolbar"
- anchors.bottom: parent.bottom
-
- ToolIcon {
- objectName: "toolIcon3"
- iconId: "clist.gadd"
- onClicked: {
- var tempContact = Qt.createQmlObject(
- "import QtContacts 5.0;" +
- "Contact {}", contactModel);
-
-// NOTE: Following code is commented out, since with
-// current approach in ContactView.qml (VisualItemModel),
-// no pre-filling of contact details is needed in the tempContact variable.
-//
-// var phone = Qt.createQmlObject("import QtContacts 5.0;" +
-// "PhoneNumber {contexts: ['Home']}", contactModel);
-// var email = Qt.createQmlObject("import QtContacts 5.0;" +
-// "EmailAddress {}", contactModel);
-// var address = Qt.createQmlObject("import QtContacts 5.0;" +
-// "Address {locality: \"\";street: \"\";country: \"\";postcode: \"\";}", contactModel);
-// var name = Qt.createQmlObject("import QtContacts 5.0;" +
-// "Name {firstName: \"\";lastName: \"\"}", contactModel);
-// tempContact.addDetail(name)
-// tempContact.addDetail(phone)
-// tempContact.addDetail(email)
-// tempContact.addDetail(address)
-
- pageStack.push(contactEditComponent, {contact: tempContact, addMode: true, mainModel: contactModel});
- }
- enabled: true
- visible: enabled
- }
- ToolIcon {
- objectName: "toolIcon4"
- iconId: "ctoolbar.gcategories"
- onClicked: {
- settingsMenu.open()
- }
- enabled: true
- visible: enabled
- }
- }
-
- Rectangle {
- id: background
- anchors.fill: parent;
-
- color: "#343434";
- Image { source: "contents/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 1 }
- }
-
- ContactModel {
- id: contactModel
- Component.onCompleted : {
- for (var i = 0; i < contactModel.availableManagers.length; i++)
- {
- if (contactModel.availableManagers[i] != "invalid") {
- console.log("Manager found: " + contactModel.availableManagers[i])
- managersModel.append({"name": contactModel.availableManagers[i]})
- }
- }
-
- if (manager == "memory")
- contactModel.importContacts(Qt.resolvedUrl("contents/example.vcf"));
- }
-
- sortOrders: currentSortOrder
-
- filter: currentFilter
- }
-
- SortOrder {
- id: defaultSortOrder
- detail: ContactDetail.Name
- field: Name.FirstName
- direction: Qt.AscendingOrder
- }
- Component {
- id: contactEditComponent
- ContactView {
- id: contactView
-
-
- onBackClicked: pageStack.pop()
-
- onDismissed: {screen.showContact = false;}
- onDeleted: {contactModel.removeContact(id);}
- }
- }
-
- TextField {
- id:searchField
-
- text: ""
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- platformStyle: TextFieldStyle {
- paddingRight: searchButton.width
- }
- onFocusChanged: {
- if ((pageList.state == "List") && (searchField.state == "someText"))
- searchField.forceActiveFocus()
- }
- states: [
- State {
- name: "empty"
- when: searchField.text == ""
- PropertyChanges {
- target: contactModel; filter: null
- }
- },
- State {
- name: "someText"
- when: searchField.text != ""
- PropertyChanges {
- target: contactModel; filter: currentFilter
- }
- }
- ]
-
- Item {
- id: searchButton
- width: searchImage.width+22
- height: searchImage.height+10
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- Image {
- id: searchImage
- anchors.centerIn: parent
- source: "contents/images/search"+(searchArea.pressed?"-pressed":"")+".png"
- }
- MouseArea {
- id: searchArea
- anchors.fill: parent
- anchors.margins: -8
- onClicked: console.log("Icon was clicked")
- hoverEnabled: true
- }
- }
-
- }
- ContactListView {
- id: contactListView
- width: parent.width
- anchors.top: searchField.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: childrenRect.height
- x: 0
- contacts: contactModel
- onOpenContact: {
- //screen.showContact = true;
- pageStack.push(contactEditComponent, {contact: contact});
- }
- }
-
- states: [
- State {
- name: "List";
- when: pageStack.currentPage == pageList
- //PropertyChanges { target: searchField; focus: true; }
- },
- State {
- name: "SingleContact";
- when: pageStack.currentPage == contactEditComponent
- PropertyChanges { target: searchField; focus: false}
- }
- ]
-
-
-
- DetailFilter {
- id: contactDetailFilter
- detail: ContactDetail.PhoneNumber
- field: PhoneNumber.Number
- value: searchField.text
- matchFlags: Filter.MatchContains
- }
-
- IdFilter {
- id: idFilter
- ids: {searchField.text}
- }
-
- ListModel {
- id: managersModel;
- }
-
- ListModel {
- id: filtersModel
- ListElement {
- label: "Phone"
- field: PhoneNumber.Number
- detail: ContactDetail.PhoneNumber
- }
- ListElement {
- label: "Firstname"
- field: Name.FirstName
- detail: ContactDetail.Name
- }
- ListElement {
- label: "Lastname"
- field: Name.LastName
- detail: ContactDetail.Name
- }
- ListElement {
- label: "Email"
- field: EmailAddress.EmailAddress
- detail: ContactDetail.Email
- }
- ListElement {
- label: "Contact Id"
- }
- }
-
- ListModel {
- id: sortDetailsModel
- ListElement {
- label: "Firstname"
- field: Name.FirstName
- detail: ContactDetail.Name
- }
- ListElement {
- label: "Lastname"
- field: Name.LastName
- detail: ContactDetail.Name
- }
- ListElement {
- label: "Email"
- field: EmailAddress.EmailAddress
- detail: ContactDetail.Email
- }
-
- }
-
- ContextMenu {
- id: settingsMenu
- objectName: "settingsMenu"
- titleText: qsTr("Settings")
- MenuLayout {
- objectName: "settingsMenuLayout"
- MenuItem {
- objectName: "filtering_menuItem"
- text: {
- return "Filtering"
- }
- onClicked: {
- filteringMenu.open()
- }
- }
- MenuItem {
- objectName: "manager_menuItem"
- text: {
- return "Manager"
- }
- onClicked: {
- contextManagerSelectMenu.open()
- }
- }
-
- MenuItem {
- objectName: "sorting_menuItem"
- text: {
- return "Sorting"
- }
- onClicked: {
- sortingMenu.open()
- }
- }
- }
- }
- ContextMenu {
- id: contextManagerSelectMenu
- objectName: "contextManagerSelectMenu"
- titleText: qsTr("Select manager")
- MenuLayout {
- objectName: "contextMenuLayout"
- Repeater {
- objectName: "selectManagerRepeater"
- model: managersModel
- MenuItem {
- objectName: name + "_menuItem"
- text: {
- return name
- }
- onClicked: {
- contactModel.manager = name
- if (name == "memory")
- contactModel.importContacts(Qt.resolvedUrl("contents/example.vcf"));
- }
- }
- }
- }
- }
- ContextMenu {
- id: filteringMenu
- objectName: "filteringMenu"
- titleText: qsTr("Filtering by")
- MenuLayout {
- objectName: "filteringMenuLayout"
- Repeater {
- objectName: "filteringMenuRepeater"
- model: filtersModel
- MenuItem {
- objectName: label + "_menuItem"
- text: {
- return label
- }
- onClicked: {
- if (label != "Contact Id") {
- currentFilter = contactDetailFilter
- contactDetailFilter.detail = detail
- contactDetailFilter.field = field
- } else {
- currentFilter = idFilter
- }
- }
- }
-
- }
- }
- }
-
- ContextMenu {
- id: sortingMenu
- objectName: "sortingMenu"
- titleText: qsTr("Sorting by")
- MenuLayout {
- objectName: "sortingMenuLayout"
- Repeater {
- objectName: "sortingMenuRepeater"
- model: sortDetailsModel
- MenuItem {
- objectName: label + "_menuItem"
- text: {
- return label
- }
- onClicked: {
- currentSortOrder = defaultSortOrder
- defaultSortOrder.detail = detail
- defaultSortOrder.field = field
- }
- }
- }
- }
- }
-
- }//Page
-}//App window
-
diff --git a/examples/qmlcontacts-components/contents/.gitattributes b/examples/qmlcontacts-components/contents/.gitattributes
deleted file mode 100644
index b00330f70..000000000
--- a/examples/qmlcontacts-components/contents/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-*.vcf -crlf
-
diff --git a/examples/qmlcontacts-components/contents/ContactListView.qml b/examples/qmlcontacts-components/contents/ContactListView.qml
deleted file mode 100644
index 5d27c8040..000000000
--- a/examples/qmlcontacts-components/contents/ContactListView.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtContacts 5.0
-import com.nokia.components 1.0
-import com.nokia.components.extras 1.0
-
-Item {
- id: mainItem
- property variant contacts
- property alias visibleArea: mainList.visibleArea
- property alias count: mainList.count
-
- signal openContact(variant contact)
-
- ListView {
- id: mainList
-
- anchors.fill: parent
-
- highlightFollowsCurrentItem: false
- focus: true
- keyNavigationWraps: true
- opacity: 0.8
-
- model: contacts
- section.property: "model.contact.name.firstName"
- section.criteria: ViewSection.FirstCharacter
- section.delegate: ListSectionDelegate { }
-
- delegate: Rectangle {
- id: wrapper
- border.width: 0
- height: 48;
- width: mainList.width;
-
- color: "black"
-
- Text {
- id: displayLabelText
- objectName: "displayLabel"
- anchors { left: parent.left; leftMargin: 7;}
- font.pixelSize: 24
- font.bold: true
- color: "white";
-
- /* TODO: Can we avoid clip? We could use elide, but it does not support rich text (html bolding)
- check http://bugreports.qt.nokia.com/browse/QTBUG-16567
- */
- clip: true
- //elide: Text.ElideRight
- wrapMode: Text.WordWrap
- text: {
- return model.contact.displayLabel;
- // display label?
- if (dl.length > 0) {
- return dl;
- }
- return (fn + " " + ln);
- }
- }
- Text {
- id: contactName
- objectName: "name"
- anchors { left: parent.left;
- top: displayLabelText.bottom;
- leftMargin: 7;
- }
- font.pixelSize: 16
- color: "grey";
-
- /* TODO: Can we avoid clip? We could use elide, but it does not support rich text (html bolding)
- check http://bugreports.qt.nokia.com/browse/QTBUG-16567
- */
- clip: true
- //elide: Text.ElideRight
- wrapMode: Text.WordWrap
- text: {
- // TBD: precalculate in a View (maybe: displayName = [..fields])
- var fn = model.contact.name.firstName || ""
- var ln = model.contact.name.lastName || ""
-
- return (fn + " " + ln);
- }
- }
-
- MouseArea {
- id: clistMouseArea
- anchors.fill: parent
- onClicked: {
- openContact (model.contact);
- }
- }
- }
- }
-}
diff --git a/examples/qmlcontacts-components/contents/ContactView.qml b/examples/qmlcontacts-components/contents/ContactView.qml
deleted file mode 100644
index 29b3fc173..000000000
--- a/examples/qmlcontacts-components/contents/ContactView.qml
+++ /dev/null
@@ -1,357 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtContacts 5.0
-import com.nokia.components 1.0
-import com.nokia.components.style 1.0
-
-Page {
- id: contactEditPage; objectName: "ContactEditPage"
-
- title: addMode ? qsTr("add") : qsTr("edit")
-
- signal backClicked
-
- property bool addMode: false
-
- property Contact contact
- property ContactModel mainModel
-
- signal dismissed
- signal deleted(int id)
-
- tools: toolbarLayout
-
- Rectangle {
- id: contactEditPageBackground
- color: "black"
- anchors.fill:parent
- }
-
- ListView {
- id: contactEditListView; objectName: "contactEditListView"
- anchors.fill: parent
- model: contactCardModel
-// model: contact.details
-// section.property: "definitionName"
-// section.criteria: ViewSection.FullString
-// section.delegate: detailHeading
-// delegate:
-// FieldEdit {
-// id: cardDelegate
-// field: fieldNames[0]
-// detailDefinitionName: definitionName
-// detail: modelData
-// text: value(field)
-// width: contactEditListView.width
-// onValueChanged: {
-// setValue(field, text)
-// }
-// }
- }
-// Component {
-// id: detailHeading
-// Rectangle {
-// width: contactEditListView.width
-// height: childrenRect.height
-// color: "#d3c9c9"
-
-// Text {
-// text: section
-// font.bold: true
-// color: "black"
-// }
-// }
-// }
-
- VisualItemModel {
- id: contactCardModel
- FieldEdit {
- id: firstNameEdit
- field: "firstName"
- detailDefinitionName: "Name"
- text: contact.name.firstName
- width: contactEditListView.width
- onValueChanged: {
- contact.name.firstName = newValue;
- }
- }
- FieldEdit {
- id: lastNameEdit
- field: "lastName"
- detailDefinitionName: "Name"
- text: contact.name.lastName
- width: contactEditListView.width
- onValueChanged: {
- contact.name.lastName = newValue;
- }
- }
- FieldEdit {
- id: emailEdit
- field: "emailAddress"
- detailDefinitionName: "EMail"
- text: contact.email.emailAddress
- width: contactEditListView.width
- onValueChanged: {
- contact.email.emailAddress = newValue;
- }
- }
- FieldEdit {
- id: phoneEdit
- field: "number"
- detailDefinitionName: "Phone Number"
- text: contact.phoneNumber.number
- width: contactEditListView.width
- onValueChanged: {
- contact.phoneNumber.number = newValue;
- }
- }
- FieldEdit {
- id: streetEdit
- field: "street"
- detailDefinitionName: "Address"
- text: contact.address.street
- width: contactEditListView.width
- onValueChanged: {
- contact.address.street = newValue;
- }
- }
- FieldEdit {
- id: postCodeEdit
- field: "postcode"
- detailDefinitionName: "Address"
- text: contact.address.postcode
- width: contactEditListView.width
- onValueChanged: {
- contact.address.postcode = newValue;
- }
- }
- FieldEdit {
- id: cityEdit
- field: "locality"
- detailDefinitionName: "Address"
- text: contact.address.locality
- width: contactEditListView.width
- onValueChanged: {
- contact.address.locality = newValue;
- }
- }
- FieldEdit {
- id: countryEdit
- field: "country"
- detailDefinitionName: "Address"
- text: contact.address.country
- width: contactEditListView.width
- onValueChanged: {
- contact.address.country = newValue;
- }
- }
- FieldEdit {
- id: urlEdit
- field: "url"
- detailDefinitionName: "Url"
- text: contact.url.url
- width: contactEditListView.width
- onValueChanged: {
- contact.url.url = newValue;
- }
- }
- FieldEdit {
- id: genderEdit
- field: "gender"
- detailDefinitionName: "Gender"
- text: contact.gender.gender
- width: contactEditListView.width
- onValueChanged: {
- contact.gender.gender = newValue;
- }
- }
- FieldEdit {
- id: nicknameEdit
- field: "nickname"
- detailDefinitionName: "Nickname"
- text: contact.nickname.nickname
- width: contactEditListView.width
- onValueChanged: {
- contact.nickname.nickname = newValue;
- }
- }
- FieldEdit {
- id: birthdayEdit
- field: "birthday"
- detailDefinitionName: "Birthday"
- text: contact.birthday.birthday
- width: contactEditListView.width
- onValueChanged: {
- contact.birthday.birthday = newValue;
- console.log("<<<<<<<<<<<<< BIRTHDAY: " + contact.birthday.birthday)
- }
- }
- FieldEdit {
- id: noteEdit
- field: "note"
- detailDefinitionName: "Note"
- text: contact.note.note
- width: contactEditListView.width
- onValueChanged: {
- contact.note.note = newValue;
- }
- }
- FieldEdit {
- id: avatarEdit
- field: "imageUrl"
- detailDefinitionName: "Avatar"
- text: contact.avatar.imageUrl
- width: contactEditListView.width
- onValueChanged: {
- contact.avatar.imageUrl = newValue;
- }
- }
- FieldEdit {
- id: ringtoneEdit
- field: "audioRingtoneUrl"
- detailDefinitionName: "Ringtone"
- text: contact.ringtone.audioRingtoneUrl
- width: contactEditListView.width
- onValueChanged: {
- contact.ringtone.audioRingtoneUrl = newValue;
- }
- }
- FieldEdit {
- id: personIdEdit
- field: "personid"
- detailDefinitionName: "Personid"
- text: contact.personid.personid
- width: contactEditListView.width
- onValueChanged: {
- contact.personid.personid = newValue;
- }
- }
- FieldEdit {
- id: assistantnameEdit
- field: "assistantName"
- detailDefinitionName: "Organization"
- text: contact.organization.assistantName
- width: contactEditListView.width
- onValueChanged: {
- contact.organization.assistantName = newValue;
- }
- }
- FieldEdit {
- id: startdateEdit
- field: "startDate"
- detailDefinitionName: "Organization"
- text: contact.organization.startDate
- width: contactEditListView.width
- onValueChanged: {
- contact.organization.startDate = newValue;
- }
- }
- FieldEdit {
- id: extendedDetailEdit
- field: "data"
- detailDefinitionName: "ExtendedDetail"
- detail: contact.extendedDetail
- text: contact.extendedDetail.data
- width: contactEditListView.width
- onValueChanged: {
- contact.extendedDetail.name = "testExtDetail"
- contact.extendedDetail.data = newValue;
- }
- }
- }
-
- ToolBarLayout {
- id: toolbarLayout; objectName: "toolbarLayout"
- ToolIcon {
- objectName: "toolIcon1"
- iconId: "ctoolbar.gback"
- onClicked: contactEditPage.backClicked()
- }
- ToolButtonRow {
- id:button
- objectName: "toolButtonRow"
- ToolButton {
- objectName: "saveButton"
- text:"Save"
- onClicked: {
- if (addMode) {
- mainModel.saveContact(contact);
- } else {
- contact.save();
- }
- contactEditPage.backClicked()
- }
- }
- }
- ToolIcon {
- objectName: "toolIcon2"
- iconId: "ctoolbar.gcategories"
- onClicked: contextMenu.open()
- }
- }
-
- ContextMenu {
- id: contextMenu
- objectName: "contextMenu"
- titleText: qsTr("Options")
- MenuLayout {
- objectName: "contextMenuLayout"
- MenuItem {
- objectName: "deleteContactMenuItem"
- text: qsTr("Delete contact")
- visible: !addMode
- onClicked: {
- if (contact.contactId != "")
- contactModel.removeContact(contact.contactId)
- contactEditPage.backClicked()
- }
- }
- MenuItem {
- objectName: "cancelContactMenuItem"
- text: qsTr("Cancel editing")
- onClicked: {
- contactEditPage.backClicked()
- }
- }
- }
- }
-}
diff --git a/examples/qmlcontacts-components/contents/FieldEdit.qml b/examples/qmlcontacts-components/contents/FieldEdit.qml
deleted file mode 100644
index 099646d07..000000000
--- a/examples/qmlcontacts-components/contents/FieldEdit.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import com.nokia.components 1.0
-import QtContacts 5.0
-
-Rectangle {
- id: fieldEdit
- property string field
- property string detailDefinitionName
- property string text
- signal valueChanged(string newValue)
- height: childrenRect.height
- color: "black"
- Column {
- height: childrenRect.height
- width: parent.width
- spacing: 3
- Text {
- id: labelText
- text: detailDefinitionName + ": " + field
- height: 30
- color: "white"
- font.pointSize: 16
- width: parent.width
-
- }
- TextField {
- id: fieldValue
- height: 30
- text: fieldEdit.text
- font.pointSize: 16
- width: parent.width
- onTextChanged: {
- console.log ("Sending valueChange with arg " + text)
- fieldEdit.valueChanged(text)
- }
- }
- }
-}
diff --git a/examples/qmlcontacts-components/contents/example.vcf b/examples/qmlcontacts-components/contents/example.vcf
deleted file mode 100644
index a1d993cfc..000000000
--- a/examples/qmlcontacts-components/contents/example.vcf
+++ /dev/null
@@ -1,159 +0,0 @@
-BEGIN:VCARD
-VERSION:3.0
-FN:Ms. Aaron Gates
-N:Gates;Aaron;;;
-NICKNAME:Aaron nickname
-EMAIL;TYPE=INTERNET:aaron@example.com
-EMAIL;TYPE=INTERNET:aaron_extra@example.com
-TEL;TYPE=WORK:33333
-TEL;TYPE=HOME:333331
-TEL;TYPE=HOME;TYPE=FAX:333332
-TEL;TYPE=PAGER:333333
-TEL;TYPE=CELL:333334
-ADR;WORK;POSTAL;CHARSET=UTF-8:PO Box;Extended Address;Work Street Address;Work Locality(Town);Work Region(State);Work Post Code;Work Country;Work City;Work State;Work PostCode;Work Country
-ADR;HOME;POSTAL;CHARSET=UTF-8:PO Box;Extended Address;Home Street Address;Home Locality(Town);Home Region(State);Home Post Code;Home Country;Work City;Work State;Work PostCode;Work Country
-LABEL;WORK;ENCODING=QUOTED-PRINTABLE:BusinessOffice=0D=0A=0D=0A, =0D=0A
-LABEL;HOME;ENCODING=QUOTED-PRINTABLE:=0D=0A, =0D=0A
-ORG:Example
-TITLE:Engineer
-BDAY:2009-01-01
-PHOTO;ENCODING=BASE64;TYPE=GOOGLECONTACTSPHOTO_1140C7078B06ECD7:/9j/4A
- AQSkZJRgABAQAAAQABAAD/2wCEAAUDBA0OCREQDg8IDggICAoICAgOCAgICQgICBAIBw
- gICAgIDRANCAgOCQgIDBUNDhERExMTBw0WGBYSGBAXExIBBQUFCAcHDwkJDxgVEhQYFh
- kUFBQUFBQUFBUUFBwcFBQUFBQUFBQUFRUWFBQUFBQUFBQUFBQUFB4UFBQeFBQeHv/AAB
- EIAGAAYAMBIgACEQEDEQH/xAAdAAACAwACAwAAAAAAAAAAAAAHCAAFBgIDAQQJ/8QARh
- AAAQIDBAUGCQgKAwAAAAAAAgEDAAQSBQYREwchIjJzCDE0QlKyFEFRYWJxcqLCI4GRkq
- GxwdEVJCUzNUNTgoPwY9Lh/8QAGgEAAwEBAQEAAAAAAAAAAAAAAwQFBgECAP/EADQRAA
- ECBAMFBgMJAAAAAAAAAAEAAgMEBRESITEyQUJxgSI0UZGhsRPB8QYUFSMzYYLh8P/aAA
- wDAQACEQMRAD8AA+ji5YgLc1ONicu5UcjIkVKWhTsq66o6xkRWpFVFRahg96L350mUEX
- nJeyWKxlpBsRIKXFJw2gMtZS+JFrXXA8vblpNGDIZcmwSBKy2YTgy7Tm0YARa6VIiX+6
- DnYcmLUuACgiLbY0im7tJUW1Gbqk89rbNNrrKGbfMx3ZkNboArZmfdEURDJBHdHsx6V5
- 2BnJdGZsc+TF0X/BjLLTNGoRPMb16kIvrR2RIzgmIoNw4+ZTQe4aFZWc0aWQTDgJZ8qB
- utk2MyMw/my5Emp1oeZTHnRF7MY6T5Oll4pXM21h46GpfH3ggtxIbh1WZZo6/PNGbMxG
- 70uL3JqmSMlbmbPR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q3cSERXtLzQzU/Ki40
- QluuDSUdlx8SVsN4+SFTO1Llo1uUAVFfIXzjHiNbaujdqWZdezp1x2moG3HvkA1puN4c
- /zxkox05JulnhrzmRfJKvhuYbOS83k6Y5xQ+GGDZ3R4Qd0YXy8nTHOKHwwwbG6PBDujF
- CscPVSpDbeucZ22rEcSaCaliFufYISqX92+I/y3BH6I0USJMGM6E7E3VUCwEWK1t0tMr
- amDU82crNOqLbaqVTUw4Wzi0qbo4+WC2KwoulWzzKXF1san5RwSDtCONRFtdVIZHRZeV
- ucs1p1sqvkhad8zzaILnvJG1pk6ZiHd2qoyMy57zDedNP3XRfe9+QStgBK7l1VruDj+M
- CuZfIyVSUiMtoiXrQZr0XaamMFOtCHritJKnkKA9akugPuAlSiy8QCS7yiPa9KIdbZGD
- 7uPZ3fRcnQ+9zpuVNalkNukikhI63+6eHZcaLtAXaTxRrLBvbNMgg5pvUjTmO63C9Iqe
- tFHEiTDm40MWY4gJJhLDduRVnatuvO6nDJQ/p9X2orIkd8hLkbogOtTLBB8sDc98V2ZJ
- JXSS45r//Z
-URL;TYPE=WORK:http://qt.nokia.com/logo.png
-URL;TYPE=HOME:http://qt.nokia.com/logo.png
-NOTE:Some notes are here
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. Alexander Mcdonald
-N:Mcdonald;Alexander;;;
-EMAIL;TYPE=INTERNET:alex@example.com
-TEL;TYPE=WORK:111111111
-ADR;TYPE=WORK;POSTAL;CHARSET=UTF-8:PO Box;Extended Address;Work Street Address;Work Locality(Town);Work Region(State);Work Post Code;Work Country;Work City;Work State;Work PostCode;Work Country
-ADR;TYPE=HOME;POSTAL;CHARSET=UTF-8:PO Box;Extended Address;Home Street Address;Home Locality(Town);Home Region(State);Home Post Code;Home Country;Work City;Work State;Work PostCode;Work Country
-ORG:Example
-TITLE:Engineer
-BDAY:2010-02-02
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. Andy Clark
-N:Clark;Andy;;;
-EMAIL;TYPE=INTERNET:andy@example.com
-TEL;TYPE=WORK:07-2342322
-ORG:Example
-TITLE:Engineer
-BDAY:2011-03-03
-PHOTO;VALUE=URL;TYPE=PNG:http://qt.nokia.com/logo.png
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. Bill Chilton
-N:Chilton;Bill;;;
-EMAIL;TYPE=INTERNET:bill@example.com
-TEL;TYPE=WORK:564412232
-ORG:Example
-TITLE:Manager
-BDAY:2012-04-04
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. Bob Green
-N:Green;Bob;;;
-EMAIL;TYPE=INTERNET:bob@example.com
-TEL;TYPE=WORK:07-3242325
-ORG:Example
-TITLE:Engineer
-BDAY:2013-05-05
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. Charles Brows
-N:Brows;Charles;;;
-EMAIL;TYPE=INTERNET:charles@example.com
-TEL;TYPE=WORK:32324534233
-ORG:Example
-TITLE:Engineer
-BDAY:2015-07-07
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. David Edie
-N:Edie;David;;;
-EMAIL;TYPE=INTERNET:david@example.com
-TEL;TYPE=WORK:(07) 3245-2323
-ORG:Example
-TITLE:Manager
-BDAY:2015-08-08
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mr. Jason Black
-N:Black;Jason;;;
-EMAIL;TYPE=INTERNET:jason@example.com
-TEL;TYPE=WORK:33333333333
-ORG:Example
-TITLE:Engineer
-BDAY:2016-09-09
-END:VCARD
-BEGIN:VCARD
-VERSION:3.0
-FN:Mrs. Carol Eden
-N:Eden;Carol;;;
-EMAIL;TYPE=INTERNET:carol@example.com
-TEL;TYPE=WORK:2323242
-ORG:Example
-TITLE:Manager
-BDAY:2014-06-06
-END:VCARD
diff --git a/examples/qmlcontacts-components/contents/images/search-pressed.png b/examples/qmlcontacts-components/contents/images/search-pressed.png
deleted file mode 100644
index 5731fece1..000000000
--- a/examples/qmlcontacts-components/contents/images/search-pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlcontacts-components/contents/images/search.png b/examples/qmlcontacts-components/contents/images/search.png
deleted file mode 100644
index e06c9d51a..000000000
--- a/examples/qmlcontacts-components/contents/images/search.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlcontacts-components/contents/images/stripes.png b/examples/qmlcontacts-components/contents/images/stripes.png
deleted file mode 100755
index 9f36727ea..000000000
--- a/examples/qmlcontacts-components/contents/images/stripes.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlcontacts-components/qmlcontacts.qmlproject b/examples/qmlcontacts-components/qmlcontacts.qmlproject
deleted file mode 100644
index 2bb401699..000000000
--- a/examples/qmlcontacts-components/qmlcontacts.qmlproject
+++ /dev/null
@@ -1,14 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}