summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-12-01 14:48:42 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-12 09:13:32 +0100
commit52923d7f194fa7740e4bd9cbfb4a0ace4c18a131 (patch)
tree213c3b8507da38c3c36745e86d3492ca38e7464d /examples
parent6bde27901a94c68328cc48b46d5cbe03430081e4 (diff)
downloadqtlocation-52923d7f194fa7740e4bd9cbfb4a0ace4c18a131.tar.gz
Share common components between Mapviewer and Places example.
Common components are import with "import QtLocation.examples 5.0". Change-Id: I8eef858f07cdf1c567c48ff1ecb63b2b50e3844c Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/common/QtLocation/examples/components/BusyIndicator.qml (renamed from examples/declarative/places/content/components/BusyIndicator.qml)2
-rw-r--r--examples/declarative/common/QtLocation/examples/components/Button.qml (renamed from examples/declarative/places/content/components/Button.qml)2
-rw-r--r--examples/declarative/common/QtLocation/examples/components/Checkbox.qml (renamed from examples/declarative/places/content/components/Checkbox.qml)2
-rw-r--r--examples/declarative/common/QtLocation/examples/components/Fader.qml (renamed from examples/declarative/mapviewer/mapviewer/content/components/Fader.qml)0
-rw-r--r--examples/declarative/common/QtLocation/examples/components/IconButton.qml (renamed from examples/declarative/places/content/components/IconButton.qml)0
-rw-r--r--examples/declarative/common/QtLocation/examples/components/Menu.qml (renamed from examples/declarative/mapviewer/mapviewer/content/components/Menu.qml)0
-rw-r--r--examples/declarative/common/QtLocation/examples/components/Optionbutton.qml (renamed from examples/declarative/places/content/components/Optionbutton.qml)2
-rw-r--r--examples/declarative/common/QtLocation/examples/components/Slider.qml (renamed from examples/declarative/mapviewer/mapviewer/content/components/Slider.qml)0
-rw-r--r--examples/declarative/common/QtLocation/examples/components/TextWithLabel.qml (renamed from examples/declarative/mapviewer/mapviewer/content/components/TextWithLabel.qml)0
-rw-r--r--examples/declarative/common/QtLocation/examples/components/TitleBar.qml (renamed from examples/declarative/places/content/components/TitleBar.qml)8
-rw-r--r--examples/declarative/common/QtLocation/examples/components/style/ButtonStyle.qml (renamed from examples/declarative/mapviewer/mapviewer/content/components/style/ButtonStyle.qml)6
-rw-r--r--examples/declarative/common/QtLocation/examples/components/style/HMenuItemStyle.qml (renamed from examples/declarative/places/content/components/style/HMenuItemStyle.qml)7
-rw-r--r--examples/declarative/common/QtLocation/examples/components/style/VMenuItemStyle.qml (renamed from examples/declarative/places/content/components/style/VMenuItemStyle.qml)2
-rw-r--r--examples/declarative/common/QtLocation/examples/dialogs/Dialog.qml (renamed from examples/declarative/mapviewer/mapviewer/content/dialogs/Dialog.qml)0
-rw-r--r--examples/declarative/common/QtLocation/examples/qmldir11
-rw-r--r--examples/declarative/common/common.pri31
-rw-r--r--examples/declarative/common/common.qrc70
-rwxr-xr-xexamples/declarative/common/resources/busy.png (renamed from examples/declarative/places/content/resources/busy.png)bin3386 -> 3386 bytes
-rw-r--r--examples/declarative/common/resources/button.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/button.png)bin2143 -> 2143 bytes
-rw-r--r--examples/declarative/common/resources/button.sci (renamed from examples/declarative/mapviewer/mapviewer/content/resources/button.sci)0
-rw-r--r--examples/declarative/common/resources/button_hovered.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/button_hovered.png)bin2066 -> 2066 bytes
-rw-r--r--examples/declarative/common/resources/button_pressed.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/button_pressed.png)bin2499 -> 2499 bytes
-rw-r--r--examples/declarative/common/resources/catch.png (renamed from examples/declarative/places/content/resources/catch.png)bin977 -> 977 bytes
-rw-r--r--examples/declarative/common/resources/categories.png (renamed from examples/declarative/places/content/resources/categories.png)bin388 -> 388 bytes
-rw-r--r--examples/declarative/common/resources/categories_hovered.png (renamed from examples/declarative/places/content/resources/categories_hovered.png)bin398 -> 398 bytes
-rw-r--r--examples/declarative/common/resources/categories_pressed.png (renamed from examples/declarative/places/content/resources/categories_pressed.png)bin393 -> 393 bytes
-rw-r--r--examples/declarative/common/resources/checkbox.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/checkbox.png)bin410 -> 410 bytes
-rw-r--r--examples/declarative/common/resources/checkbox_selected.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/checkbox_selected.png)bin766 -> 766 bytes
-rw-r--r--examples/declarative/common/resources/cross.png (renamed from examples/declarative/places/content/resources/cross.png)bin1514 -> 1514 bytes
-rw-r--r--examples/declarative/common/resources/cross_hovered.png (renamed from examples/declarative/places/content/resources/cross_hovered.png)bin1579 -> 1579 bytes
-rw-r--r--examples/declarative/common/resources/cross_pressed.png (renamed from examples/declarative/places/content/resources/cross_pressed.png)bin1556 -> 1556 bytes
-rw-r--r--examples/declarative/common/resources/hmenuItem.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem.png)bin1246 -> 1246 bytes
-rw-r--r--examples/declarative/common/resources/hmenuItem.sci (renamed from examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem.sci)0
-rw-r--r--examples/declarative/common/resources/hmenuItem_hovered.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem_hovered.png)bin1191 -> 1191 bytes
-rw-r--r--examples/declarative/common/resources/hmenuItem_pressed.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem_pressed.png)bin1203 -> 1203 bytes
-rw-r--r--examples/declarative/common/resources/left.png (renamed from examples/declarative/places/content/resources/left.png)bin1223 -> 1223 bytes
-rw-r--r--examples/declarative/common/resources/left_hovered.png (renamed from examples/declarative/places/content/resources/left_hovered.png)bin1261 -> 1261 bytes
-rw-r--r--examples/declarative/common/resources/left_pressed.png (renamed from examples/declarative/places/content/resources/left_pressed.png)bin1251 -> 1251 bytes
-rw-r--r--examples/declarative/common/resources/marker.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/marker.png)bin2341 -> 2341 bytes
-rw-r--r--examples/declarative/common/resources/marker_hovered.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/marker_hovered.png)bin2358 -> 2358 bytes
-rw-r--r--examples/declarative/common/resources/marker_selected.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/marker_selected.png)bin2355 -> 2355 bytes
-rw-r--r--examples/declarative/common/resources/menuItem.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/menuItem.png)bin1436 -> 1436 bytes
-rw-r--r--examples/declarative/common/resources/menuItem.sci (renamed from examples/declarative/mapviewer/mapviewer/content/resources/menuItem.sci)0
-rw-r--r--examples/declarative/common/resources/menuItem_hovered.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/menuItem_hovered.png)bin1380 -> 1380 bytes
-rw-r--r--examples/declarative/common/resources/menuItem_pressed.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/menuItem_pressed.png)bin1389 -> 1389 bytes
-rw-r--r--examples/declarative/common/resources/node.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/node.png)bin432 -> 432 bytes
-rw-r--r--examples/declarative/common/resources/node_selected.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/node_selected.png)bin458 -> 458 bytes
-rw-r--r--examples/declarative/common/resources/option_button.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/option_button.png)bin759 -> 759 bytes
-rw-r--r--examples/declarative/common/resources/option_button_selected.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/option_button_selected.png)bin666 -> 666 bytes
-rw-r--r--examples/declarative/common/resources/pencil.png (renamed from examples/declarative/places/content/resources/pencil.png)bin1276 -> 1276 bytes
-rw-r--r--examples/declarative/common/resources/pencil_hovered.png (renamed from examples/declarative/places/content/resources/pencil_hovered.png)bin1201 -> 1201 bytes
-rw-r--r--examples/declarative/common/resources/pencil_pressed.png (renamed from examples/declarative/places/content/resources/pencil_pressed.png)bin1159 -> 1159 bytes
-rw-r--r--examples/declarative/common/resources/quit.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/quit.png)bin2439 -> 2439 bytes
-rw-r--r--examples/declarative/common/resources/quit_hovered.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/quit_hovered.png)bin2702 -> 2702 bytes
-rw-r--r--examples/declarative/common/resources/quit_pressed.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/quit_pressed.png)bin2396 -> 2396 bytes
-rw-r--r--examples/declarative/common/resources/right.png (renamed from examples/declarative/places/content/resources/right.png)bin1205 -> 1205 bytes
-rw-r--r--examples/declarative/common/resources/right_hovered.png (renamed from examples/declarative/places/content/resources/right_hovered.png)bin1264 -> 1264 bytes
-rw-r--r--examples/declarative/common/resources/right_pressed.png (renamed from examples/declarative/places/content/resources/right_pressed.png)bin1270 -> 1270 bytes
-rw-r--r--examples/declarative/common/resources/scale.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/scale.png)bin176 -> 176 bytes
-rw-r--r--examples/declarative/common/resources/scale_end.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/scale_end.png)bin208 -> 208 bytes
-rw-r--r--examples/declarative/common/resources/search.png (renamed from examples/declarative/places/content/resources/search.png)bin4731 -> 4731 bytes
-rw-r--r--examples/declarative/common/resources/search_hovered.png (renamed from examples/declarative/places/content/resources/search_hovered.png)bin4544 -> 4544 bytes
-rw-r--r--examples/declarative/common/resources/search_pressed.png (renamed from examples/declarative/places/content/resources/search_pressed.png)bin4628 -> 4628 bytes
-rw-r--r--examples/declarative/common/resources/star.png (renamed from examples/declarative/places/content/resources/star.png)bin4204 -> 4204 bytes
-rw-r--r--examples/declarative/common/resources/titlebar.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/titlebar.png)bin1246 -> 1246 bytes
-rw-r--r--examples/declarative/common/resources/titlebar.sci (renamed from examples/declarative/mapviewer/mapviewer/content/resources/titlebar.sci)0
-rw-r--r--examples/declarative/common/resources/vmenuItem.png (renamed from examples/declarative/mapviewer/mapviewer/content/resources/vmenuItem.png)bin241 -> 241 bytes
-rw-r--r--examples/declarative/common/resources/vmenuItem.sci (renamed from examples/declarative/mapviewer/mapviewer/content/resources/vmenuItem.sci)0
-rw-r--r--examples/declarative/mapviewer/content/dialogs/Message.qml (renamed from examples/declarative/mapviewer/mapviewer/content/dialogs/Message.qml)2
-rw-r--r--examples/declarative/mapviewer/content/dialogs/RouteDialog.qml (renamed from examples/declarative/mapviewer/mapviewer/content/dialogs/RouteDialog.qml)6
-rw-r--r--examples/declarative/mapviewer/content/map/CircleItem.qml (renamed from examples/declarative/mapviewer/mapviewer/content/map/CircleItem.qml)0
-rw-r--r--examples/declarative/mapviewer/content/map/MapComponent.qml (renamed from examples/declarative/mapviewer/mapviewer/content/map/MapComponent.qml)8
-rw-r--r--examples/declarative/mapviewer/content/map/Marker.qml (renamed from examples/declarative/mapviewer/mapviewer/content/map/Marker.qml)4
-rw-r--r--examples/declarative/mapviewer/content/map/PolygonItem.qml (renamed from examples/declarative/mapviewer/mapviewer/content/map/PolygonItem.qml)0
-rw-r--r--examples/declarative/mapviewer/content/map/PolylineItem.qml (renamed from examples/declarative/mapviewer/mapviewer/content/map/PolylineItem.qml)0
-rw-r--r--examples/declarative/mapviewer/content/map/RectangleItem.qml (renamed from examples/declarative/mapviewer/mapviewer/content/map/RectangleItem.qml)0
-rw-r--r--[-rwxr-xr-x]examples/declarative/mapviewer/icon.png (renamed from examples/declarative/mapviewer/mapviewer/icon.png)bin5312 -> 5312 bytes
-rw-r--r--examples/declarative/mapviewer/info.json (renamed from examples/declarative/mapviewer/mapviewer/info.json)0
-rw-r--r--examples/declarative/mapviewer/mapviewer.pri20
-rw-r--r--examples/declarative/mapviewer/mapviewer.pro5
-rw-r--r--examples/declarative/mapviewer/mapviewer.qml (renamed from examples/declarative/mapviewer/mapviewer/mapviewer.qml)2
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/components/Button.qml103
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/components/Checkbox.qml64
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/components/Optionbutton.qml68
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/components/TitleBar.qml87
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/components/style/HMenuItemStyle.qml48
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/components/style/VMenuItemStyle.qml44
-rw-r--r--examples/declarative/mapviewer/mapviewer/content/resources/catch.pngbin907 -> 0 bytes
-rw-r--r--examples/declarative/mapviewer/mapviewer/mapviewer.pro3
-rw-r--r--examples/declarative/mapviewer/mapviewer/qml.pro69
-rw-r--r--examples/declarative/mapviewer/mapviewerwrapper.pro14
-rw-r--r--examples/declarative/mapviewer/mapviewerwrapper.qrc13
-rw-r--r--examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.pro35
-rw-r--r--examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.qrc62
-rw-r--r--examples/declarative/mapviewer/notions.json (renamed from examples/declarative/mapviewer/mapviewer/notions.json)0
-rw-r--r--examples/declarative/mapviewer/qml.pro24
-rw-r--r--examples/declarative/mapviewer/qmlmapviewerwrapper.cpp (renamed from examples/declarative/mapviewer/mapviewerwrapper/qmlmapviewerwrapper.cpp)3
-rw-r--r--examples/declarative/mapviewer/settings.json (renamed from examples/declarative/mapviewer/mapviewer/settings.json)0
-rw-r--r--examples/declarative/places/content/components/Fader.qml68
-rw-r--r--examples/declarative/places/content/components/Menu.qml149
-rw-r--r--examples/declarative/places/content/components/Slider.qml133
-rw-r--r--examples/declarative/places/content/components/TextWithLabel.qml88
-rw-r--r--examples/declarative/places/content/components/style/ButtonStyle.qml49
-rw-r--r--examples/declarative/places/content/dialogs/Dialog.qml180
-rw-r--r--examples/declarative/places/content/map/MapComponent.qml835
-rw-r--r--examples/declarative/places/content/map/Marker.qml130
-rw-r--r--examples/declarative/places/content/places/CategoryDelegate.qml20
-rw-r--r--examples/declarative/places/content/places/CategoryDialog.qml2
-rw-r--r--examples/declarative/places/content/places/MapComponent.qml246
-rw-r--r--examples/declarative/places/content/places/PlaceDelegate.qml2
-rw-r--r--examples/declarative/places/content/places/PlaceDialog.qml2
-rw-r--r--examples/declarative/places/content/places/RatingView.qml2
-rw-r--r--examples/declarative/places/content/places/SearchBox.qml22
-rw-r--r--examples/declarative/places/content/places/SearchResultView.qml20
-rw-r--r--examples/declarative/places/content/resources/button.pngbin2143 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/button.sci5
-rw-r--r--examples/declarative/places/content/resources/button_hovered.pngbin2066 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/button_pressed.pngbin2499 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/checkbox.pngbin410 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/checkbox_selected.pngbin766 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/hmenuItem.pngbin1246 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/hmenuItem.sci5
-rw-r--r--examples/declarative/places/content/resources/hmenuItem_hovered.pngbin1191 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/hmenuItem_pressed.pngbin1203 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/marker.pngbin2341 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/marker_hovered.pngbin2358 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/marker_selected.pngbin2355 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/node.pngbin432 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/node_selected.pngbin458 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/option_button.pngbin759 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/option_button_selected.pngbin666 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/quit.pngbin2439 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/quit_hovered.pngbin2702 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/quit_pressed.pngbin2396 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/scale.pngbin228 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/titlebar.pngbin1246 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/titlebar.sci5
-rw-r--r--examples/declarative/places/content/resources/vmenuItem.pngbin241 -> 0 bytes
-rw-r--r--examples/declarative/places/content/resources/vmenuItem.sci5
-rw-r--r--examples/declarative/places/places.pri42
-rw-r--r--examples/declarative/places/places.qml10
-rw-r--r--examples/declarative/places/placeswrapper.pro1
-rw-r--r--examples/declarative/places/placeswrapper.qrc83
-rw-r--r--examples/declarative/places/qmlplaceswrapper.cpp3
144 files changed, 522 insertions, 2412 deletions
diff --git a/examples/declarative/places/content/components/BusyIndicator.qml b/examples/declarative/common/QtLocation/examples/components/BusyIndicator.qml
index 7f409d0b..100e56dd 100644
--- a/examples/declarative/places/content/components/BusyIndicator.qml
+++ b/examples/declarative/common/QtLocation/examples/components/BusyIndicator.qml
@@ -45,7 +45,7 @@ Image {
property bool running: false
- source: "../resources/busy.png"
+ source: "../../../resources/busy.png"
RotationAnimation on rotation {
loops: Animation.Infinite
diff --git a/examples/declarative/places/content/components/Button.qml b/examples/declarative/common/QtLocation/examples/components/Button.qml
index 654fe106..18516d8c 100644
--- a/examples/declarative/places/content/components/Button.qml
+++ b/examples/declarative/common/QtLocation/examples/components/Button.qml
@@ -48,6 +48,8 @@ Item {
property alias text: buttonText.text
property alias color: buttonText.color
+ property alias paintedWidth: buttonText.paintedWidth
+ property alias paintedHeight: buttonText.paintedHeight
property bool checked: false
property bool enabled: true
property ButtonStyle style: ButtonStyle{}
diff --git a/examples/declarative/places/content/components/Checkbox.qml b/examples/declarative/common/QtLocation/examples/components/Checkbox.qml
index a7e8d883..56b77a5d 100644
--- a/examples/declarative/places/content/components/Checkbox.qml
+++ b/examples/declarative/common/QtLocation/examples/components/Checkbox.qml
@@ -50,7 +50,7 @@ Item {
spacing: 3
anchors.fill: parent
Image {
- source: checkbox.selected ? "../resources/checkbox_selected.png" : "../resources/checkbox.png"
+ source: checkbox.selected ? "../../../resources/checkbox_selected.png" : "../../../resources/checkbox.png"
}
Text {
id: checkboxText
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/Fader.qml b/examples/declarative/common/QtLocation/examples/components/Fader.qml
index 2e0dd4bd..2e0dd4bd 100644
--- a/examples/declarative/mapviewer/mapviewer/content/components/Fader.qml
+++ b/examples/declarative/common/QtLocation/examples/components/Fader.qml
diff --git a/examples/declarative/places/content/components/IconButton.qml b/examples/declarative/common/QtLocation/examples/components/IconButton.qml
index e1842d91..e1842d91 100644
--- a/examples/declarative/places/content/components/IconButton.qml
+++ b/examples/declarative/common/QtLocation/examples/components/IconButton.qml
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/Menu.qml b/examples/declarative/common/QtLocation/examples/components/Menu.qml
index ef1634f7..ef1634f7 100644
--- a/examples/declarative/mapviewer/mapviewer/content/components/Menu.qml
+++ b/examples/declarative/common/QtLocation/examples/components/Menu.qml
diff --git a/examples/declarative/places/content/components/Optionbutton.qml b/examples/declarative/common/QtLocation/examples/components/Optionbutton.qml
index 8bf3a36e..827f6dda 100644
--- a/examples/declarative/places/content/components/Optionbutton.qml
+++ b/examples/declarative/common/QtLocation/examples/components/Optionbutton.qml
@@ -51,7 +51,7 @@ Item {
spacing: 3
anchors.fill: parent
Image {
- source: optionbutton.selected ? "../resources/option_button_selected.png" : "../resources/option_button.png"
+ source: optionbutton.selected ? "../../../resources/option_button_selected.png" : "../../../resources/option_button.png"
}
Text {
id: optionbuttonText
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/Slider.qml b/examples/declarative/common/QtLocation/examples/components/Slider.qml
index 4ded9f5b..4ded9f5b 100644
--- a/examples/declarative/mapviewer/mapviewer/content/components/Slider.qml
+++ b/examples/declarative/common/QtLocation/examples/components/Slider.qml
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/TextWithLabel.qml b/examples/declarative/common/QtLocation/examples/components/TextWithLabel.qml
index 03cdb28a..03cdb28a 100644
--- a/examples/declarative/mapviewer/mapviewer/content/components/TextWithLabel.qml
+++ b/examples/declarative/common/QtLocation/examples/components/TextWithLabel.qml
diff --git a/examples/declarative/places/content/components/TitleBar.qml b/examples/declarative/common/QtLocation/examples/components/TitleBar.qml
index 280b1057..2bf0fceb 100644
--- a/examples/declarative/places/content/components/TitleBar.qml
+++ b/examples/declarative/common/QtLocation/examples/components/TitleBar.qml
@@ -48,13 +48,13 @@ Item {
property alias font: titleText.font
signal clicked
- BorderImage { source: "../resources/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+ BorderImage { source: "../../../resources/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
Image {
id: quitButton
anchors.right: parent.right; anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
- source: "../resources/quit.png"
+ source: "../../../resources/quit.png"
MouseArea {
id: mouseRegion
hoverEnabled: true
@@ -76,12 +76,12 @@ Item {
State {
name: "Pressed"
when: mouseRegion.pressed
- PropertyChanges { target: quitButton; source: "../resources/quit_pressed.png" }
+ PropertyChanges { target: quitButton; source: "../../../resources/quit_pressed.png" }
},
State {
name: "Hover"
when: mouseRegion.containsMouse
- PropertyChanges { target: quitButton; source: "../resources/quit_hovered.png" }
+ PropertyChanges { target: quitButton; source: "../../../resources/quit_hovered.png" }
}
]
}
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/style/ButtonStyle.qml b/examples/declarative/common/QtLocation/examples/components/style/ButtonStyle.qml
index aa73ef95..9f39bc96 100644
--- a/examples/declarative/mapviewer/mapviewer/content/components/style/ButtonStyle.qml
+++ b/examples/declarative/common/QtLocation/examples/components/style/ButtonStyle.qml
@@ -41,9 +41,9 @@ import QtQuick 2.0
QtObject {
id: buttonStyle
- property string background: "../resources/button.sci"
- property string pressedBackground: "../resources/button_pressed.png"
- property string disabledBackground: "../resources/button_hovered.png"
+ property string background: "../../../resources/button.sci"
+ property string pressedBackground: "../../../resources/button_pressed.png"
+ property string disabledBackground: "../../../resources/button_hovered.png"
property int heightAdjustment: 0
property int yAdjustment: 0
}
diff --git a/examples/declarative/places/content/components/style/HMenuItemStyle.qml b/examples/declarative/common/QtLocation/examples/components/style/HMenuItemStyle.qml
index 7dca7b2f..5732fb86 100644
--- a/examples/declarative/places/content/components/style/HMenuItemStyle.qml
+++ b/examples/declarative/common/QtLocation/examples/components/style/HMenuItemStyle.qml
@@ -37,12 +37,13 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
import QtQuick 2.0
ButtonStyle {
- background: "../resources/hmenuItem.sci"
- pressedBackground: "../resources/hmenuItem_pressed.png"
- disabledBackground: "../resources/hmenuItem_hovered.png"
+ background: "../../../resources/hmenuItem.sci"
+ pressedBackground: "../../../resources/hmenuItem_pressed.png"
+ disabledBackground: "../../../resources/hmenuItem_hovered.png"
heightAdjustment: 14
yAdjustment: -7
}
diff --git a/examples/declarative/places/content/components/style/VMenuItemStyle.qml b/examples/declarative/common/QtLocation/examples/components/style/VMenuItemStyle.qml
index f88af099..e30c0af6 100644
--- a/examples/declarative/places/content/components/style/VMenuItemStyle.qml
+++ b/examples/declarative/common/QtLocation/examples/components/style/VMenuItemStyle.qml
@@ -40,5 +40,5 @@
import QtQuick 2.0
HMenuItemStyle {
- background: "../resources/vmenuItem.sci"
+ background: "../../../resources/vmenuItem.sci"
}
diff --git a/examples/declarative/mapviewer/mapviewer/content/dialogs/Dialog.qml b/examples/declarative/common/QtLocation/examples/dialogs/Dialog.qml
index 3a19c18f..3a19c18f 100644
--- a/examples/declarative/mapviewer/mapviewer/content/dialogs/Dialog.qml
+++ b/examples/declarative/common/QtLocation/examples/dialogs/Dialog.qml
diff --git a/examples/declarative/common/QtLocation/examples/qmldir b/examples/declarative/common/QtLocation/examples/qmldir
new file mode 100644
index 00000000..c0682af2
--- /dev/null
+++ b/examples/declarative/common/QtLocation/examples/qmldir
@@ -0,0 +1,11 @@
+BusyIndicator 5.0 components/BusyIndicator.qml
+Button 5.0 components/Button.qml
+Checkbox 5.0 components/Checkbox.qml
+Fader 5.0 components/Fader.qml
+IconButton 5.0 components/IconButton.qml
+Menu 5.0 components/Menu.qml
+Optionbutton 5.0 components/Optionbutton.qml
+Slider 5.0 components/Slider.qml
+TextWithLabel 5.0 components/TextWithLabel.qml
+TitleBar 5.0 components/TitleBar.qml
+Dialog 5.0 dialogs/Dialog.qml
diff --git a/examples/declarative/common/common.pri b/examples/declarative/common/common.pri
new file mode 100644
index 00000000..3e460256
--- /dev/null
+++ b/examples/declarative/common/common.pri
@@ -0,0 +1,31 @@
+
+QML_IMPORT_PATH += $$PWD
+
+RESOURCES += \
+ $$PWD/common.qrc
+
+qmlcomponents.files += \
+ $$PWD/QtLocation/examples/components/TextWithLabel.qml \
+ $$PWD/QtLocation/examples/components/Button.qml \
+ $$PWD/QtLocation/examples/components/Checkbox.qml \
+ $$PWD/QtLocation/examples/components/Fader.qml \
+ $$PWD/QtLocation/examples/components/Optionbutton.qml \
+ $$PWD/QtLocation/examples/components/Slider.qml \
+ $$PWD/QtLocation/examples/components/TitleBar.qml \
+ $$PWD/QtLocation/examples/components/ButtonRow.qml \
+ $$PWD/QtLocation/examples/components/Menu.qml \
+ $$PWD/QtLocation/examples/components/IconButton.qml \
+ $$PWD/QtLocation/examples/components/BusyIndicator.qml
+OTHER_FILES += $$qmlcomponents.files
+
+qmlcomponentsstyle.files += \
+ $$PWD/QtLocation/examples/components/style/Style.qml \
+ $$PWD/QtLocation/examples/components/style/ButtonStyle.qml \
+ $$PWD/QtLocation/examples/components/style/HMenuItemStyle.qml \
+ $$PWD/QtLocation/examples/components/style/VMenuItemStyle.qml
+OTHER_FILES += $$qmlcomponentsstyle.files
+
+qmldialogs.files += \
+ $$PWD/QtLocation/examples/dialogs/Dialog.qml
+OTHER_FILES += $$qmldialogs.files
+
diff --git a/examples/declarative/common/common.qrc b/examples/declarative/common/common.qrc
new file mode 100644
index 00000000..40db1b14
--- /dev/null
+++ b/examples/declarative/common/common.qrc
@@ -0,0 +1,70 @@
+<RCC>
+ <qresource prefix="/">
+ <file>QtLocation/examples/qmldir</file>
+ <file>QtLocation/examples/components/style/ButtonStyle.qml</file>
+ <file>QtLocation/examples/components/style/HMenuItemStyle.qml</file>
+ <file>QtLocation/examples/components/style/VMenuItemStyle.qml</file>
+ <file>QtLocation/examples/components/BusyIndicator.qml</file>
+ <file>QtLocation/examples/components/Button.qml</file>
+ <file>QtLocation/examples/components/Checkbox.qml</file>
+ <file>QtLocation/examples/components/Fader.qml</file>
+ <file>QtLocation/examples/components/IconButton.qml</file>
+ <file>QtLocation/examples/components/Menu.qml</file>
+ <file>QtLocation/examples/components/Optionbutton.qml</file>
+ <file>QtLocation/examples/components/Slider.qml</file>
+ <file>QtLocation/examples/components/TextWithLabel.qml</file>
+ <file>QtLocation/examples/components/TitleBar.qml</file>
+ <file>QtLocation/examples/dialogs/Dialog.qml</file>
+ <file>resources/busy.png</file>
+ <file>resources/button_hovered.png</file>
+ <file>resources/button_pressed.png</file>
+ <file>resources/button.png</file>
+ <file>resources/button.sci</file>
+ <file>resources/catch.png</file>
+ <file>resources/categories_hovered.png</file>
+ <file>resources/categories_pressed.png</file>
+ <file>resources/categories.png</file>
+ <file>resources/checkbox_selected.png</file>
+ <file>resources/checkbox.png</file>
+ <file>resources/cross_hovered.png</file>
+ <file>resources/cross_pressed.png</file>
+ <file>resources/cross.png</file>
+ <file>resources/hmenuItem_hovered.png</file>
+ <file>resources/hmenuItem_pressed.png</file>
+ <file>resources/hmenuItem.png</file>
+ <file>resources/hmenuItem.sci</file>
+ <file>resources/left_hovered.png</file>
+ <file>resources/left_pressed.png</file>
+ <file>resources/left.png</file>
+ <file>resources/marker_hovered.png</file>
+ <file>resources/marker_selected.png</file>
+ <file>resources/marker.png</file>
+ <file>resources/menuItem_hovered.png</file>
+ <file>resources/menuItem_pressed.png</file>
+ <file>resources/menuItem.png</file>
+ <file>resources/menuItem.sci</file>
+ <file>resources/node_selected.png</file>
+ <file>resources/node.png</file>
+ <file>resources/option_button_selected.png</file>
+ <file>resources/option_button.png</file>
+ <file>resources/pencil_hovered.png</file>
+ <file>resources/pencil_pressed.png</file>
+ <file>resources/pencil.png</file>
+ <file>resources/quit_hovered.png</file>
+ <file>resources/quit_pressed.png</file>
+ <file>resources/quit.png</file>
+ <file>resources/right_hovered.png</file>
+ <file>resources/right_pressed.png</file>
+ <file>resources/right.png</file>
+ <file>resources/scale_end.png</file>
+ <file>resources/scale.png</file>
+ <file>resources/search_hovered.png</file>
+ <file>resources/search_pressed.png</file>
+ <file>resources/search.png</file>
+ <file>resources/star.png</file>
+ <file>resources/titlebar.png</file>
+ <file>resources/titlebar.sci</file>
+ <file>resources/vmenuItem.png</file>
+ <file>resources/vmenuItem.sci</file>
+ </qresource>
+</RCC>
diff --git a/examples/declarative/places/content/resources/busy.png b/examples/declarative/common/resources/busy.png
index 1b1ae236..1b1ae236 100755
--- a/examples/declarative/places/content/resources/busy.png
+++ b/examples/declarative/common/resources/busy.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/button.png b/examples/declarative/common/resources/button.png
index 18d9a84d..18d9a84d 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/button.png
+++ b/examples/declarative/common/resources/button.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/button.sci b/examples/declarative/common/resources/button.sci
index a34a58b6..a34a58b6 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/button.sci
+++ b/examples/declarative/common/resources/button.sci
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/button_hovered.png b/examples/declarative/common/resources/button_hovered.png
index 0f228f83..0f228f83 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/button_hovered.png
+++ b/examples/declarative/common/resources/button_hovered.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/button_pressed.png b/examples/declarative/common/resources/button_pressed.png
index 0a91912d..0a91912d 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/button_pressed.png
+++ b/examples/declarative/common/resources/button_pressed.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/catch.png b/examples/declarative/common/resources/catch.png
index cbf97c11..cbf97c11 100644
--- a/examples/declarative/places/content/resources/catch.png
+++ b/examples/declarative/common/resources/catch.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/categories.png b/examples/declarative/common/resources/categories.png
index 5dbf2fae..5dbf2fae 100644
--- a/examples/declarative/places/content/resources/categories.png
+++ b/examples/declarative/common/resources/categories.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/categories_hovered.png b/examples/declarative/common/resources/categories_hovered.png
index b2405927..b2405927 100644
--- a/examples/declarative/places/content/resources/categories_hovered.png
+++ b/examples/declarative/common/resources/categories_hovered.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/categories_pressed.png b/examples/declarative/common/resources/categories_pressed.png
index 375fbe38..375fbe38 100644
--- a/examples/declarative/places/content/resources/categories_pressed.png
+++ b/examples/declarative/common/resources/categories_pressed.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/checkbox.png b/examples/declarative/common/resources/checkbox.png
index b9aab540..b9aab540 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/checkbox.png
+++ b/examples/declarative/common/resources/checkbox.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/checkbox_selected.png b/examples/declarative/common/resources/checkbox_selected.png
index 28af3751..28af3751 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/checkbox_selected.png
+++ b/examples/declarative/common/resources/checkbox_selected.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/cross.png b/examples/declarative/common/resources/cross.png
index 835cd91a..835cd91a 100644
--- a/examples/declarative/places/content/resources/cross.png
+++ b/examples/declarative/common/resources/cross.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/cross_hovered.png b/examples/declarative/common/resources/cross_hovered.png
index fdd23d79..fdd23d79 100644
--- a/examples/declarative/places/content/resources/cross_hovered.png
+++ b/examples/declarative/common/resources/cross_hovered.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/cross_pressed.png b/examples/declarative/common/resources/cross_pressed.png
index c7a692af..c7a692af 100644
--- a/examples/declarative/places/content/resources/cross_pressed.png
+++ b/examples/declarative/common/resources/cross_pressed.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem.png b/examples/declarative/common/resources/hmenuItem.png
index 42f565a2..42f565a2 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem.png
+++ b/examples/declarative/common/resources/hmenuItem.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem.sci b/examples/declarative/common/resources/hmenuItem.sci
index 477ada8e..477ada8e 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem.sci
+++ b/examples/declarative/common/resources/hmenuItem.sci
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem_hovered.png b/examples/declarative/common/resources/hmenuItem_hovered.png
index 6a9a3a98..6a9a3a98 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem_hovered.png
+++ b/examples/declarative/common/resources/hmenuItem_hovered.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem_pressed.png b/examples/declarative/common/resources/hmenuItem_pressed.png
index f779baf6..f779baf6 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/hmenuItem_pressed.png
+++ b/examples/declarative/common/resources/hmenuItem_pressed.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/left.png b/examples/declarative/common/resources/left.png
index c5eb9739..c5eb9739 100644
--- a/examples/declarative/places/content/resources/left.png
+++ b/examples/declarative/common/resources/left.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/left_hovered.png b/examples/declarative/common/resources/left_hovered.png
index 374aae2d..374aae2d 100644
--- a/examples/declarative/places/content/resources/left_hovered.png
+++ b/examples/declarative/common/resources/left_hovered.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/left_pressed.png b/examples/declarative/common/resources/left_pressed.png
index 28cda79d..28cda79d 100644
--- a/examples/declarative/places/content/resources/left_pressed.png
+++ b/examples/declarative/common/resources/left_pressed.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/marker.png b/examples/declarative/common/resources/marker.png
index 86ec960e..86ec960e 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/marker.png
+++ b/examples/declarative/common/resources/marker.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/marker_hovered.png b/examples/declarative/common/resources/marker_hovered.png
index 902ae591..902ae591 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/marker_hovered.png
+++ b/examples/declarative/common/resources/marker_hovered.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/marker_selected.png b/examples/declarative/common/resources/marker_selected.png
index f4bf8921..f4bf8921 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/marker_selected.png
+++ b/examples/declarative/common/resources/marker_selected.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem.png b/examples/declarative/common/resources/menuItem.png
index 51c90082..51c90082 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem.png
+++ b/examples/declarative/common/resources/menuItem.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem.sci b/examples/declarative/common/resources/menuItem.sci
index 0418d94c..0418d94c 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem.sci
+++ b/examples/declarative/common/resources/menuItem.sci
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem_hovered.png b/examples/declarative/common/resources/menuItem_hovered.png
index 16c1a94e..16c1a94e 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem_hovered.png
+++ b/examples/declarative/common/resources/menuItem_hovered.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem_pressed.png b/examples/declarative/common/resources/menuItem_pressed.png
index 3ab14f1f..3ab14f1f 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/menuItem_pressed.png
+++ b/examples/declarative/common/resources/menuItem_pressed.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/node.png b/examples/declarative/common/resources/node.png
index 46e85672..46e85672 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/node.png
+++ b/examples/declarative/common/resources/node.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/node_selected.png b/examples/declarative/common/resources/node_selected.png
index a967f3cf..a967f3cf 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/node_selected.png
+++ b/examples/declarative/common/resources/node_selected.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/option_button.png b/examples/declarative/common/resources/option_button.png
index b6c1a777..b6c1a777 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/option_button.png
+++ b/examples/declarative/common/resources/option_button.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/option_button_selected.png b/examples/declarative/common/resources/option_button_selected.png
index 129e21c0..129e21c0 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/option_button_selected.png
+++ b/examples/declarative/common/resources/option_button_selected.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/pencil.png b/examples/declarative/common/resources/pencil.png
index a52cff02..a52cff02 100644
--- a/examples/declarative/places/content/resources/pencil.png
+++ b/examples/declarative/common/resources/pencil.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/pencil_hovered.png b/examples/declarative/common/resources/pencil_hovered.png
index 55053fc1..55053fc1 100644
--- a/examples/declarative/places/content/resources/pencil_hovered.png
+++ b/examples/declarative/common/resources/pencil_hovered.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/pencil_pressed.png b/examples/declarative/common/resources/pencil_pressed.png
index f30f3703..f30f3703 100644
--- a/examples/declarative/places/content/resources/pencil_pressed.png
+++ b/examples/declarative/common/resources/pencil_pressed.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/quit.png b/examples/declarative/common/resources/quit.png
index 9a5cb8a2..9a5cb8a2 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/quit.png
+++ b/examples/declarative/common/resources/quit.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/quit_hovered.png b/examples/declarative/common/resources/quit_hovered.png
index bea8f251..bea8f251 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/quit_hovered.png
+++ b/examples/declarative/common/resources/quit_hovered.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/quit_pressed.png b/examples/declarative/common/resources/quit_pressed.png
index e69aa111..e69aa111 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/quit_pressed.png
+++ b/examples/declarative/common/resources/quit_pressed.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/right.png b/examples/declarative/common/resources/right.png
index 51773bae..51773bae 100644
--- a/examples/declarative/places/content/resources/right.png
+++ b/examples/declarative/common/resources/right.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/right_hovered.png b/examples/declarative/common/resources/right_hovered.png
index 12479ec4..12479ec4 100644
--- a/examples/declarative/places/content/resources/right_hovered.png
+++ b/examples/declarative/common/resources/right_hovered.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/right_pressed.png b/examples/declarative/common/resources/right_pressed.png
index 07d8c003..07d8c003 100644
--- a/examples/declarative/places/content/resources/right_pressed.png
+++ b/examples/declarative/common/resources/right_pressed.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/scale.png b/examples/declarative/common/resources/scale.png
index 6e59ff08..6e59ff08 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/scale.png
+++ b/examples/declarative/common/resources/scale.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/scale_end.png b/examples/declarative/common/resources/scale_end.png
index bb69aad7..bb69aad7 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/scale_end.png
+++ b/examples/declarative/common/resources/scale_end.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/search.png b/examples/declarative/common/resources/search.png
index 43b6a88c..43b6a88c 100644
--- a/examples/declarative/places/content/resources/search.png
+++ b/examples/declarative/common/resources/search.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/search_hovered.png b/examples/declarative/common/resources/search_hovered.png
index e1bbc5a3..e1bbc5a3 100644
--- a/examples/declarative/places/content/resources/search_hovered.png
+++ b/examples/declarative/common/resources/search_hovered.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/search_pressed.png b/examples/declarative/common/resources/search_pressed.png
index 31bd3823..31bd3823 100644
--- a/examples/declarative/places/content/resources/search_pressed.png
+++ b/examples/declarative/common/resources/search_pressed.png
Binary files differ
diff --git a/examples/declarative/places/content/resources/star.png b/examples/declarative/common/resources/star.png
index 93451147..93451147 100644
--- a/examples/declarative/places/content/resources/star.png
+++ b/examples/declarative/common/resources/star.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/titlebar.png b/examples/declarative/common/resources/titlebar.png
index c4689844..c4689844 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/titlebar.png
+++ b/examples/declarative/common/resources/titlebar.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/titlebar.sci b/examples/declarative/common/resources/titlebar.sci
index 0418d94c..0418d94c 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/titlebar.sci
+++ b/examples/declarative/common/resources/titlebar.sci
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/vmenuItem.png b/examples/declarative/common/resources/vmenuItem.png
index 5d60f854..5d60f854 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/vmenuItem.png
+++ b/examples/declarative/common/resources/vmenuItem.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/vmenuItem.sci b/examples/declarative/common/resources/vmenuItem.sci
index 909567db..909567db 100644
--- a/examples/declarative/mapviewer/mapviewer/content/resources/vmenuItem.sci
+++ b/examples/declarative/common/resources/vmenuItem.sci
diff --git a/examples/declarative/mapviewer/mapviewer/content/dialogs/Message.qml b/examples/declarative/mapviewer/content/dialogs/Message.qml
index 8932171d..9614b777 100644
--- a/examples/declarative/mapviewer/mapviewer/content/dialogs/Message.qml
+++ b/examples/declarative/mapviewer/content/dialogs/Message.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import "../components"
+import QtLocation.examples 5.0
Item {
id: dialog
diff --git a/examples/declarative/mapviewer/mapviewer/content/dialogs/RouteDialog.qml b/examples/declarative/mapviewer/content/dialogs/RouteDialog.qml
index 02266269..81b346a8 100644
--- a/examples/declarative/mapviewer/mapviewer/content/dialogs/RouteDialog.qml
+++ b/examples/declarative/mapviewer/content/dialogs/RouteDialog.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
Item {
id: dialog
@@ -123,7 +123,7 @@ Item {
Image {
id: optionButtonCoord
anchors.verticalCenter:parent.verticalCenter
- source: coord.enabled ? "../resources/option_button_selected.png" : "../resources/option_button.png"
+ source: coord.enabled ? "../../../resources/option_button_selected.png" : "../../../resources/option_button.png"
MouseArea {
anchors.fill: parent
onClicked: { options.state = "" }
@@ -236,7 +236,7 @@ Item {
Image {
id: optionButtonAddress
- source: address.enabled ? "../resources/option_button_selected.png" : "../resources/option_button.png"
+ source: address.enabled ? "../../../resources/option_button_selected.png" : "../../../resources/option_button.png"
anchors.verticalCenter: parent.verticalCenter
MouseArea {
anchors.fill: parent
diff --git a/examples/declarative/mapviewer/mapviewer/content/map/CircleItem.qml b/examples/declarative/mapviewer/content/map/CircleItem.qml
index c69bc2ef..c69bc2ef 100644
--- a/examples/declarative/mapviewer/mapviewer/content/map/CircleItem.qml
+++ b/examples/declarative/mapviewer/content/map/CircleItem.qml
diff --git a/examples/declarative/mapviewer/mapviewer/content/map/MapComponent.qml b/examples/declarative/mapviewer/content/map/MapComponent.qml
index e325815a..ef24d668 100644
--- a/examples/declarative/mapviewer/mapviewer/content/map/MapComponent.qml
+++ b/examples/declarative/mapviewer/content/map/MapComponent.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
Map {
id: map
@@ -446,19 +446,19 @@ Map {
}
Image {
id: scaleImageLeft
- source: "../resources/scale_end.png"
+ source: "../../resources/scale_end.png"
anchors.bottom: parent.bottom
anchors.left: parent.left
}
Image {
id: scaleImage
- source: "../resources/scale.png"
+ source: "../../resources/scale.png"
anchors.bottom: parent.bottom
anchors.left: scaleImageLeft.right
}
Image {
id: scaleImageRight
- source: "../resources/scale_end.png"
+ source: "../../resources/scale_end.png"
anchors.bottom: parent.bottom
anchors.left: scaleImage.right
}
diff --git a/examples/declarative/mapviewer/mapviewer/content/map/Marker.qml b/examples/declarative/mapviewer/content/map/Marker.qml
index fe46f350..1b4dcd77 100644
--- a/examples/declarative/mapviewer/mapviewer/content/map/Marker.qml
+++ b/examples/declarative/mapviewer/content/map/Marker.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0;
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
MapQuickItem { //to be used inside MapComponent only
id: marker
@@ -53,7 +53,7 @@ MapQuickItem { //to be used inside MapComponent only
sourceItem: Image {
id: image
- source: markerMouseArea.containsMouse ? (markerMouseArea.pressed ? "../resources/marker_selected.png" :"../resources/marker_hovered.png") : "../resources/marker.png"
+ source: markerMouseArea.containsMouse ? (markerMouseArea.pressed ? "../../resources/marker_selected.png" :"../../resources/marker_hovered.png") : "../../resources/marker.png"
MapMouseArea {
id: markerMouseArea
property int pressX : -1
diff --git a/examples/declarative/mapviewer/mapviewer/content/map/PolygonItem.qml b/examples/declarative/mapviewer/content/map/PolygonItem.qml
index 927bf337..927bf337 100644
--- a/examples/declarative/mapviewer/mapviewer/content/map/PolygonItem.qml
+++ b/examples/declarative/mapviewer/content/map/PolygonItem.qml
diff --git a/examples/declarative/mapviewer/mapviewer/content/map/PolylineItem.qml b/examples/declarative/mapviewer/content/map/PolylineItem.qml
index b0181887..b0181887 100644
--- a/examples/declarative/mapviewer/mapviewer/content/map/PolylineItem.qml
+++ b/examples/declarative/mapviewer/content/map/PolylineItem.qml
diff --git a/examples/declarative/mapviewer/mapviewer/content/map/RectangleItem.qml b/examples/declarative/mapviewer/content/map/RectangleItem.qml
index 72629bb6..72629bb6 100644
--- a/examples/declarative/mapviewer/mapviewer/content/map/RectangleItem.qml
+++ b/examples/declarative/mapviewer/content/map/RectangleItem.qml
diff --git a/examples/declarative/mapviewer/mapviewer/icon.png b/examples/declarative/mapviewer/icon.png
index 0954baf0..0954baf0 100755..100644
--- a/examples/declarative/mapviewer/mapviewer/icon.png
+++ b/examples/declarative/mapviewer/icon.png
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/info.json b/examples/declarative/mapviewer/info.json
index 80facef9..80facef9 100644
--- a/examples/declarative/mapviewer/mapviewer/info.json
+++ b/examples/declarative/mapviewer/info.json
diff --git a/examples/declarative/mapviewer/mapviewer.pri b/examples/declarative/mapviewer/mapviewer.pri
new file mode 100644
index 00000000..fce84856
--- /dev/null
+++ b/examples/declarative/mapviewer/mapviewer.pri
@@ -0,0 +1,20 @@
+
+qmlcontent.files += \
+ mapviewer.qml
+OTHER_FILES += $$qmlcontent.files
+
+qmlcontentmap.files += \
+ content/map/MapComponent.qml \
+ content/map/Marker.qml \
+ content/map/CircleItem.qml \
+ content/map/RectangleItem.qml \
+ content/map/PolylineItem.qml \
+ content/map/PolygonItem.qml
+OTHER_FILES += $$qmlcontentmap.files
+
+qmlcontentdialogs.files += \
+ content/dialogs/Message.qml \
+ content/dialogs/RouteDialog.qml
+OTHER_FILES += $$qmlcontentdialogs.files
+
+include(../common/common.pri)
diff --git a/examples/declarative/mapviewer/mapviewer.pro b/examples/declarative/mapviewer/mapviewer.pro
index 726c2b35..5dd064dd 100644
--- a/examples/declarative/mapviewer/mapviewer.pro
+++ b/examples/declarative/mapviewer/mapviewer.pro
@@ -1,3 +1,6 @@
TEMPLATE = subdirs
-SUBDIRS += mapviewerwrapper
+mapviewer.file = qml.pro
+mapviewer.CONFIG += no_default_install no_default_target
+
+SUBDIRS += mapviewerwrapper.pro mapviewer
diff --git a/examples/declarative/mapviewer/mapviewer/mapviewer.qml b/examples/declarative/mapviewer/mapviewer.qml
index a91fcc5f..ab0a6642 100644
--- a/examples/declarative/mapviewer/mapviewer/mapviewer.qml
+++ b/examples/declarative/mapviewer/mapviewer.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "content/components"
+import QtLocation.examples 5.0
import "content/map"
import "content/dialogs"
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/Button.qml b/examples/declarative/mapviewer/mapviewer/content/components/Button.qml
deleted file mode 100644
index 985d50df..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/components/Button.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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 "style"
-
-Item {
- id: container
-
- signal clicked
-
- property alias text: buttonText.text
- property alias color: buttonText.color
- property alias paintedWidth: buttonText.paintedWidth
- property alias paintedHeight: buttonText.paintedHeight
- property bool checked: false
- property ButtonStyle style: ButtonStyle{}
-
- function disable() {
- container.state = "Disabled";
- }
-
- function enable() {
- container.state = "";
- }
-
- BorderImage {
- id: buttonImage
- source: style.background
- width: parent.width; height: parent.height + style.heightAdjustment; y: style.yAdjustment
- }
-
- MouseArea {
- id: mouseRegion
- anchors.fill: buttonImage
- hoverEnabled: true
- onClicked: { container.clicked() }
- }
- Text {
- id: buttonText
- color: checked ? "lawngreen" : "white"
- anchors.centerIn: buttonImage; font.bold: true; font.pixelSize: 14
- style: Text.Raised; styleColor: "darkblue"
- anchors.baseline: parent.bottom
- anchors.baselineOffset: -6
- }
-
- states: [
- State {
- name: "Pressed"
- when: mouseRegion.pressed == true
- PropertyChanges { target: buttonImage; source: style.pressedBackground }
- PropertyChanges { target: buttonText; style: Text.Sunken }
- },
- State {
- name: "Hovered"
- when: mouseRegion.containsMouse
- PropertyChanges{ target: buttonImage; source: style.disabledBackground }
- },
- State {
- name: "Disabled"
- PropertyChanges{ target: buttonText; color: "silver" }
- PropertyChanges{ target: mouseRegion; enabled: false }
- }
- ]
-}
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/Checkbox.qml b/examples/declarative/mapviewer/mapviewer/content/components/Checkbox.qml
deleted file mode 100644
index a7e8d883..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/components/Checkbox.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Item {
- id: checkbox
- property bool selected: false
- property alias text: checkboxText.text
- height: checkboxText.height
-
- Row {
- id: checkboxRow
- spacing: 3
- anchors.fill: parent
- Image {
- source: checkbox.selected ? "../resources/checkbox_selected.png" : "../resources/checkbox.png"
- }
- Text {
- id: checkboxText
- font.pixelSize: 14
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: { checkbox.selected = !checkbox.selected }
- }
-}
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/Optionbutton.qml b/examples/declarative/mapviewer/mapviewer/content/components/Optionbutton.qml
deleted file mode 100644
index 8bf3a36e..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/components/Optionbutton.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Item {
- id: optionbutton
- property bool selected: false
- property alias text: optionbuttonText.text
- height: optionbuttonText.height
- signal clicked
-
- Row {
- id: optionbuttonRow
- spacing: 3
- anchors.fill: parent
- Image {
- source: optionbutton.selected ? "../resources/option_button_selected.png" : "../resources/option_button.png"
- }
- Text {
- id: optionbuttonText
- font.pixelSize: 14
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- optionbutton.selected = true
- optionbutton.clicked()
- }
- }
-}
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/TitleBar.qml b/examples/declarative/mapviewer/mapviewer/content/components/TitleBar.qml
deleted file mode 100644
index 280b1057..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/components/TitleBar.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Item {
- id: titleBar
-
- property alias text:titleText.text
- property alias hoverEnabled: mouseRegion.hoverEnabled
- property alias font: titleText.font
- signal clicked
-
- BorderImage { source: "../resources/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
-
- Image {
- id: quitButton
- anchors.right: parent.right; anchors.rightMargin: 10
- anchors.verticalCenter: parent.verticalCenter
- source: "../resources/quit.png"
- MouseArea {
- id: mouseRegion
- hoverEnabled: true
- anchors.fill: parent
- onClicked: { titleBar.clicked(); }
- }
- }
-
- Text {
- id: titleText
- anchors {
- left: parent.left; leftMargin: 10; verticalCenter: parent.verticalCenter
- }
- elide: Text.ElideLeft
- font.bold: true; font.pixelSize: 14; color: "white"; style: Text.Raised; styleColor: "dimgrey"
- }
-
- states: [
- State {
- name: "Pressed"
- when: mouseRegion.pressed
- PropertyChanges { target: quitButton; source: "../resources/quit_pressed.png" }
- },
- State {
- name: "Hover"
- when: mouseRegion.containsMouse
- PropertyChanges { target: quitButton; source: "../resources/quit_hovered.png" }
- }
- ]
-}
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/style/HMenuItemStyle.qml b/examples/declarative/mapviewer/mapviewer/content/components/style/HMenuItemStyle.qml
deleted file mode 100644
index 7dca7b2f..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/components/style/HMenuItemStyle.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-ButtonStyle {
- background: "../resources/hmenuItem.sci"
- pressedBackground: "../resources/hmenuItem_pressed.png"
- disabledBackground: "../resources/hmenuItem_hovered.png"
- heightAdjustment: 14
- yAdjustment: -7
-}
diff --git a/examples/declarative/mapviewer/mapviewer/content/components/style/VMenuItemStyle.qml b/examples/declarative/mapviewer/mapviewer/content/components/style/VMenuItemStyle.qml
deleted file mode 100644
index f88af099..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/components/style/VMenuItemStyle.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-HMenuItemStyle {
- background: "../resources/vmenuItem.sci"
-}
diff --git a/examples/declarative/mapviewer/mapviewer/content/resources/catch.png b/examples/declarative/mapviewer/mapviewer/content/resources/catch.png
deleted file mode 100644
index cce322cb..00000000
--- a/examples/declarative/mapviewer/mapviewer/content/resources/catch.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/mapviewer/mapviewer/mapviewer.pro b/examples/declarative/mapviewer/mapviewer/mapviewer.pro
deleted file mode 100644
index 6dc685b9..00000000
--- a/examples/declarative/mapviewer/mapviewer/mapviewer.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS = qml.pro
diff --git a/examples/declarative/mapviewer/mapviewer/qml.pro b/examples/declarative/mapviewer/mapviewer/qml.pro
deleted file mode 100644
index fe4d7da8..00000000
--- a/examples/declarative/mapviewer/mapviewer/qml.pro
+++ /dev/null
@@ -1,69 +0,0 @@
-TEMPLATE = aux
-
-files.files = info.json notions.json settings.json icon.png mapviewer.qml
-files.path = /opt/mt/applications/mt-qt5location-mapviewer
-
-components.path = $${files.path}/content/components
-components.files = \
- content/components/Button.qml \
- content/components/Checkbox.qml \
- content/components/Fader.qml \
- content/components/Menu.qml \
- content/components/Optionbutton.qml \
- content/components/Slider.qml \
- content/components/TextWithLabel.qml \
- content/components/TitleBar.qml \
- content/components/Optionbutton.qml
-
-style.path = $${files.path}/content/components/style
-style.files = \
- content/components/style/ButtonStyle.qml \
- content/components/style/HMenuItemStyle.qml \
- content/components/style/VMenuItemStyle.qml
-
-dialogs.path = $${files.path}/content/dialogs
-dialogs.files = \
- content/dialogs/Dialog.qml \
- content/dialogs/Message.qml \
- content/dialogs/RouteDialog.qml
-
-map.path = $${files.path}/content/map
-map.files = \
- content/map/MapComponent.qml \
- content/map/Marker.qml \
- content/map/CircleItem.qml \
- content/map/RectangleItem.qml \
- content/map/PolylineItem.qml \
- content/map/PolygonItem.qml
-
-resources.path = $${files.path}/content/resources
-resources.files = \
- content/resources/button_hovered.png \
- content/resources/button_pressed.png \
- content/resources/button.png \
- content/resources/button.sci \
- content/resources/catch.png \
- content/resources/checkbox_selected.png \
- content/resources/checkbox.png \
- content/resources/hmenuItem_hovered.png \
- content/resources/hmenuItem_pressed.png \
- content/resources/hmenuItem.png \
- content/resources/marker_hovered.png \
- content/resources/marker_selected.png \
- content/resources/marker.png \
- content/resources/node_selected.png \
- content/resources/node.png \
- content/resources/option_button_selected.png \
- content/resources/option_button.png \
- content/resources/quit_hovered.png \
- content/resources/quit_pressed.png \
- content/resources/quit.png \
- content/resources/scale.png \
- content/resources/scale_end.png \
- content/resources/titlebar.png \
- content/resources/titlebar.sci \
- content/resources/vmenuItem.png \
- content/resources/hmenuItem.sci \
- content/resources/vmenuItem.sci
-
-INSTALLS += files components style dialogs map resources
diff --git a/examples/declarative/mapviewer/mapviewerwrapper.pro b/examples/declarative/mapviewer/mapviewerwrapper.pro
new file mode 100644
index 00000000..c454ef8b
--- /dev/null
+++ b/examples/declarative/mapviewer/mapviewerwrapper.pro
@@ -0,0 +1,14 @@
+TARGET = qml_location_mapviewer
+TEMPLATE = app
+
+QT += declarative network
+SOURCES += qmlmapviewerwrapper.cpp
+
+RESOURCES += \
+ mapviewerwrapper.qrc
+
+include(mapviewer.pri)
+
+target.path = $$[QT_INSTALL_EXAMPLES]/qtlocation/declarative/mapviewer
+
+INSTALLS += target
diff --git a/examples/declarative/mapviewer/mapviewerwrapper.qrc b/examples/declarative/mapviewer/mapviewerwrapper.qrc
new file mode 100644
index 00000000..ae87cf56
--- /dev/null
+++ b/examples/declarative/mapviewer/mapviewerwrapper.qrc
@@ -0,0 +1,13 @@
+<RCC>
+ <qresource prefix="/">
+ <file>mapviewer.qml</file>
+ <file>content/map/MapComponent.qml</file>
+ <file>content/map/Marker.qml</file>
+ <file>content/map/PolylineItem.qml</file>
+ <file>content/map/RectangleItem.qml</file>
+ <file>content/map/CircleItem.qml</file>
+ <file>content/map/PolygonItem.qml</file>
+ <file>content/dialogs/Message.qml</file>
+ <file>content/dialogs/RouteDialog.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.pro b/examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.pro
deleted file mode 100644
index 9fb68deb..00000000
--- a/examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.pro
+++ /dev/null
@@ -1,35 +0,0 @@
-TARGET = qml_location_mapviewer
-TEMPLATE=app
-
-QT += declarative network
-SOURCES += qmlmapviewerwrapper.cpp
-
-RESOURCES += \
- mapviewerwrapper.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtlocation/declarative/mapviewer
-
-INSTALLS += target
-
-OTHER_FILES += \
- ../mapviewer/mapviewer.qml \
- ../mapviewer/content/dialogs/Dialog.qml \
- ../mapviewer/content/dialogs/Message.qml \
- ../mapviewer/content/dialogs/RouteDialog.qml \
- ../mapviewer/content/map/MapComponent.qml \
- ../mapviewer/content/map/Marker.qml \
- ../mapviewer/content/map/PolylineItem.qml \
- ../mapviewer/content/map/RectangleItem.qml \
- ../mapviewer/content/map/CircleItem.qml \
- ../mapviewer/content/map/PolygonItem.qml \
- ../mapviewer/content/components/TextWithLabel.qml \
- ../mapviewer/content/components/Button.qml \
- ../mapviewer/content/components/Checkbox.qml \
- ../mapviewer/content/components/Fader.qml \
- ../mapviewer/content/components/Optionbutton.qml \
- ../mapviewer/content/components/Slider.qml \
- ../mapviewer/content/components/TitleBar.qml \
- ../mapviewer/content/components/Menu.qml \
- ../mapviewer/content/components/style/ButtonStyle.qml \
- ../mapviewer/content/components/style/HMenuItemStyle.qml \
- ../mapviewer/content/components/style/VMenuItemStyle.qml
diff --git a/examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.qrc b/examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.qrc
deleted file mode 100644
index d1c0a427..00000000
--- a/examples/declarative/mapviewer/mapviewerwrapper/mapviewerwrapper.qrc
+++ /dev/null
@@ -1,62 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file alias="mapviewer.qml">../mapviewer/mapviewer.qml</file>
- </qresource>
- <qresource prefix="/content/components">
- <file alias="Button.qml">../mapviewer/content/components/Button.qml</file>
- <file alias="Checkbox.qml">../mapviewer/content/components/Checkbox.qml</file>
- <file alias="Fader.qml">../mapviewer/content/components/Fader.qml</file>
- <file alias="Optionbutton.qml">../mapviewer/content/components/Optionbutton.qml</file>
- <file alias="Slider.qml">../mapviewer/content/components/Slider.qml</file>
- <file alias="TextWithLabel.qml">../mapviewer/content/components/TextWithLabel.qml</file>
- <file alias="TitleBar.qml">../mapviewer/content/components/TitleBar.qml</file>
- <file alias="Menu.qml">../mapviewer/content/components/Menu.qml</file>
- </qresource>
- <qresource prefix="/content/components/style">
- <file alias="ButtonStyle.qml">../mapviewer/content/components/style/ButtonStyle.qml</file>
- <file alias="HMenuItemStyle.qml">../mapviewer/content/components/style/HMenuItemStyle.qml</file>
- <file alias="VMenuItemStyle.qml">../mapviewer/content/components/style/VMenuItemStyle.qml</file>
- </qresource>
- <qresource prefix="/content/dialogs">
- <file alias="Dialog.qml">../mapviewer/content/dialogs/Dialog.qml</file>
- <file alias="Message.qml">../mapviewer/content/dialogs/Message.qml</file>
- <file alias="RouteDialog.qml">../mapviewer/content/dialogs/RouteDialog.qml</file>
- </qresource>
- <qresource prefix="/content/map">
- <file alias="MapComponent.qml">../mapviewer/content/map/MapComponent.qml</file>
- <file alias="Marker.qml">../mapviewer/content/map/Marker.qml</file>
- <file alias="PolylineItem.qml">../mapviewer/content/map/PolylineItem.qml</file>
- <file alias="RectangleItem.qml">../mapviewer/content/map/RectangleItem.qml</file>
- <file alias="CircleItem.qml">../mapviewer/content/map/CircleItem.qml</file>
- <file alias="PolygonItem.qml">../mapviewer/content/map/PolygonItem.qml</file>
- </qresource>
- <qresource prefix="/content/resources">
- <file alias="button_hovered.png">../mapviewer/content/resources/button_hovered.png</file>
- <file alias="button_pressed.png">../mapviewer/content/resources/button_pressed.png</file>
- <file alias="button.png">../mapviewer/content/resources/button.png</file>
- <file alias="button.sci">../mapviewer/content/resources/button.sci</file>
- <file alias="catch.png">../mapviewer/content/resources/catch.png</file>
- <file alias="checkbox_selected.png">../mapviewer/content/resources/checkbox_selected.png</file>
- <file alias="checkbox.png">../mapviewer/content/resources/checkbox.png</file>
- <file alias="hmenuItem_hovered.png">../mapviewer/content/resources/hmenuItem_hovered.png</file>
- <file alias="hmenuItem_pressed.png">../mapviewer/content/resources/hmenuItem_pressed.png</file>
- <file alias="hmenuItem.png">../mapviewer/content/resources/hmenuItem.png</file>
- <file alias="marker_hovered.png">../mapviewer/content/resources/marker_hovered.png</file>
- <file alias="marker_selected.png">../mapviewer/content/resources/marker_selected.png</file>
- <file alias="marker.png">../mapviewer/content/resources/marker.png</file>
- <file alias="node_selected.png">../mapviewer/content/resources/node_selected.png</file>
- <file alias="node.png">../mapviewer/content/resources/node.png</file>
- <file alias="option_button_selected.png">../mapviewer/content/resources/option_button_selected.png</file>
- <file alias="option_button.png">../mapviewer/content/resources/option_button.png</file>
- <file alias="quit_hovered.png">../mapviewer/content/resources/quit_hovered.png</file>
- <file alias="quit_pressed.png">../mapviewer/content/resources/quit_pressed.png</file>
- <file alias="quit.png">../mapviewer/content/resources/quit.png</file>
- <file alias="scale.png">../mapviewer/content/resources/scale.png</file>
- <file alias="scale_end.png">../mapviewer/content/resources/scale_end.png</file>
- <file alias="titlebar.png">../mapviewer/content/resources/titlebar.png</file>
- <file alias="titlebar.sci">../mapviewer/content/resources/titlebar.sci</file>
- <file alias="vmenuItem.png">../mapviewer/content/resources/vmenuItem.png</file>
- <file alias="hmenuItem.sci">../mapviewer/content/resources/hmenuItem.sci</file>
- <file alias="vmenuItem.sci">../mapviewer/content/resources/vmenuItem.sci</file>
- </qresource>
-</RCC>
diff --git a/examples/declarative/mapviewer/mapviewer/notions.json b/examples/declarative/mapviewer/notions.json
index 95d05191..95d05191 100644
--- a/examples/declarative/mapviewer/mapviewer/notions.json
+++ b/examples/declarative/mapviewer/notions.json
diff --git a/examples/declarative/mapviewer/qml.pro b/examples/declarative/mapviewer/qml.pro
new file mode 100644
index 00000000..049d239d
--- /dev/null
+++ b/examples/declarative/mapviewer/qml.pro
@@ -0,0 +1,24 @@
+TEMPLATE = aux
+
+files.files = info.json notions.json settings.json icon.png
+files.path = /opt/mt/applications/mt-qt5location-mapviewer
+
+include(mapviewer.pri)
+
+qmlcontent.path = $$files.path
+qmlcontentdialogs.path = $$files.path/content/dialogs
+qmlcontentmap.path = $$files.path/content/map
+qmlcontentcomponents.path = $$files.path/content/components
+qmlcontentcomponentsstyle.path = $$files.path/content/components/style
+
+resources.files = content/resources/*
+resources.path = $$files.path/content/resources
+
+INSTALLS += \
+ files \
+ qmlcontent \
+ qmlcontentdialogs \
+ qmlcontentmap \
+ qmlcontentcomponents \
+ qmlcontentcomponentsstyle \
+ resources
diff --git a/examples/declarative/mapviewer/mapviewerwrapper/qmlmapviewerwrapper.cpp b/examples/declarative/mapviewer/qmlmapviewerwrapper.cpp
index 374eb6c9..5bb08a5e 100644
--- a/examples/declarative/mapviewer/mapviewerwrapper/qmlmapviewerwrapper.cpp
+++ b/examples/declarative/mapviewer/qmlmapviewerwrapper.cpp
@@ -97,6 +97,9 @@ int main(int argc, char *argv[])
const QString mainQmlApp = QLatin1String("qrc:///mapviewer.qml");
QQuickView view;
+
+ view.engine()->addImportPath(QLatin1String(":/"));
+
view.setSource(QUrl(mainQmlApp));
view.setResizeMode(QQuickView::SizeRootObjectToView);
diff --git a/examples/declarative/mapviewer/mapviewer/settings.json b/examples/declarative/mapviewer/settings.json
index 3b7db0b9..3b7db0b9 100644
--- a/examples/declarative/mapviewer/mapviewer/settings.json
+++ b/examples/declarative/mapviewer/settings.json
diff --git a/examples/declarative/places/content/components/Fader.qml b/examples/declarative/places/content/components/Fader.qml
deleted file mode 100644
index 2e0dd4bd..00000000
--- a/examples/declarative/places/content/components/Fader.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Rectangle {
- id: fader
- anchors.fill: parent
- opacity: 0.7
- color: "darkgrey"
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: true
- }
-
- Component.onCompleted: {
- var globalXY
- var root = parent
-
- if (root != null) {
- while (root.parent) root = root.parent
- width = root.width; height = root.height;
- globalXY = mapFromItem(root, root.x, root.y);
- } else {
- globalXY = mapFromItem(null, 0, 0);
- }
- x = globalXY.x;
- y = globalXY.y;
- }
-}
diff --git a/examples/declarative/places/content/components/Menu.qml b/examples/declarative/places/content/components/Menu.qml
deleted file mode 100644
index 60da64c5..00000000
--- a/examples/declarative/places/content/components/Menu.qml
+++ /dev/null
@@ -1,149 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Grid {
- id: menu
-
- property bool horizontalOrientation: true
- property list <Button> buttons
- width: parent.width
- height: horizontalOrientation ? 40 : ((children.length > 0) ? children[0].height * children.length : 0)
- spacing: 0
- property string exclusiveButton: ""
- property bool exclusive: false
- opacity: 0.9
- rows: (horizontalOrientation) ? 1 : children.length
- columns: (horizontalOrientation) ? children.length : 1
- signal clicked(string button)
-
- onChildrenChanged: {
- if (horizontalOrientation) resizeItems()
- }
-
- onExclusiveChanged: {
- if (exclusive){
- if (children.length > 0) exclusiveButton = children[0].text
- }
- else
- exclusiveButton = ""
- }
-
- onExclusiveButtonChanged:{
- if (exclusive) {
- for (var i = 0; i<children.length; i++){
- if (children[i].text == exclusiveButton){
- children[i].checked = true
- break
- }
- }
- }
- }
-
- function addItem(caption) {
- var button, myArray
- if (horizontalOrientation)
- button = Qt.createQmlObject ('import "style"; Button {height: menu.height; onClicked: {parent.itemClicked(text)} style: HMenuItemStyle {}}', menu)
- else
- button = Qt.createQmlObject ('import "style"; Button {height: 40; width: menu.width; onClicked: {parent.itemClicked(text)} style: VMenuItemStyle {}}', menu)
- button.text = caption
-
- myArray = new Array()
- for (var i = 0; i<children.length; i++){
- myArray.push(children[i])
- }
- myArray.push(button)
- children = myArray
-
- return button;
- }
-
- function deleteItem(caption){
- var myArray
-
- myArray = new Array()
- for (var i = 0; i<children.length; i++){
- if (children[i].text != caption)
- myArray.push(children[i])
- }
- children = myArray
- }
-
- function clear() {
- children = []
- }
-
- function disableItem(caption){
- for (var i = 0; i<children.length; i++){
- if (children[i].text == caption){
- children[i].disable()
- break
- }
- }
- }
-
- function enableItem(caption){
- for (var i = 0; i<children.length; i++){
- if (children[i].text == caption){
- children[i].enable()
- break
- }
- }
- }
-
- function resizeItems(){
- for (var i = 0; i<children.length; i++)
- children[i].width = parent.width/children.length - spacing
- }
-
- function itemClicked(text){
- if (exclusive && text != exclusiveButton) {
- for (var i = 0; i<children.length; i++){
- if (children[i].text == exclusiveButton){
- children[i].checked = false
- break
- }
- }
- exclusiveButton = text
- }
- clicked(text)
- }
-}
diff --git a/examples/declarative/places/content/components/Slider.qml b/examples/declarative/places/content/components/Slider.qml
deleted file mode 100644
index 4ded9f5b..00000000
--- a/examples/declarative/places/content/components/Slider.qml
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Item {
- id: slider;
- height: 10
- property real value // value is read/write.
- property real minimum: 0
- property real maximum: 1
- property int length: width - handle.width
-
- Rectangle {
- anchors.fill: parent
- border.width: 1;
- border.color: "dodgerblue"
- radius: 8
- color: "white"
- opacity: 1
- }
-
- Rectangle {
- id: labelRect
- width: label.width
- height: label.height + 4
- radius: 4
- smooth: true
- color: "white"
- border.color: "dodgerblue"
- anchors.bottom: handle.top
- anchors.bottomMargin: 4
- x: Math.max(Math.min(handle.x + (handle.width - width )/2, slider.width - width),0)
- visible: mouseRegion.pressed
- Text{
- id: label
- color: "dodgerblue"
- text: Math.round(slider.value *100)/100
- width: font.pointSize * 3.5
- anchors.horizontalCenter: labelRect.horizontalCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.baseline: parent.bottom
- anchors.baselineOffset: -6
- font.pixelSize: 14
- }
- }
-
- Rectangle {
- id: handle; smooth: true
- width: 26;
- y: (slider.height - height)/2;
- x: (slider.value - slider.minimum) * slider.length / (slider.maximum - slider.minimum)
-
- height: width; radius: width/2
- gradient: normalGradient
-
- Gradient {
- id: normalGradient
- GradientStop { position: 0.0; color: "dodgerblue" }
- GradientStop { position: 1.0; color: "mediumblue" }
- }
-
- Gradient {
- id: pressedGradient
- GradientStop { position: 0.0; color: "dodgerblue" }
- GradientStop { position: 1.0; color: "navy" }
- }
-
- Gradient {
- id: hoveredGradient
- GradientStop { position: 0.0; color: "dodgerblue" }
- GradientStop { position: 1.0; color: "midnightblue" }
- }
-
- MouseArea {
- id: mouseRegion
- hoverEnabled: true
- anchors.fill: parent; drag.target: parent
- drag.axis: Drag.XAxis; drag.minimumX: 0; drag.maximumX: slider.length
- onPositionChanged: { slider.value = (slider.maximum - slider.minimum) * handle.x / slider.length + slider.minimum; }
- }
- }
-
- states: [
- State {
- name: "Pressed"
- when: mouseRegion.pressed
- PropertyChanges { target: handle; gradient: pressedGradient }
- },
- State {
- name: "Hovered"
- when: mouseRegion.containsMouse
- PropertyChanges { target: handle; gradient: hoveredGradient }
- }
- ]
-}
diff --git a/examples/declarative/places/content/components/TextWithLabel.qml b/examples/declarative/places/content/components/TextWithLabel.qml
deleted file mode 100644
index 03cdb28a..00000000
--- a/examples/declarative/places/content/components/TextWithLabel.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-Row {
- id: textWithLabel
- height: inputRectangle.height
-
- property alias label: label.text
- property alias text: inputField.text
- property alias labelWidth: label.width
- property alias font: inputField.font
-
- Text {
- id: label;
- width:65;
- enabled: textWithLabel.enabled
- color: enabled ? "black" : "grey"
- anchors {
- top: parent.top;
- topMargin: (inputRectangle.height-height)/2
- }
- font.pixelSize: 14
- }
-
- Rectangle {
- id: inputRectangle
- width: textWithLabel.width - label.width; height: inputField.font.pixelSize * 1.5
- color: enabled ? "white" : "ghostwhite"
-
- border.width: 1
- border.color: enabled ? "dodgerblue" : "grey"
- radius: 5
- TextInput {
- id: inputField
- focus: true
- width: parent.width - anchors.leftMargin
- enabled: textWithLabel.enabled
- color: enabled ? "black" : "grey"
- horizontalAlignment: Text.AlignLeft
-
- anchors {
- left: parent.left;
- verticalCenter: parent.verticalCenter;
- leftMargin: 5
- }
- font.pixelSize: 14
- }
- }
-}
diff --git a/examples/declarative/places/content/components/style/ButtonStyle.qml b/examples/declarative/places/content/components/style/ButtonStyle.qml
deleted file mode 100644
index aa73ef95..00000000
--- a/examples/declarative/places/content/components/style/ButtonStyle.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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
-
-QtObject {
- id: buttonStyle
- property string background: "../resources/button.sci"
- property string pressedBackground: "../resources/button_pressed.png"
- property string disabledBackground: "../resources/button_hovered.png"
- property int heightAdjustment: 0
- property int yAdjustment: 0
-}
diff --git a/examples/declarative/places/content/dialogs/Dialog.qml b/examples/declarative/places/content/dialogs/Dialog.qml
deleted file mode 100644
index 3a19c18f..00000000
--- a/examples/declarative/places/content/dialogs/Dialog.qml
+++ /dev/null
@@ -1,180 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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 "../components"
-
-Item {
- id: dialog
- signal goButtonClicked
- signal cancelButtonClicked
-
- anchors.fill: parent
-
- property alias title: titleBar.text
- property alias dialogModel: dialogModel
- property alias length: dialogModel.count
- property int gap: 10
- property int listItemHeight: titleBar.font.pixelSize * 1.5
-
- opacity: 0
-
- function setModel(objects)
- {
- dialogModel.clear()
-
- for (var i=0; i< objects.length; i++){
- dialogModel.append({"labelText": objects[i][0], "inputText": objects[i][1]})
- }
- }
-
- Fader {}
-
- Rectangle {
- id: dialogRectangle
-
- color: "white"
- opacity: parent.opacity
- width: parent.width - gap;
- height: listview.height + titleBar.height + buttons.height + gap*1.5
-
- anchors {
- verticalCenter: parent.verticalCenter
- left: parent.left
- leftMargin: gap/2
- }
-
- border.width: 1
- border.color: "dodgerblue"
- radius: 5
-
- TitleBar {
- id: titleBar;
- width: parent.width; height: 40;
- anchors.top: parent.top; anchors.left: parent.left;
- opacity: 0.9
- onClicked: { dialog.cancelButtonClicked() }
- }
-
- ListModel {
- id: dialogModel
- }
-
- Component{
- id: listDelegate
- Column {
- id: column1
- height: listItemHeight
- TextWithLabel {
- id: textWithLabel
- label: labelText
- text: inputText
- width: dataRect.width - gap
- labelWidth: 95
-
- onTextChanged:
- {
- dialogModel.set(index, {"inputText": text})
- }
- }
- }
- }
-
- Rectangle {
- id: dataRect
- color: "#C0DCFF"
- border.width: 1
- border.color: "dodgerblue"
- radius: 5
- width:dialogRectangle.width - gap
- height: listview.height// + gap
- anchors {
- top: titleBar.bottom
- topMargin: gap/2
- left: parent.left
- leftMargin: gap/2
- }
-
- ListView {
- id: listview
- anchors {
- top: dataRect.top
- topMargin: gap/2
- left: parent.left
- leftMargin: gap/2
- }
- model: dialogModel
- delegate: listDelegate
- spacing: gap/2
- interactive: false
- Component.onCompleted: {
- height = (listItemHeight + gap/2)*length + gap/2
- }
- }
- }
-
- Row {
- id: buttons
- anchors.top: dataRect.bottom
- anchors.topMargin: gap/2
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: gap/3
- height: 32
- Button {
- id: buttonClearAll
- text: "Clear"
- width: 80; height: parent.height
- onClicked: {
- for (var i = 0; i<length; i++){
- dialogModel.set(i, {"inputText": ""})
- }
- }
- }
- Button {
- id: buttonGo
- text: "Go!"
- width: 80; height: parent.height
- onClicked: {
- dialog.goButtonClicked ()
- }
- }
- }
- }
-}
diff --git a/examples/declarative/places/content/map/MapComponent.qml b/examples/declarative/places/content/map/MapComponent.qml
deleted file mode 100644
index d3dd9b3e..00000000
--- a/examples/declarative/places/content/map/MapComponent.qml
+++ /dev/null
@@ -1,835 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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 QtLocation 5.0
-import "../components"
-
-Map {
- id: map
- anchors.fill: parent
- zoomLevel: (maximumZoomLevel - minimumZoomLevel)/2
- center: brisbaneCoordinate
-
- pinch.activeGestures: MapPinch.ZoomGesture
- pinch.enabled: true
-
- // Flicking
- flick.enabled: true
- flick.deceleration: 3000
-// property list<Marker> markers
-// property list<MapItem> mapItems
- property int counter: 0 // counter for total amount of markers. Resets to 0 when number of markers = 0
- property int mapItemsCounter: 0 // counter for total amount of mapItems. Resets to 0 when number of markers = 0
-// property Marker currentMarker
- signal mapPressed() // replace with
- // signal mousePressed(MouseEvent mouse) when QTBUG-14550 is fixed
-
- property int lastX : -1
- property int lastY : -1
- property bool followme: false
-
- Coordinate {
- id: brisbaneCoordinate
- latitude: -27.5
- longitude: 153
- }
-
- PositionSource{
- id: positionSource
- active: followme
-
- onPositionChanged: {
- map.center = positionSource.position.coordinate
- }
- }
-
- Slider {
- id: zoomSlider;
- minimum: map.minimumZoomLevel;
- maximum: map.maximumZoomLevel;
- opacity: 1
- visible: parent.visible
- z: map.z+1
- anchors {
- bottom: parent.bottom;
- bottomMargin: 56; rightMargin: 10; leftMargin: 10
- left: parent.left
- }
- width: parent.width - anchors.rightMargin - anchors.leftMargin
- value: map.zoomLevel
- onValueChanged: {
- map.zoomLevel = value
- }
- }
-
-/*
- property RouteQuery routeQuery: RouteQuery {}
- property RouteModel routeModel: RouteModel {
- plugin : map.plugin
- query: routeQuery
- onStatusChanged:{
- if (status == RouteModel.Ready){
- if (count == 1) { routeInfoModel.update()}
- }
- else if (status == RouteModel.Error){
- clearAll()
- map.routeError()
- }
- }
- function clearAll(){
- clear()
- routeInfoModel.update()
- }
- }
- property GeocodeModel geocodeModel: GeocodeModel {
- plugin : map.plugin;
- onStatusChanged:{
- if ((status == GeocodeModel.Ready) || (status == GeocodeModel.Error)) map.geocodeFinished()
- }
- onLocationsChanged:
- {
- if (count == 1) map.center = get(0).coordinate
- }
- }
-
- signal coordinatesCaptured(double latitude, double longitude)
- signal geocodeFinished()
- signal showGeocodeInfo()
- signal moveMarker()
- signal routeError()
-
- Component.onCompleted: {
- markers = []
- }
-
- Component {
- id: routeDelegate
- MapGroup {
- MapRoute {
- route: path
- border.color: routeMouseArea.containsMouse ? "lime" :"red"
- border.width: 5
- MapMouseArea {
- id: routeMouseArea
-
- hoverEnabled: true
- onPressed : {
- routeTimer.start()markers;
- map.state = ""
- map.lastX = mouse.x
- map.lastY = mouse.y
- }
- onReleased : {
- if (routeTimer.running){ //SHORT PRESS
- routeTimer.stop()
- map.lastX = -1
- map.lastY = -1
- }
- }
- onPositionChanged: {
- if (routeTimer.running) routeTimer.stop()
- if (map.state == "") {
- map.lastX = mouse.x
- map.lastY = mouse.y
- }
- }
- Timer {
- id: routeTimer
- interval: longPressDuration; running: false; repeat: false
- onTriggered: { //LONG PRESS
- map.state = "RoutePopupMenu"
- }
- }
- }
- }
- MapImage {
- source: routeMouseArea.containsMouse ? "resources/node_selected.png" : "resources/node.png"
- coordinate:path.path[0]
- offset.x: -5
- offset.y: -5
- }
- MapImage {
- source: routeMouseArea.containsMouse ? "resources/node_selected.png" : "resources/node.png"
- coordinate:path.path[path.path.length-1]
- offset.x: -5
- offset.y: -5
- }
- }
- }
-
- Component {
- id: pointDelegate
- MapCircle {
- radius: 1000
- color: circleMouseArea.containsMouse ? "#8000FF00" : "#80FF0000"
- center: location.coordinate
- MapMouseArea {
- id: circleMouseArea
- hoverEnabled: true
- onPressed : {
- circleTimer.start()
- map.state = ""
- map.lastX = mouse.x
- map.lastY = mouse.y
- }
- onReleased : {
- if (circleTimer.running) {//SHORT PRESS
- circleTimer.stop();
- map.lastX = -1
- map.lastY = -1
- }
- }
- onPositionChanged: {
- if (circleTimer.running) circleTimer.stop()
- if ((mouse.button == Qt.LeftButton) && (map.state == "")) radius = center.distanceTo(mouse.coordinate)
- if (map.state == "") {
- map.lastX = mouse.x
- map.lastY = mouse.y
- }
- }
- Timer {
- id: circleTimer
- interval: longPressDuration; running: false; repeat: false
- onTriggered: { //LONG PRESS
- map.state = "PointPopupMenu"
- }
- }
- }
- }
- }
-
- Component {
- id: routeInfoDelegate
- Row {
- spacing: 10
- Text {
- id: indexText
- text: index + 1
- color: "white"
- font.bold: true
- font.pixelSize: 14
- }
- Text {
- text: instruction
- color: "white"
- height: indexText.height*3
- wrapMode: Text.Wrap
- width: textArea.width - indexText.width - distanceText.width - spacing*4
- }
- Text {
- id: distanceText
- text: distance
- color: "white"
- font.bold: true
- font.pixelSize: 14
- }
- }
- }
-
- Component{
- id: routeInfoHeader
- Item {
- width: textArea.width
- height: travelTime.height + line.anchors.topMargin + line.height
- Text {
- id: travelTime
- text: routeInfoModel.travelTime
- color: "white"
- font.bold: true
- font.pixelSize: 14
- anchors.left: parent.left
- }
- Text {
- id: distance
- text: routeInfoModel.distance
- color: "white"
- font.bold: true
- font.pixelSize: 14
- anchors.right: parent.right
- }
- Rectangle {
- id: line
- color: "white"
- width: parent.width
- height: 2
- anchors.left: parent.left
- anchors.topMargin: 1
- anchors.top: distance.bottom
- }
- }
- }
-
-
- ListModel{
- id: routeInfoModel
- property string travelTime
- property string distance
-
- function update() {
- clear()
- if (routeModel.count > 0){
- for (var i=0; i< routeModel.get(0).segments.length; i++){
- append({"instruction": routeModel.get(0).segments[i].maneuver.instructionText, "distance": formatDistance(routeModel.get(0).segments[i].maneuver.distanceToNextInstruction)})
- }
- }
- travelTime = routeModel.count == 0 ? "" : formatTime(routeModel.get(0).travelTime)
- distance = routeModel.count == 0 ? "" : formatDistance(routeModel.get(0).distance)
- }
- }
-
- MapObjectView {
- model: routeModel
- delegate: routeDelegate
- }
-
- MapObjectView {
- model: geocodeModel
- delegate: pointDelegate
- }
-
- Plugin {
- id: defaultPlugin
- name : "nokia"
- }
-
- Coordinate {
- id: defaultCoordinates
- latitude : -27.53
- longitude : 153.088
- }
-
- Item {
- id: infoTab
- parent: scale.parent
- z: map.z
- height: parent.height - 180
- width: parent.width
- x: -5 - infoRect.width
- y: 60
- visible: (routeInfoModel.count > 0)
- Image {
- id: catchImage
- source: "../resources/catch.png"
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (infoTab.x == -5) infoTab.x -= infoRect.width
- else infoTab.x = -5
- map.state = ""
- }
- }
- }
-
- Behavior on x {
- PropertyAnimation { properties: "x"; duration: 300; easing.type: Easing.InOutQuad }
- }
-
- Rectangle {
- id: infoRect
- width: parent.width - catchImage.sourceSize.width
- height: parent.height
- color: "#3F95FF"
- opacity: 0.75
- radius: 5
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- }
- Item {
- id: textArea
- anchors.left: parent.left
- anchors.leftMargin: 10
- anchors.top: parent.top
- anchors.topMargin: 10
- width: parent.width -15
- height: parent.height - 20
- ListView {
- id: routeInfoView
- model: routeInfoModel
- delegate: routeInfoDelegate
- header: routeInfoHeader
- anchors.fill: parent
- clip: true
- }
- }
- }
- }
-*/
-
- Item {//scale
- id: scale
- parent: zoomSlider.parent
- visible: scaleText.text != "0 m"
- z: map.z
- opacity: 0.6
- anchors {
- bottom: zoomSlider.top;
- bottomMargin: 8;
- leftMargin: 20
- left: zoomSlider.left
- }
- Image {
- id: scaleImage
- source: "../resources/scale.png"
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- }
- Text {
- id: scaleText
- color: "#004EAE"
- horizontalAlignment: Text.AlignHCenter
- width: scaleImage.sourceSize.width
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.bottomMargin: 3
- text:calculateScale()
- font.pixelSize: 14
- }
- }
-
- onCenterChanged:{
- scaleText.text = calculateScale()
- if (map.followme)
- if (map.center != positionSource.position.coordinate) map.followme = false
- }
-
- onZoomLevelChanged:{
- scaleText.text = map.calculateScale()
- if (map.followme) map.center = positionSource.position.coordinate
- }
-
- onWidthChanged:{
- scaleText.text = map.calculateScale()
- }
-
- onHeightChanged:{
- scaleText.text = map.calculateScale()
- }
-
- Menu {
- id: markerMenu
- horizontalOrientation: false
- z: map.z + 2
- opacity: 0
-
- width: 150
- x: 0
- y: 0
- onClicked: {
- map.state = ""
-/* switch (button) {
- case "Delete": {//remove marker
- map.removeMarker(currentMarker)
- break;
- }
- case "Move to": {//move marker
- map.moveMarker()
- break;
- }
- case "Coordinates": {//show marker's coordinates
- map.coordinatesCaptured(currentMarker.coordinate.latitude, currentMarker.coordinate.longitude)
- break;
- }
- case "Route to next points"://calculate route
- case "Route to next point": {
- map.calculateRoute(currentMarker)
- break;
- }
- }*/
- }
- }
-
- Menu {
- id: popupMenu
- horizontalOrientation: false
- z: map.z + 2
- opacity: 0
-
- width: 150
- x: 0
- y: 0
-
- onClicked: {
-/* switch (button) {
- case "Set Marker": {
- addMarker()
- break;
- }
- case "Coordinates": {
- map.coordinatesCaptured(mouseArea.lastCoordinate.latitude, mouseArea.lastCoordinate.longitude)
- break;
- }
- case "Delete all objects": {
- map.deleteAllObjects()
- break;
- }
- }*/
- map.state = ""
- }
- }
-
- Menu {
- id: routeMenu
- horizontalOrientation: false
- z: map.z +2
- opacity: 0
-
- width: 150
- x: 0
- y: 0
-
- onClicked: {
-/* switch (button) {
- case "Delete": {//delete route
- routeModel.clear()
- routeInfoModel.update()
- break;
- }
- }*/
- map.state = ""
- }
- Component.onCompleted: {
- addItem("Delete")
- }
- }
-
- Menu {
- id: pointMenu
- horizontalOrientation: false
- z: map.z +2
- opacity: 0
-
- width: 150
- x: 0
- y: 0
-
- onClicked: {
-/* switch (button) {
- case "Info": {
- map.showGeocodeInfo()
- break;
- }
- case "Delete": {
- geocodeModel.clear()
- break;
- }
- }*/
- map.state = ""
- }
- Component.onCompleted: {
- addItem("Info")
- addItem("Delete")
- }
- }
-
- Rectangle {
- id: infoLabel
- width: backgroundRect.width + 10
- height: infoText.height + 5
- y: 440
- anchors.left: map.left
- z: map.z + 1
- color: "dimgrey"
- opacity: (infoText.text !="") ? 0.8 : 0
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Text {
- id: infoText
- width: parent.width
- elide: Text.ElideLeft
- maximumLineCount: 4
- wrapMode: Text.Wrap
- font.bold: true
- font.pixelSize: 14
- style: Text.Raised;
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.leftMargin: 5
- anchors.rightMargin: 5
- color: "white"
- }
- }
-
- MapMouseArea {
- id: mouseArea
- property Coordinate lastCoordinate: Coordinate { latitude : 0; longitude : 0}
- anchors.fill: parent
-
- onPressed : {
- mapPressed();
- map.state = ""
- map.lastX = mouse.x
- map.lastY = mouse.y
- lastCoordinate = mouse.coordinate
-// if (mouse.button == Qt.MiddleButton)
-// addMarker()
- }
-
- onPositionChanged: {
- map.state = ""
- if ((mouse.button == Qt.LeftButton) & (map.state == "")) {
-// if ((map.lastX != -1) && (map.lastY != -1)) {
-// var dx = mouse.x - map.lastX
-// var dy = mouse.y - map.lastY
-// map.pan(-dx, -dy)
-// }
- map.lastX = mouse.x
- map.lastY = mouse.y
- }
- }
-
- onDoubleClicked: {
- map.center = mouse.coordinate
- if (mouse.button == Qt.LeftButton){
- map.zoomLevel += 1
- } else if (mouse.button == Qt.RightButton) map.zoomLevel -= 1
- lastX = -1
- lastY = -1
- }
-
- onPressAndHold:{
- popupMenu.clear()
- popupMenu.addItem("Coordinates")
- popupMenu.addItem("Marker")
- popupMenu.addItem("Rectangle")
- popupMenu.addItem("Circle")
- popupMenu.addItem("Polyline")
- popupMenu.addItem("Polygon")
-// if ((map.markers.length != 0) || (map.mapItems.length != 0)) popupMenu.addItem("Delete all objects")
-// map.state = "PopupMenu"
- }
- }
-
-
- Keys.onPressed: {
- if ((event.key == Qt.Key_Plus) || (event.key == Qt.Key_VolumeUp)) {
- map.zoomLevel += 1
- } else if ((event.key == Qt.Key_Minus) || (event.key == Qt.Key_VolumeDown)){
- map.zoomLevel -= 1
- }
- }
-
- function calculateScale(){
- var coord1, coord2, dist, text
- coord1 = map.toCoordinate(Qt.point(0,scale.y))
- coord2 = map.toCoordinate(Qt.point(0+scaleImage.sourceSize.width,scale.y))
- dist = Math.round(coord1.distanceTo(coord2))
- text = formatDistance(dist)
- return text
- }
-
-/*
- function addMapItem(type){
- var item, myArray
- if (map.itemMarkers.length < 2){
- console.log("less than 2 points marked")
- } else {
- console.log("adding " + type)
- item = Qt.createQmlObject (type + ' {}', map)
- map.addMapObject(item)
- //update list of markers
- var count = map.objects.length
- mapItemsCounter++
- myArray = new Array()
- for (var i = 0; i<count; i++){
- myArray.push(mapItems[i])
- }
- myArray.push(item)
- mapItems = myArray
- }
- }
-
- function deleteAllObjects(){
- var count = map.markers.length
- for (var i = 0; i<count; i++){
- map.removeMapObject(map.markers[i])
- map.markers[i].destroy()
- }
- map.markers = []
- var count = map.mapItems.length
- for (var i = 0; i<count; i++){
- map.removeMapObject(map.mapItems[i])
- map.mapItems[i].destroy()
- }
- map.mapItems = []
- mapItemsCounter = 0
- }
-
- function addMarker(){
-
- var marker, myArray
- var count = map.markers.length
- counter++
- marker = Qt.createQmlObject ('Marker {}', map)
- map.addMapObject(marker)
-
- //update list of markers
- myArray = new Array()
- for (var i = 0; i<count; i++){
- myArray.push(markers[i])
- }
- myArray.push(marker)
- markers = myArray
- }
-
- function removeMarker(marker){
- //update list of markers
- var myArray = new Array()
- var count = map.markers.length
- for (var i = 0; i<count; i++){
- if (marker != map.markers[i]) myArray.push(map.markers[i])
- }
-
- map.removeMapObject(marker)
- marker.destroy()
- map.markers = myArray
- if (markers.length == 0) counter = 0
- }
-
- function markerLongPress(){
- var array
- var count = map.markers.length
-
- markerMenu.clear()
- markerMenu.addItem("Delete")
- markerMenu.addItem("Move to")
- markerMenu.addItem("Coordinates")
- if ((currentMarker != markers[count-1]) && (count > 2))
- if (currentMarker == markers[count-2]) markerMenu.addItem("Route to next point")
- else markerMenu.addItem("Route to next points")
- }
- else markerMenu.addItem("Route to next point")
-
- map.state = "MarkerPopupMenu"
- }
-
- function calculateRoute(marker){
- routeQuery.clearWaypoints();
- var startPointFound = false
- var count = map.markers.length
- for (var i = 0; i< count; i++){
- if (startPointFound != true){
- if (markers[i] == marker){
- startPointFound = true
- routeQuery.addWaypoint(marker.coordinate)
- }
- }
- else routeQuery.addWaypoint(markers[i].coordinate)
- }
- routeQuery.travelModes = RouteQuery.CarTravel
- routeQuery.routeOptimizations = RouteQuery.ShortestRoute
- for (i=0; i<9; i++) {
- routeQuery.setFeatureWeight(i, 0)
- }
- routeModel.update();
- }
-*/
- function roundNumber(number, digits) {
- var multiple = Math.pow(10, digits);
- return Math.round(number * multiple) / multiple;
- }
-
- function formatTime(sec){
- var value = sec
- var seconds = value % 60
- value /= 60
- value = (value > 1) ? Math.round(value) : 0
- var minutes = value % 60
- value /= 60
- value = (value > 1) ? Math.round(value) : 0
- var hours = value
- if (hours > 0) value = hours + "h:"+ minutes + "m"
- else value = minutes + "min"
- return value
- }
-
- function formatDistance(meters)
- {
- var dist = Math.round(meters)
- if (dist > 1000 ){
- if (dist > 100000){
- dist = Math.round(dist / 1000)
- }
- else{
- dist = Math.round(dist / 100)
- dist = dist / 10
- }
- dist = dist + " km"
- }
- else{
- dist = dist + " m"
- }
- return dist
- }
-
- // states of map
- states: [
- State {
- name: "PopupMenu"
- PropertyChanges { target: popupMenu; opacity: 1}
- PropertyChanges { target: popupMenu; x: ((map.lastX + popupMenu.width > map.width) ? map.width - popupMenu.width : map.lastX)}
- PropertyChanges { target: popupMenu; y: ((map.lastY + popupMenu.height > map.height) ? map.height - popupMenu.height : map.lastY)}
- },
- State {
- name: "MarkerPopupMenu"
- PropertyChanges { target: markerMenu; opacity: 1}
- PropertyChanges { target: markerMenu; x: ((currentMarker.lastMouseX + markerMenu.width > map.width) ? map.width - markerMenu.width : currentMarker.lastMouseX )}
- PropertyChanges { target: markerMenu; y: ((currentMarker.lastMouseY + markerMenu.height > map.height) ? map.height - markerMenu.height : currentMarker.lastMouseY)}
- },
- State {
- name: "RoutePopupMenu"
- PropertyChanges { target: routeMenu; opacity: 1}
- PropertyChanges { target: routeMenu; x: ((map.lastX + routeMenu.width > map.width) ? map.width - routeMenu.width : map.lastX)}
- PropertyChanges { target: routeMenu; y: ((map.lastY + routeMenu.height > map.height) ? map.height - routeMenu.height : map.lastY)}
- },
- State {
- name: "PointPopupMenu"
- PropertyChanges { target: pointMenu; opacity: 1}
- PropertyChanges { target: pointMenu; x: ((map.lastX + pointMenu.width > map.width) ? map.width - pointMenu.width : map.lastX)}
- PropertyChanges { target: pointMenu; y: ((map.lastY + pointMenu.height > map.height) ? map.height - pointMenu.height : map.lastY)}
- }
- ]
-
-}
diff --git a/examples/declarative/places/content/map/Marker.qml b/examples/declarative/places/content/map/Marker.qml
deleted file mode 100644
index 27608bd4..00000000
--- a/examples/declarative/places/content/map/Marker.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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 QtLocation 5.0
-import "../components"
-
-MapGroup { //to be used inside MapComponent only
- id: marker
- property alias coordinate: markerImage.coordinate
- property alias lastMouseX: markerMouseArea.lastX
- property alias lastMouseY: markerMouseArea.lastY
- property alias text: markerIndex.text
-
- MapImage {
- id: markerImage
- source: markerMouseArea.pressed ? "resources/marker_selected.png" : "resources/marker.png" //TODO replace with following lane when QTBUG-20096 fixed
-// source: markerMouseArea.containsMouse ? (markerMouseArea.pressed ? "resources/marker_selected.png" :"resources/marker_hovered.png") : "resources/marker.png"
- coordinate: Coordinate { latitude : 0; longitude : 0 }
- offset.x: -13
- offset.y: -32
-
- Component.onCompleted: {
- coordinate = mouseArea.lastCoordinate
- }
-
- MapMouseArea {
- id: markerMouseArea
- property int dX: 0
- property int dY: 0
- property int lastX: -1
- property int lastY: -1
- property bool longPress: false
- hoverEnabled: true
- onPressed: {
- ++marker.z
- var newX, newY, oldX, oldY
- newX = map.toScreenPosition(mouse.coordinate).x
- newY = map.toScreenPosition(mouse.coordinate).y
- oldX = map.toScreenPosition(markerImage.coordinate).x
- oldY = map.toScreenPosition(markerImage.coordinate).y
- dX = oldX - newX
- dY = oldY - newY
- lastX = mouse.x
- lastY = mouse.y
-
- markerTimer.start()
- map.currentMarker = marker
- map.state = ""
- }
- onReleased: {
- if (markerTimer.running) markerTimer.stop();
- marker.z--
- longPress = false
- }
-
- onPositionChanged: {
- var newX, newY
- if (markerTimer.running) markerTimer.stop();
- if ((mouse.button == Qt.LeftButton) && (longPress != true)){
- lastX = mouse.x
- lastY = mouse.y
- newX = map.toScreenPosition(mouse.coordinate).x + dX
- newY = map.toScreenPosition(mouse.coordinate).y + dY
- markerImage.coordinate = map.toCoordinate(Qt.point(newX,newY))
- }
- }
-
- Timer {
- id: markerTimer
- interval: map.longPressDuration
- running: false
- repeat: false
- onTriggered: {
- markerMouseArea.longPress = true
- map.markerLongPress()
- }
- }
- }
- }
-
- MapText {
- id: markerIndex
- offset.y : -16
- coordinate: markerImage.coordinate
- color: "white"
- font.bold: true
- Component.onCompleted: {
- text = map.counter
- }
- font.pixelSize: 14
- }
-}
diff --git a/examples/declarative/places/content/places/CategoryDelegate.qml b/examples/declarative/places/content/places/CategoryDelegate.qml
index e9cbb581..51365e01 100644
--- a/examples/declarative/places/content/places/CategoryDelegate.qml
+++ b/examples/declarative/places/content/places/CategoryDelegate.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
Item {
id: root
@@ -75,9 +75,9 @@ Item {
anchors.right: cross.left
visible: placesPlugin.supportedPlacesFeatures & Plugin.SaveCategoryFeature
- source: "../resources/pencil.png"
- hoveredSource: "../resources/pencil_hovered.png"
- pressedSource: "../resources/pencil_pressed.png"
+ source: "../../resources/pencil.png"
+ hoveredSource: "../../resources/pencil_hovered.png"
+ pressedSource: "../../resources/pencil_pressed.png"
onClicked: root.editClicked()
}
@@ -88,9 +88,9 @@ Item {
anchors.right: arrow.left
visible: placesPlugin.supportedPlacesFeatures & Plugin.RemoveCategoryFeature
- source: "../resources/cross.png"
- hoveredSource: "../resources/cross_hovered.png"
- pressedSource: "../resources/cross_pressed.png"
+ source: "../../resources/cross.png"
+ hoveredSource: "../../resources/cross_hovered.png"
+ pressedSource: "../../resources/cross_pressed.png"
onClicked: root.crossClicked()
}
@@ -101,9 +101,9 @@ Item {
anchors.right: parent.right
visible: model.hasModelChildren
- source: "../resources/right.png"
- hoveredSource: "../resources/right_hovered.png"
- pressedSource: "../resources/right_pressed.png"
+ source: "../../resources/right.png"
+ hoveredSource: "../../resources/right_hovered.png"
+ pressedSource: "../../resources/right_pressed.png"
onClicked: root.arrowClicked()
}
diff --git a/examples/declarative/places/content/places/CategoryDialog.qml b/examples/declarative/places/content/places/CategoryDialog.qml
index 64f27cfb..56c7d5b2 100644
--- a/examples/declarative/places/content/places/CategoryDialog.qml
+++ b/examples/declarative/places/content/places/CategoryDialog.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../dialogs"
+import QtLocation.examples 5.0
Dialog {
title: "Edit Category"
diff --git a/examples/declarative/places/content/places/MapComponent.qml b/examples/declarative/places/content/places/MapComponent.qml
new file mode 100644
index 00000000..f555c8bf
--- /dev/null
+++ b/examples/declarative/places/content/places/MapComponent.qml
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** 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 QtLocation 5.0
+import QtLocation.examples 5.0
+
+Map {
+ id: map
+ anchors.fill: parent
+ zoomLevel: (maximumZoomLevel - minimumZoomLevel)/2
+ center: brisbaneCoordinate
+
+ pinch.activeGestures: MapPinch.ZoomGesture
+ pinch.enabled: true
+
+ // Flicking
+ flick.enabled: true
+ flick.deceleration: 3000
+ signal mapPressed() // replace with
+ // signal mousePressed(MouseEvent mouse) when QTBUG-14550 is fixed
+
+ property bool followme: false
+ property variant scaleLengths: [5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000, 2000000]
+
+ Coordinate {
+ id: brisbaneCoordinate
+ latitude: -27.5
+ longitude: 153
+ }
+
+ PositionSource{
+ id: positionSource
+ active: followme
+
+ onPositionChanged: {
+ map.center = positionSource.position.coordinate
+ }
+ }
+
+ Slider {
+ id: zoomSlider;
+ minimum: map.minimumZoomLevel;
+ maximum: map.maximumZoomLevel;
+ opacity: 1
+ visible: parent.visible
+ z: map.z+1
+ anchors {
+ bottom: parent.bottom;
+ bottomMargin: 56; rightMargin: 10; leftMargin: 10
+ left: parent.left
+ }
+ width: parent.width - anchors.rightMargin - anchors.leftMargin
+ value: map.zoomLevel
+ onValueChanged: {
+ map.zoomLevel = value
+ }
+ }
+
+ signal coordinatesCaptured(double latitude, double longitude)
+
+ Item {//scale
+ id: scale
+ parent: zoomSlider.parent
+ visible: scaleText.text != "0 m"
+ z: map.z
+ opacity: 0.6
+ anchors {
+ bottom: zoomSlider.top;
+ bottomMargin: 8;
+ leftMargin: 20
+ left: zoomSlider.left
+ }
+ Image {
+ id: scaleImageLeft
+ source: "../../resources/scale_end.png"
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ }
+ Image {
+ id: scaleImage
+ source: "../../resources/scale.png"
+ anchors.bottom: parent.bottom
+ anchors.left: scaleImageLeft.right
+ }
+ Image {
+ id: scaleImageRight
+ source: "../../resources/scale_end.png"
+ anchors.bottom: parent.bottom
+ anchors.left: scaleImage.right
+ }
+ Text {
+ id: scaleText
+ color: "#004EAE"
+ horizontalAlignment: Text.AlignHCenter
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.bottomMargin: 3
+ text: "0 m"
+ font.pixelSize: 14
+ }
+ Component.onCompleted: {
+ map.calculateScale();
+ }
+ }
+
+ Timer {
+ id: scaleTimer
+ interval: 100
+ running: false
+ repeat: false
+ onTriggered: {
+ map.calculateScale()
+ }
+ }
+
+ onCenterChanged:{
+ scaleTimer.restart()
+ if (map.followme)
+ if (map.center != positionSource.position.coordinate) map.followme = false
+ }
+
+ onZoomLevelChanged:{
+ scaleTimer.restart()
+ if (map.followme) map.center = positionSource.position.coordinate
+ }
+
+ onWidthChanged:{
+ scaleTimer.restart()
+ }
+
+ onHeightChanged:{
+ scaleTimer.restart()
+ }
+
+ Keys.onPressed: {
+ if ((event.key == Qt.Key_Plus) || (event.key == Qt.Key_VolumeUp)) {
+ map.zoomLevel += 1
+ } else if ((event.key == Qt.Key_Minus) || (event.key == Qt.Key_VolumeDown)){
+ map.zoomLevel -= 1
+ }
+ }
+
+ function calculateScale(){
+ var coord1, coord2, dist, text, f
+ f = 0
+ coord1 = map.toCoordinate(Qt.point(0,scale.y))
+ coord2 = map.toCoordinate(Qt.point(0+scaleImage.sourceSize.width,scale.y))
+ dist = Math.round(coord1.distanceTo(coord2))
+
+ if (dist === 0) {
+ // not visible
+ } else {
+ for (var i = 0; i < scaleLengths.length-1; i++) {
+ if (dist < (scaleLengths[i] + scaleLengths[i+1]) / 2 ) {
+ f = scaleLengths[i] / dist
+ dist = scaleLengths[i]
+ break;
+ }
+ }
+ if (f === 0) {
+ f = dist / scaleLengths[i]
+ dist = scaleLengths[i]
+ }
+ }
+
+ text = formatDistance(dist)
+ scaleImage.width = (scaleImage.sourceSize.width * f) - 2 * scaleImageLeft.sourceSize.width
+ scaleText.text = text
+ }
+
+ function roundNumber(number, digits) {
+ var multiple = Math.pow(10, digits);
+ return Math.round(number * multiple) / multiple;
+ }
+
+ function formatTime(sec){
+ var value = sec
+ var seconds = value % 60
+ value /= 60
+ value = (value > 1) ? Math.round(value) : 0
+ var minutes = value % 60
+ value /= 60
+ value = (value > 1) ? Math.round(value) : 0
+ var hours = value
+ if (hours > 0) value = hours + "h:"+ minutes + "m"
+ else value = minutes + "min"
+ return value
+ }
+
+ function formatDistance(meters)
+ {
+ var dist = Math.round(meters)
+ if (dist > 1000 ){
+ if (dist > 100000){
+ dist = Math.round(dist / 1000)
+ }
+ else{
+ dist = Math.round(dist / 100)
+ dist = dist / 10
+ }
+ dist = dist + " km"
+ }
+ else{
+ dist = dist + " m"
+ }
+ return dist
+ }
+}
diff --git a/examples/declarative/places/content/places/PlaceDelegate.qml b/examples/declarative/places/content/places/PlaceDelegate.qml
index 47f897c8..8cead610 100644
--- a/examples/declarative/places/content/places/PlaceDelegate.qml
+++ b/examples/declarative/places/content/places/PlaceDelegate.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
Item {
property Place place
diff --git a/examples/declarative/places/content/places/PlaceDialog.qml b/examples/declarative/places/content/places/PlaceDialog.qml
index 1b157c48..6a5acff8 100644
--- a/examples/declarative/places/content/places/PlaceDialog.qml
+++ b/examples/declarative/places/content/places/PlaceDialog.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../dialogs"
+import QtLocation.examples 5.0
Dialog {
title: "Edit Place"
diff --git a/examples/declarative/places/content/places/RatingView.qml b/examples/declarative/places/content/places/RatingView.qml
index d33db2c5..ee355098 100644
--- a/examples/declarative/places/content/places/RatingView.qml
+++ b/examples/declarative/places/content/places/RatingView.qml
@@ -47,7 +47,7 @@ Row {
Repeater {
model: Math.ceil(rating)
Image {
- source: "../resources/star.png"
+ source: "../../resources/star.png"
width: size
height: size
}
diff --git a/examples/declarative/places/content/places/SearchBox.qml b/examples/declarative/places/content/places/SearchBox.qml
index f1a0e06f..e27e29ce 100644
--- a/examples/declarative/places/content/places/SearchBox.qml
+++ b/examples/declarative/places/content/places/SearchBox.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
Rectangle {
id: searchRectangle
@@ -78,7 +78,7 @@ Rectangle {
//! [PlaceSearchSuggestionModel search text changed]
onTextChanged: {
- if (suggestionsEnabled) {
+ if (searchRectangle.suggestionsEnabled) {
if (text.length >= 3) {
suggestionModel.searchTerm = text;
suggestionModel.execute();
@@ -100,9 +100,9 @@ Rectangle {
IconButton {
id: searchButton
- source: "../resources/search.png"
- hoveredSource: "../resources/search_hovered.png"
- pressedSource: "../resources/search_pressed.png"
+ source: "../../resources/search.png"
+ hoveredSource: "../../resources/search_hovered.png"
+ pressedSource: "../../resources/search_pressed.png"
onClicked: {
placeSearchModel.searchForText(searchBox.text);
@@ -113,9 +113,9 @@ Rectangle {
IconButton {
id: categoryButton
- source: "../resources/categories.png"
- hoveredSource: "../resources/categories_hovered.png"
- pressedSource: "../resources/categories_pressed.png"
+ source: "../../resources/categories.png"
+ hoveredSource: "../../resources/categories_hovered.png"
+ pressedSource: "../../resources/categories_pressed.png"
onClicked: {
if (searchRectangle.state !== "CategoriesShown")
@@ -147,9 +147,9 @@ Rectangle {
//! [CategoryModel view 2]
header: IconButton {
- source: "../resources/left.png"
- hoveredSource: "../resources/left_hovered.png"
- pressedSource: "../resources/left_pressed.png"
+ source: "../../resources/left.png"
+ hoveredSource: "../../resources/left_hovered.png"
+ pressedSource: "../../resources/left_pressed.png"
onClicked: categoryListModel.rootIndex = categoryListModel.parentModelIndex()
visible: !busy.visible
diff --git a/examples/declarative/places/content/places/SearchResultView.qml b/examples/declarative/places/content/places/SearchResultView.qml
index 67efb7b2..60182bb6 100644
--- a/examples/declarative/places/content/places/SearchResultView.qml
+++ b/examples/declarative/places/content/places/SearchResultView.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "../components"
+import QtLocation.examples 5.0
Item {
id: root
@@ -118,9 +118,9 @@ Item {
IconButton {
id: placeBackButton
- source: "../resources/left.png"
- hoveredSource: "../resources/left_hovered.png"
- pressedSource: "../resources/left_pressed.png"
+ source: "../../resources/left.png"
+ hoveredSource: "../../resources/left_hovered.png"
+ pressedSource: "../../resources/left_pressed.png"
onClicked: {
view.currentIndex = 0;
@@ -183,9 +183,9 @@ Item {
IconButton {
id: contentListBackButton
- source: "../resources/left.png"
- hoveredSource: "../resources/left_hovered.png"
- pressedSource: "../resources/left_pressed.png"
+ source: "../../resources/left.png"
+ hoveredSource: "../../resources/left_hovered.png"
+ pressedSource: "../../resources/left_pressed.png"
onClicked: view.currentIndex = 1
}
@@ -214,9 +214,9 @@ Item {
IconButton {
id: contentBackButton
- source: "../resources/left.png"
- hoveredSource: "../resources/left_hovered.png"
- pressedSource: "../resources/left_pressed.png"
+ source: "../../resources/left.png"
+ hoveredSource: "../../resources/left_hovered.png"
+ pressedSource: "../../resources/left_pressed.png"
onClicked: {
view.currentIndex = 2;
diff --git a/examples/declarative/places/content/resources/button.png b/examples/declarative/places/content/resources/button.png
deleted file mode 100644
index 18d9a84d..00000000
--- a/examples/declarative/places/content/resources/button.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/button.sci b/examples/declarative/places/content/resources/button.sci
deleted file mode 100644
index a34a58b6..00000000
--- a/examples/declarative/places/content/resources/button.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 15
-border.top: 4
-border.bottom: 4
-border.right: 15
-source: button.png
diff --git a/examples/declarative/places/content/resources/button_hovered.png b/examples/declarative/places/content/resources/button_hovered.png
deleted file mode 100644
index 0f228f83..00000000
--- a/examples/declarative/places/content/resources/button_hovered.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/button_pressed.png b/examples/declarative/places/content/resources/button_pressed.png
deleted file mode 100644
index 0a91912d..00000000
--- a/examples/declarative/places/content/resources/button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/checkbox.png b/examples/declarative/places/content/resources/checkbox.png
deleted file mode 100644
index b9aab540..00000000
--- a/examples/declarative/places/content/resources/checkbox.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/checkbox_selected.png b/examples/declarative/places/content/resources/checkbox_selected.png
deleted file mode 100644
index 28af3751..00000000
--- a/examples/declarative/places/content/resources/checkbox_selected.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/hmenuItem.png b/examples/declarative/places/content/resources/hmenuItem.png
deleted file mode 100644
index 42f565a2..00000000
--- a/examples/declarative/places/content/resources/hmenuItem.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/hmenuItem.sci b/examples/declarative/places/content/resources/hmenuItem.sci
deleted file mode 100644
index 477ada8e..00000000
--- a/examples/declarative/places/content/resources/hmenuItem.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 10
-border.top: 12
-border.bottom: 12
-border.right: 10
-source: hmenuItem.png
diff --git a/examples/declarative/places/content/resources/hmenuItem_hovered.png b/examples/declarative/places/content/resources/hmenuItem_hovered.png
deleted file mode 100644
index 6a9a3a98..00000000
--- a/examples/declarative/places/content/resources/hmenuItem_hovered.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/hmenuItem_pressed.png b/examples/declarative/places/content/resources/hmenuItem_pressed.png
deleted file mode 100644
index f779baf6..00000000
--- a/examples/declarative/places/content/resources/hmenuItem_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/marker.png b/examples/declarative/places/content/resources/marker.png
deleted file mode 100644
index 86ec960e..00000000
--- a/examples/declarative/places/content/resources/marker.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/marker_hovered.png b/examples/declarative/places/content/resources/marker_hovered.png
deleted file mode 100644
index 902ae591..00000000
--- a/examples/declarative/places/content/resources/marker_hovered.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/marker_selected.png b/examples/declarative/places/content/resources/marker_selected.png
deleted file mode 100644
index f4bf8921..00000000
--- a/examples/declarative/places/content/resources/marker_selected.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/node.png b/examples/declarative/places/content/resources/node.png
deleted file mode 100644
index 46e85672..00000000
--- a/examples/declarative/places/content/resources/node.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/node_selected.png b/examples/declarative/places/content/resources/node_selected.png
deleted file mode 100644
index a967f3cf..00000000
--- a/examples/declarative/places/content/resources/node_selected.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/option_button.png b/examples/declarative/places/content/resources/option_button.png
deleted file mode 100644
index b6c1a777..00000000
--- a/examples/declarative/places/content/resources/option_button.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/option_button_selected.png b/examples/declarative/places/content/resources/option_button_selected.png
deleted file mode 100644
index 129e21c0..00000000
--- a/examples/declarative/places/content/resources/option_button_selected.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/quit.png b/examples/declarative/places/content/resources/quit.png
deleted file mode 100644
index 9a5cb8a2..00000000
--- a/examples/declarative/places/content/resources/quit.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/quit_hovered.png b/examples/declarative/places/content/resources/quit_hovered.png
deleted file mode 100644
index bea8f251..00000000
--- a/examples/declarative/places/content/resources/quit_hovered.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/quit_pressed.png b/examples/declarative/places/content/resources/quit_pressed.png
deleted file mode 100644
index e69aa111..00000000
--- a/examples/declarative/places/content/resources/quit_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/scale.png b/examples/declarative/places/content/resources/scale.png
deleted file mode 100644
index 29baa8a4..00000000
--- a/examples/declarative/places/content/resources/scale.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/titlebar.png b/examples/declarative/places/content/resources/titlebar.png
deleted file mode 100644
index c4689844..00000000
--- a/examples/declarative/places/content/resources/titlebar.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/titlebar.sci b/examples/declarative/places/content/resources/titlebar.sci
deleted file mode 100644
index 0418d94c..00000000
--- a/examples/declarative/places/content/resources/titlebar.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 10
-border.top: 12
-border.bottom: 12
-border.right: 10
-source: titlebar.png
diff --git a/examples/declarative/places/content/resources/vmenuItem.png b/examples/declarative/places/content/resources/vmenuItem.png
deleted file mode 100644
index 5d60f854..00000000
--- a/examples/declarative/places/content/resources/vmenuItem.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/places/content/resources/vmenuItem.sci b/examples/declarative/places/content/resources/vmenuItem.sci
deleted file mode 100644
index 909567db..00000000
--- a/examples/declarative/places/content/resources/vmenuItem.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 10
-border.top: 12
-border.bottom: 12
-border.right: 10
-source: vmenuItem.png
diff --git a/examples/declarative/places/places.pri b/examples/declarative/places/places.pri
index a8bbc7d9..34c1f946 100644
--- a/examples/declarative/places/places.pri
+++ b/examples/declarative/places/places.pri
@@ -1,23 +1,9 @@
-qmlcontent.files = \
+qmlcontent.files += \
places.qml
OTHER_FILES += $$qmlcontent.files
-qmlcontentdialogs.files = \
- content/dialogs/Dialog.qml \
- content/dialogs/Message.qml \
- content/dialogs/RouteDialog.qml
-OTHER_FILES += $$qmlcontentdialogs.files
-
-qmlcontentmap.files = \
- content/map/MapComponent.qml \
- content/map/MapBaseComponent.qml \
- content/map/MosPlugin.qml \
- content/map/RestPlugin.qml \
- content/map/Marker.qml
-OTHER_FILES += $$qmlcontentmap.files
-
-qmlcontentplaces.files = \
+qmlcontentplaces.files += \
content/places/Group.qml \
content/places/SearchBox.qml \
content/places/CategoryDelegate.qml \
@@ -33,26 +19,8 @@ qmlcontentplaces.files = \
content/places/PlaceReviews.qml \
content/places/ReviewDelegate.qml \
content/places/ReviewPage.qml \
- content/places/PlaceImages.qml
+ content/places/PlaceImages.qml \
+ content/places/MapComponent.qml
OTHER_FILES += $$qmlcontentplaces.files
-qmlcontentcomponents.files = \
- content/components/TextWithLabel.qml \
- content/components/Button.qml \
- content/components/Checkbox.qml \
- content/components/Fader.qml \
- content/components/Optionbutton.qml \
- content/components/Slider.qml \
- content/components/TitleBar.qml \
- content/components/ButtonRow.qml \
- content/components/Menu.qml \
- content/components/IconButton.qml \
- content/components/BusyIndicator.qml
-OTHER_FILES += $$qmlcontentcomponents.files
-
-qmlcontentcomponentsstyle.files = \
- content/components/style/Style.qml \
- content/components/style/ButtonStyle.qml \
- content/components/style/HMenuItemStyle.qml \
- content/components/style/VMenuItemStyle.qml
-OTHER_FILES += $$qmlcontentcomponentsstyle.files
+include(../common/common.pri)
diff --git a/examples/declarative/places/places.qml b/examples/declarative/places/places.qml
index f639c695..d7c9ec9e 100644
--- a/examples/declarative/places/places.qml
+++ b/examples/declarative/places/places.qml
@@ -40,9 +40,7 @@
import QtQuick 2.0
import QtLocation 5.0
-import "content/components"
-import "content/map"
-import "content/dialogs"
+import QtLocation.examples 5.0
import "content/places"
Item {
@@ -288,7 +286,7 @@ Item {
Image {
id: catchImage
- source: "content/resources/catch.png"
+ source: "resources/catch.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
@@ -326,7 +324,7 @@ Item {
if (placesPlugin.supportsMapping) {
if (map)
map.destroy();
- map = Qt.createQmlObject('import QtLocation 5.0; import "content/map"; MapComponent { z : backgroundRect.z + 1; width: page.width; height: page.height; onMapPressed: { page.state = "" }}', page);
+ map = Qt.createQmlObject('import QtLocation 5.0; import "content/places"; MapComponent { z : backgroundRect.z + 1; width: page.width; height: page.height; onMapPressed: { page.state = "" }}', page);
map.plugin = placesPlugin;
} else {
var plugins = getPlugins();
@@ -336,7 +334,7 @@ Item {
if (tempPlugin.supportsMapping) {
if (map)
map.destroy();
- map = Qt.createQmlObject('import QtLocation 5.0; import "content/map"; MapComponent { z : backgroundRect.z + 1; width: page.width; height: page.height; onMapPressed: { page.state = "" }}', page);
+ map = Qt.createQmlObject('import QtLocation 5.0; import "content/places"; MapComponent { z : backgroundRect.z + 1; width: page.width; height: page.height; onMapPressed: { page.state = "" }}', page);
map.plugin = tempPlugin;
break;
}
diff --git a/examples/declarative/places/placeswrapper.pro b/examples/declarative/places/placeswrapper.pro
index fbf9fc6c..7f263cf6 100644
--- a/examples/declarative/places/placeswrapper.pro
+++ b/examples/declarative/places/placeswrapper.pro
@@ -12,4 +12,3 @@ include(places.pri)
target.path = $$[QT_INSTALL_EXAMPLES]/qtlocation/declarative/places
INSTALLS += target
-
diff --git a/examples/declarative/places/placeswrapper.qrc b/examples/declarative/places/placeswrapper.qrc
index 00b5bc98..f4e15bd4 100644
--- a/examples/declarative/places/placeswrapper.qrc
+++ b/examples/declarative/places/placeswrapper.qrc
@@ -1,83 +1,22 @@
<RCC>
<qresource prefix="/">
<file>places.qml</file>
- <file>content/components/style/ButtonStyle.qml</file>
- <file>content/components/style/HMenuItemStyle.qml</file>
- <file>content/components/style/VMenuItemStyle.qml</file>
- <file>content/components/Button.qml</file>
- <file>content/components/Checkbox.qml</file>
- <file>content/components/Fader.qml</file>
- <file>content/components/Menu.qml</file>
- <file>content/components/Optionbutton.qml</file>
- <file>content/components/Slider.qml</file>
- <file>content/components/TextWithLabel.qml</file>
- <file>content/components/TitleBar.qml</file>
- <file>content/dialogs/Dialog.qml</file>
- <file>content/map/MapComponent.qml</file>
- <file>content/map/Marker.qml</file>
- <file>content/resources/button_hovered.png</file>
- <file>content/resources/button_pressed.png</file>
- <file>content/resources/button.png</file>
- <file>content/resources/button.sci</file>
- <file>content/resources/catch.png</file>
- <file>content/resources/checkbox_selected.png</file>
- <file>content/resources/checkbox.png</file>
- <file>content/resources/hmenuItem_hovered.png</file>
- <file>content/resources/hmenuItem_pressed.png</file>
- <file>content/resources/hmenuItem.png</file>
- <file>content/resources/hmenuItem.sci</file>
- <file>content/resources/marker_hovered.png</file>
- <file>content/resources/marker_selected.png</file>
- <file>content/resources/marker.png</file>
- <file>content/resources/node_selected.png</file>
- <file>content/resources/node.png</file>
- <file>content/resources/option_button_selected.png</file>
- <file>content/resources/option_button.png</file>
- <file>content/resources/quit_hovered.png</file>
- <file>content/resources/quit_pressed.png</file>
- <file>content/resources/quit.png</file>
- <file>content/resources/scale.png</file>
- <file>content/resources/titlebar.png</file>
- <file>content/resources/titlebar.sci</file>
- <file>content/resources/vmenuItem.png</file>
- <file>content/resources/vmenuItem.sci</file>
- <file>content/resources/categories.png</file>
- <file>content/resources/categories_hovered.png</file>
- <file>content/resources/categories_pressed.png</file>
- <file>content/places/SearchBox.qml</file>
- <file>content/components/IconButton.qml</file>
- <file>content/components/BusyIndicator.qml</file>
<file>content/places/CategoryDelegate.qml</file>
- <file>content/resources/right_hovered.png</file>
- <file>content/resources/right_pressed.png</file>
- <file>content/resources/right.png</file>
- <file>content/resources/busy.png</file>
- <file>content/resources/left_hovered.png</file>
- <file>content/resources/left_pressed.png</file>
- <file>content/resources/left.png</file>
- <file>content/places/SearchResultView.qml</file>
- <file>content/places/SearchResultDelegate.qml</file>
- <file>content/resources/search_hovered.png</file>
- <file>content/resources/search_pressed.png</file>
- <file>content/resources/search.png</file>
- <file>content/places/PlaceDelegate.qml</file>
- <file>content/resources/star.png</file>
- <file>content/places/RatingView.qml</file>
- <file>content/places/Group.qml</file>
- <file>content/places/ReviewDelegate.qml</file>
- <file>content/places/PlaceReviews.qml</file>
- <file>content/places/ReviewPage.qml</file>
- <file>content/places/PlaceDialog.qml</file>
<file>content/places/CategoryDialog.qml</file>
<file>content/places/EditorialDelegate.qml</file>
<file>content/places/EditorialPage.qml</file>
+ <file>content/places/Group.qml</file>
+ <file>content/places/MapComponent.qml</file>
+ <file>content/places/PlaceDelegate.qml</file>
+ <file>content/places/PlaceDialog.qml</file>
<file>content/places/PlaceEditorials.qml</file>
<file>content/places/PlaceImages.qml</file>
- <file>content/resources/cross_hovered.png</file>
- <file>content/resources/cross_pressed.png</file>
- <file>content/resources/cross.png</file>
- <file>content/resources/pencil_hovered.png</file>
- <file>content/resources/pencil_pressed.png</file>
- <file>content/resources/pencil.png</file>
+ <file>content/places/PlaceReviews.qml</file>
+ <file>content/places/RatingView.qml</file>
+ <file>content/places/ReviewDelegate.qml</file>
+ <file>content/places/ReviewPage.qml</file>
+ <file>content/places/SearchBox.qml</file>
+ <file>content/places/SearchResultDelegate.qml</file>
+ <file>content/places/SearchResultView.qml</file>
</qresource>
</RCC>
diff --git a/examples/declarative/places/qmlplaceswrapper.cpp b/examples/declarative/places/qmlplaceswrapper.cpp
index a0d956a8..9e42c681 100644
--- a/examples/declarative/places/qmlplaceswrapper.cpp
+++ b/examples/declarative/places/qmlplaceswrapper.cpp
@@ -97,6 +97,9 @@ int main(int argc, char *argv[])
const QString mainQmlApp = QLatin1String("qrc:///places.qml");
QQuickView view;
+
+ view.engine()->addImportPath(QLatin1String(":/"));
+
view.rootContext()->setContextProperty(QLatin1String("pluginParameters"), parameters);
view.rootContext()->setContextProperty(QLatin1String("_mobileUi"), false);