11 import com.nokia.meego 1.0
12 import org.kde.edu.marble 0.11
19 id: virtualGlobeActivityPage
22 tools: ToolBarLayout {
24 iconSource:
main.
icon(
"actions/go-home", 48 );
32 iconSource:
main.
icon(
"actions/edit-find", 48 );
37 iconSource:
main.
icon(
"actions/configure", 48 );
39 onClicked: themeDialog.open()
48 titleText:
"Select Map Theme"
49 selectedIndex: mapThemeModel.indexOf(settings.mapTheme)
57 color: index === themeDialog.selectedIndex ?
"lightsteelblue" :
"#00ffffff"
63 source:
"image://maptheme/" + mapThemeId
71 color: index === themeDialog.selectedIndex ?
"black" :
"white"
72 anchors.verticalCenter: parent.verticalCenter
79 themeDialog.selectedIndex = index
81 delayedMapThemeSwitch.theme = mapThemeId
82 delayedMapThemeSwitch.start()
92 anchors.left: parent.left
93 anchors.right: parent.right
94 anchors.top: parent.top
95 visible: searchButton.checked
97 searchField.
busy =
true
98 marbleWidget.find( term )
101 Component.onCompleted: {
102 marbleWidget.search.searchFinished.connect( searchFinished )
105 function searchFinished() {
106 searchField.busy =
false
112 anchors.left: parent.left
113 anchors.right: parent.right
114 anchors.top: searchButton.checked ? searchField.bottom : parent.top
115 anchors.bottom: parent.bottom
117 function embedMarbleWidget() {
118 marbleWidget.parent = mapContainer
119 settings.projection =
"Spherical"
120 settings.activeRenderPlugins = settings.defaultRenderPlugins
121 settings.mapTheme =
"earth/srtm/srtm.dgml"
122 settings.gpsTracking =
false
123 settings.showPositionIndicator =
false
125 settings.showTrack =
false
126 marbleWidget.visible =
true
129 Component.onDestruction: {
130 if ( marbleWidget.parent === mapContainer ) {
131 marbleWidget.parent = null
132 marbleWidget.visible =
false
138 id: delayedMapThemeSwitch
139 property string theme:
"earth/srtm/srtm.dgml"
140 interval: 10; running:
false; repeat:
false
141 onTriggered: settings.mapTheme = theme
145 if ( status === PageStatus.Activating ) {
146 mapContainer.embedMarbleWidget()