Skip to content

Commit

Permalink
0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker committed Aug 14, 2013
1 parent 7706b54 commit 5c0be61
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
11 changes: 8 additions & 3 deletions plasmoid/contents/calendar/Calendar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,24 @@ Item {
onClicked: { if(!ch) marble.clouds_data_on(); else marble.clouds_data_off(); ch = !ch }
}
MouseArea {
id: marble_default; x: 332; y: 84; width: 11; height: 11; visible: false
id: marble_latlon; x: 332; y: 84; width: 11; height: 11; visible: false
onClicked: { marble.defaultPt() }
}
MouseArea {
id: save_latlon; x: 388; y: 401; width: 11; height: 11; visible: false
onClicked: { marble.saveLatLon() }
}

states: [
State {
name: "earth"
PropertyChanges { target: marble; visible: true }
PropertyChanges { target: marble; visible: true }
PropertyChanges { target: mouse_rotate; visible: false }

PropertyChanges { target: om_off_citylights; visible: true }
PropertyChanges { target: on_off_clouds; visible: true }
PropertyChanges { target: marble_default; visible: true }
PropertyChanges { target: marble_latlon; visible: true }
PropertyChanges { target: save_latlon; visible: true }
}
]
//transform: Rotation { origin.x: 239; origin.y: 239; axis { x: 1; y: 1; z: 0 } angle: 0 }
Expand Down
6 changes: 6 additions & 0 deletions plasmoid/contents/calendar/Marble.qml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ Item{
map.center.latitude = main.lat
map.radius = 100
}
function saveLatLon(){
main.lon = map.center.longitude
main.lat = map.center.latitude
plasmoid.writeConfig("lat", map.center.latitude)
plasmoid.writeConfig("lon", map.center.longitude)
}
}
7 changes: 7 additions & 0 deletions plasmoid/contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,12 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
<label>terraImage</label>
<default></default>
</entry>

<entry name="lat" type="Double">
<default>0</default>
</entry>
<entry name="lon" type="Double">
<default>0</default>
</entry>
</group>
</kcfg>
5 changes: 4 additions & 1 deletion plasmoid/contents/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,14 @@ Rectangle {
var whellState = plasmoid.readConfig("whellState").toString();
var timekeeperState = plasmoid.readConfig("timekeeperState").toString();

if (clockState.length > 0) { clock.state = clockState }
if (whellState.length > 0) { clock.whl_state = whellState }
if (clockState.length > 0) { clock.state = clockState }
if (timekeeperState.length > 0) { timekeeper.state = timekeeperState }
if (mainState.length > 0) { main.state = mainState }

var vlat = plasmoid.readConfig("lat")
var vlon = plasmoid.readConfig("lon")
if (vlat != 0 && vlon != 0 ){ lat = vlat; lon = vlon }
}


Expand Down

0 comments on commit 5c0be61

Please sign in to comment.