10 import com.nokia.meego 1.0
11 import org.kde.edu.marble 0.11
18 id: spaceViewActivityPage
21 tools: ToolBarLayout {
23 iconSource:
main.
icon(
"actions/go-home", 48 );
31 onCheckedChanged: {
if ( checked ) spaceViewActivityPage.setEarthSettings() }
35 onCheckedChanged: {
if ( checked ) settings.mapTheme =
"moon/clementine/clementine.dgml" }
39 onCheckedChanged: {
if ( checked ) 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 iconSource:
main.
icon(
"actions/show-menu", 48 );
93 visible: earthButton.checked
96 pageMenu.visualParent = menuIcon
110 onCheckedChanged: spaceViewActivityPage.setEarthSettings()
117 onCheckedChanged: spaceViewActivityPage.setEarthSettings()
123 onClicked: dayNightInput.open()
127 titleText:
"Select sun light view"
130 ListElement { name:
"Day" }
131 ListElement { name:
"Night" }
132 ListElement { name:
"Realistic" }
135 onAccepted: spaceViewActivityPage.setEarthSettings()
145 function embedMarbleWidget() {
146 marbleWidget.parent = mapContainer
147 settings.projection =
"Spherical"
148 settings.activeRenderPlugins = settings.defaultRenderPlugins
149 spaceViewActivityPage.setEarthSettings()
150 if (marbleWidget.radius > 655 ) {
151 marbleWidget.radius = 170
153 settings.gpsTracking =
false
154 settings.showPositionIndicator =
false
156 settings.showTrack =
false
157 marbleWidget.visible =
true
160 Component.onDestruction: {
161 if ( marbleWidget.parent === mapContainer ) {
162 marbleWidget.parent = null
163 marbleWidget.visible =
false
169 id: delayedMapThemeSwitch
170 property string theme:
"earth/bluemarble/bluemarble.dgml"
171 interval: 10; running:
false; repeat:
false
172 onTriggered: settings.mapTheme = theme
176 if ( status === PageStatus.Activating ) {
177 mapContainer.embedMarbleWidget()
181 function setEarthSettings() {
182 if (dayNightInput === null || dayNightInput.selectedIndex === 0) {
183 settings.mapTheme =
"earth/bluemarble/bluemarble.dgml"
184 marbleWidget.setGeoSceneProperty(
"citylights",
false )
185 marbleWidget.setGeoSceneProperty(
"clouds_data", cloudsSwitch === null || cloudsSwitch.checked )
186 }
else if (dayNightInput.selectedIndex === 1) {
187 settings.mapTheme =
"earth/citylights/citylights.dgml"
188 marbleWidget.setGeoSceneProperty(
"citylights",
false )
189 marbleWidget.setGeoSceneProperty(
"clouds_data", cloudsSwitch.checked )
191 settings.mapTheme =
"earth/bluemarble/bluemarble.dgml"
192 marbleWidget.setGeoSceneProperty(
"citylights",
true )
193 marbleWidget.setGeoSceneProperty(
"clouds_data", cloudsSwitch.checked )
196 var plugins = settings.activeRenderPlugins
197 if ( satellitesSwitch.checked ) {
198 plugins.push(
"satellites" )
200 settings.removeElementsFromArray( plugins, [
"satellites"] )
202 settings.activeRenderPlugins = plugins