11 import com.nokia.meego 1.0
12 import org.kde.edu.marble 0.11
13 import QtMobility.systeminfo 1.1
20 id: trackingActivityPage
23 tools: ToolBarLayout {
25 iconSource:
main.
icon(
"actions/go-home", 48 );
29 iconSource:
main.
icon(
"places/user-identity", 48 );
31 marbleWidget.centerOn( marbleWidget.tracking.lastKnownPosition.longitude, marbleWidget.tracking.lastKnownPosition.latitude )
32 if (marbleWidget.zoom < 22026 ) {
33 marbleWidget.zoom = 4197500
42 iconSource:
main.
icon(
"actions/edit-find", 48 );
46 iconSource:
main.
icon(
"actions/show-menu", 48 );
49 pageMenu.visualParent = menuIcon
62 saveTrackDialog.filename = Qt.formatDateTime(
new Date(),
"yyyy-MM-dd_hh.mm.ss") +
".kml"
63 saveTrackDialog.open()
68 onClicked: openTrackDialog.open()
74 marbleWidget.tracking.autoCenter = checked
81 marbleWidget.tracking.autoZoom = checked
89 anchors.left: parent.left
90 anchors.right: parent.right
91 anchors.top: parent.top
92 visible: searchButton.checked
95 searchField.
busy =
true
96 marbleWidget.find( term )
99 Component.onCompleted: {
100 marbleWidget.search.searchFinished.connect( searchFinished )
103 function searchFinished() {
104 searchField.busy =
false
110 anchors.left: parent.left
111 anchors.right: parent.right
112 anchors.top: searchButton.checked ? searchField.bottom : parent.top
113 anchors.bottom: parent.bottom
116 function embedMarbleWidget() {
117 marbleWidget.parent = mapContainer
118 settings.projection =
"Mercator"
119 var plugins = settings.defaultRenderPlugins
120 settings.removeElementsFromArray(plugins, [
"coordinate-grid",
"sun",
"stars",
"compass"])
121 plugins.push(
"speedometer" )
122 settings.activeRenderPlugins = plugins
123 settings.mapTheme = settings.streetMapTheme
124 settings.gpsTracking =
true
125 settings.showPositionIndicator =
true
127 settings.showTrack =
true
128 marbleWidget.visible =
true
131 Component.onDestruction: {
132 if ( marbleWidget.parent === mapContainer ) {
133 marbleWidget.parent = null
134 marbleWidget.visible =
false
142 folder:
"/home/user/MyDocs"
144 nameFilters: [
"*.kml" ]
146 onAccepted: { marbleWidget.tracking.saveTrack( folder +
"/" + filename ); }
152 folder:
"/home/user/MyDocs"
153 nameFilters: [
"*.kml",
"*.gpx" ]
155 onAccepted: { marbleWidget.tracking.openTrack( folder +
"/" + filename ); }
163 if ( status === PageStatus.Activating ) {
164 mapContainer.embedMarbleWidget()
165 saver.screenSaverDelayed = settings.inhibitScreensaver
166 }
else if ( status === PageStatus.Deactivating ) {
167 saver.screenSaverDelayed =
false