summaryrefslogtreecommitdiff
path: root/examples/location/places/places.qml
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-05-05 09:34:00 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-05-27 06:36:02 +0000
commit445c799514388ae15bc513419a48461a6c7bd573 (patch)
tree9c92539b0fa850b4fd799a109d60d3a45f05fab5 /examples/location/places/places.qml
parent046eec04fb47dee9a1802503004446d1fe777874 (diff)
downloadqtlocation-445c799514388ae15bc513419a48461a6c7bd573.tar.gz
Remove some unused features from 'places' example
Current plugins do not support adding or removing place and category. Remove this support from 'places' example. Change-Id: I768697e0509c7ff74cc61c5a1ffc3709d28d0b6f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/location/places/places.qml')
-rw-r--r--examples/location/places/places.qml92
1 files changed, 0 insertions, 92 deletions
diff --git a/examples/location/places/places.qml b/examples/location/places/places.qml
index c6021680..814fcd21 100644
--- a/examples/location/places/places.qml
+++ b/examples/location/places/places.qml
@@ -54,8 +54,6 @@ Item {
property variant searchRegionItem
property Plugin favoritesPlugin
- onMapChanged: editPlaceDialog.prepareDialog()
-
Binding {
target: page
property: "startLocation"
@@ -77,7 +75,6 @@ Item {
Component.onCompleted: {
addItem("Provider");
- addItem("New");
addItem("Search");
}
@@ -112,38 +109,6 @@ Item {
}
Menu {
- id: newMenu
- z: backgroundRect.z + 2
- y: page.height
- horizontalOrientation: false
-
- Component.onCompleted: {
- var item = addItem("Place");
- item.enabled = Qt.binding(function() { return placesPlugin.name != "" ? placesPlugin.supportsPlaces(Plugin.SavePlaceFeature) : false })
-
- item = addItem("Category");
- item.enabled = Qt.binding(function() { return placesPlugin.name != "" ? placesPlugin.supportsPlaces(Plugin.SaveCategoryFeature) : false })
- }
-
- onClicked: {
- switch (button) {
- case "Place": {
- editPlaceDialog.prepareDialog();
-
- page.state = "NewPlace";
- break;
- }
- case "Category": {
- editCategoryDialog.category = null;
- editCategoryDialog.prepareDialog();
- page.state = "NewCategory";
- break;
- }
- }
- }
- }
-
- Menu {
id: searchMenu
z: backgroundRect.z + 2
y: page.height
@@ -160,39 +125,6 @@ Item {
}
//=====================Dialogs=====================
- PlaceDialog {
- id: editPlaceDialog
- z: backgroundRect.z + 4
-
- onCancelButtonClicked: page.state = ""
- onCompleted: page.state = "";
- }
-
- CategoryDialog {
- id: editCategoryDialog
- z: backgroundRect.z + 4
-
- onCancelButtonClicked: page.state = ""
-
- Connections {
- target: editCategoryDialog.category
- onStatusChanged: {
- switch (editCategoryDialog.category.status) {
- case Category.Saving: {
- break;
- }
- case Category.Ready: {
- page.state = "";
- break;
- }
- case Category.Error: {
- console.log("Error while saving!");
- break;
- }
- }
- }
- }
- }
InputDialog {
id: searchCenterDialog
@@ -581,30 +513,10 @@ Item {
PropertyChanges { target: providerMenu; y: page.height - providerMenu.height - mainMenu.height }
},
State {
- name: "New"
- PropertyChanges { target: newMenu; y: page.height - newMenu.height - mainMenu.height }
- },
- State {
name: "Search"
PropertyChanges { target: searchMenu; y: page.height - searchMenu.height - mainMenu.height }
},
State {
- name: "NewPlace"
- PropertyChanges { target: editPlaceDialog; title: "New Place"; opacity: 1 }
- },
- State {
- name: "NewCategory"
- PropertyChanges { target: editCategoryDialog; title: "New Category"; opacity: 1 }
- },
- State {
- name: "EditPlace"
- PropertyChanges { target: editPlaceDialog; title: "Edit Place"; opacity: 1 }
- },
- State {
- name: "EditCategory"
- PropertyChanges { target: editCategoryDialog; opacity: 1 }
- },
- State {
name: "Search Center"
PropertyChanges { target: searchCenterDialog; opacity: 1 }
StateChangeScript { script: searchCenterDialog.prepareDialog() }
@@ -637,10 +549,6 @@ Item {
NumberAnimation { properties: "y" ; duration: 300; easing.type: Easing.Linear }
},
Transition {
- to: "New"
- NumberAnimation { properties: "y" ; duration: 300; easing.type: Easing.Linear }
- },
- Transition {
to: "Search"
NumberAnimation { properties: "y" ; duration: 300; easing.type: Easing.Linear }
}