summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-02-10 18:17:11 +0100
committerMichal Klocek <michal.klocek@theqtcompany.com>2015-04-13 14:52:44 +0000
commit8fc647f7c458de87739f45cf3e4cd47d0d35e91b (patch)
tree5281fd4876371c4617b2dd648b4db8232bd5add5 /examples
parenta8193faf3ee531a701706cc23cf7556275d505a0 (diff)
downloadqtlocation-8fc647f7c458de87739f45cf3e4cd47d0d35e91b.tar.gz
Replaces slider and language button with qtquickcontrols.
Change-Id: I0371e55b59062d38a7bde46c0e7f0182e863d92f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/location/mapviewer/content/map/MapComponent.qml42
-rw-r--r--examples/location/mapviewer/mapviewer.qml1
2 files changed, 18 insertions, 25 deletions
diff --git a/examples/location/mapviewer/content/map/MapComponent.qml b/examples/location/mapviewer/content/map/MapComponent.qml
index bebce0e3..a531f08d 100644
--- a/examples/location/mapviewer/content/map/MapComponent.qml
+++ b/examples/location/mapviewer/content/map/MapComponent.qml
@@ -37,10 +37,11 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.4
+import QtQuick.Controls 1.3
import QtLocation 5.3
import QtPositioning 5.2
-import QtLocation.examples 5.0
+import QtLocation.examples 5.0 as OwnControls
//! [top]
Map {
@@ -149,27 +150,18 @@ Map {
anchorPoint.y: poiNokia.sourceItem.height * 1.5
}
-
Slider {
id: zoomSlider;
- minimum: map.minimumZoomLevel;
- maximum: map.maximumZoomLevel;
- opacity: 1
- visible: parent.visible
z: map.z + 3
- anchors {
- bottom: parent.bottom;
- bottomMargin: 15; rightMargin: 10; leftMargin: 90
- left: parent.left
- }
- width: parent.width - anchors.rightMargin - anchors.leftMargin
-
+ minimumValue: map.minimumZoomLevel;
+ maximumValue: map.maximumZoomLevel;
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottomMargin: 15
+ anchors.rightMargin: 10
+ anchors.leftMargin: 90
value: map.zoomLevel
-
- Binding {
- target: zoomSlider; property: "value"; value: map.zoomLevel
- }
-
onValueChanged: {
map.zoomLevel = value
map.state=""
@@ -191,7 +183,7 @@ Map {
}
}
- Menu {
+ OwnControls.Menu {
id:languageMenu
horizontalOrientation: false
autoWidth: true
@@ -627,7 +619,7 @@ Map {
scaleTimer.restart()
}
- Menu {
+ OwnControls.Menu {
id: markerMenu
horizontalOrientation: false
autoWidth: true
@@ -669,7 +661,7 @@ Map {
}
}
- Menu {
+ OwnControls.Menu {
id: drawMenu
horizontalOrientation: false
autoWidth: true
@@ -711,7 +703,7 @@ Map {
}
}
- Menu {
+ OwnControls.Menu {
id: popupMenu
horizontalOrientation: false
autoWidth: true
@@ -751,7 +743,7 @@ Map {
}
}
- Menu {
+ OwnControls.Menu {
id: routeMenu
horizontalOrientation: false
autoWidth: true
@@ -777,7 +769,7 @@ Map {
}
}
- Menu {
+ OwnControls.Menu {
id: pointMenu
horizontalOrientation: false
autoWidth: true
diff --git a/examples/location/mapviewer/mapviewer.qml b/examples/location/mapviewer/mapviewer.qml
index b13d4179..f6f90f84 100644
--- a/examples/location/mapviewer/mapviewer.qml
+++ b/examples/location/mapviewer/mapviewer.qml
@@ -153,6 +153,7 @@ ApplicationWindow {
map.plugin = plugin;
+ map.zoomLevel = (map.maximumZoomLevel - map.minimumZoomLevel)/2
tempGeocodeModel.plugin = plugin;
mapTypeMenu.update();
toolsMenu.update();