• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • apps
  • marble-touch
  • activities
Friends.qml
Go to the documentation of this file.
1 // This file is part of the Marble Virtual Globe.
2 //
3 // This program is free software licensed under the GNU LGPL. You can
4 // find a copy of this license in LICENSE.txt in the top directory of
5 // the source code.
6 //
7 // Copyright 2011 Dennis Nienhüser <earthwings@gentoo.org>
8 // Copyright 2011 Daniel Marth <danielmarth@gmx.at>
9 
10 import QtQuick 1.0
11 import com.nokia.meego 1.0
12 import org.kde.edu.marble 0.11
13 import ".."
14 
15 /*
16  * Page for friends (social, opendesktop) activity.
17  */
18 Page {
19  id: friendsActivityPage
20  anchors.fill: parent
21 
22  tools: ToolBarLayout {
23  MarbleToolIcon {
24  iconSource: main.icon( "actions/go-home", 48 );
25  onClicked: main.showNavigation()
26  }
27  MarbleToolIcon {
28  iconSource: main.icon( "places/user-identity", 48 );
29  onClicked: {
30  marbleWidget.centerOn( marbleWidget.tracking.lastKnownPosition.longitude, marbleWidget.tracking.lastKnownPosition.latitude )
31  if (marbleWidget.zoom < 22026 ) {
32  marbleWidget.zoom = 86250
33  }
34  }
35  }
36 
37  Item {}
38  }
39 
40  Item {
41  clip: true
42  id: mapContainer
43  anchors.fill: parent
44 
45  function embedMarbleWidget() {
46  marbleWidget.parent = mapContainer
47  settings.projection = "Mercator"
48  var plugins = settings.defaultRenderPlugins
49  settings.removeElementsFromArray(plugins, ["coordinate-grid", "sun", "stars", "compass"])
50  plugins.push( "opendesktop" )
51 
52  settings.activeRenderPlugins = plugins
53  settings.mapTheme = settings.streetMapTheme
54  settings.gpsTracking = true
55  settings.showPositionIndicator = true
56  marbleWidget.tracking.positionMarkerType = Tracking.Circle
57  settings.showTrack = false
58  marbleWidget.visible = true
59  }
60 
61  Component.onDestruction: {
62  if ( marbleWidget.parent === mapContainer ) {
63  marbleWidget.parent = null
64  marbleWidget.visible = false
65  }
66  }
67  }
68 
69  onStatusChanged: {
70  if ( status === PageStatus.Activating ) {
71  mapContainer.embedMarbleWidget()
72  }
73  }
74 }
Tracking
Definition: Tracking.qml:16
Tracking::Circle
Definition: Tracking.h:48
Item
MarbleWindow::icon
void icon(name, size)
MarbleToolIcon
Definition: harmattan/MarbleToolIcon.qml:10
MarbleWindow::showNavigation
void showNavigation()
main
Definition: main.qml:12
Page
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal