• 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
  • plugins
  • declarative
MarbleSettings.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 org.kde.edu.marble 0.11
12 
13 /*
14  * Settings of the application.
15  */
16 Item {
17  id: root
18 
19  // Instance of the C++ class that manages the settings.
20  Settings {
21  id: settings
22  }
23 
24  // Load settings from file.
25  property string mapTheme: settings.value( "MarbleWidget", "mapTheme", "earth/openstreetmap/openstreetmap.dgml" )
26  property string streetMapTheme: settings.value( "MarbleTouch", "streetMapTheme", "earth/openstreetmap/openstreetmap.dgml" )
27  property bool workOffline: settings.value( "MainWindow", "workOffline", false )
28  property real quitLongitude: settings.value( "MarbleWidget", "quitLongitude", 0.0 )
29  property real quitLatitude: settings.value( "MarbleWidget", "quitLatitude", 0.0 )
30  property real lastKnownLongitude: settings.value( "MarbleWidget", "lastKnownLongitude", 0.0 )
31  property real lastKnownLatitude: settings.value( "MarbleWidget", "lastKnownLatitude", 0.0 )
32  property real quitRadius: settings.value( "MarbleWidget", "quitRadius", 148.0 )
33  property bool gpsTracking: settings.value( "MarbleWidget", "gpsTracking", false )
34  property bool showPositionIndicator: settings.value( "MarbleWidget", "showPositionIndicator", false )
35  property bool showTrack: settings.value( "MarbleWidget", "showTrack", false )
36  property string projection: settings.value( "MarbleWidget", "projection", "Spherical" )
37  property variant defaultRenderPlugins: ["compass", "coordinate-grid", "progress",
38  "crosshairs", "stars", "scalebar"]
39  property variant activeRenderPlugins: settings.value( "MarbleWidget", "activeRenderPlugins", defaultRenderPlugins )
40  property string lastActivity: settings.value( "MarbleTouch", "lastActivity", "" )
41  property bool inhibitScreensaver: settings.value( "MarbleTouch", "inhibitScreensaver", true )
42  property bool voiceNavigationMuted: settings.value( "MarbleTouch", "voiceNavigationMuted", false)
43  property bool voiceNavigationSoundEnabled: settings.value( "MarbleTouch", "voiceNavigationSoundEnabled", false)
44  property string voiceNavigationSpeaker: settings.value( "MarbleTouch", "voiceNavigationSpeaker", "English - Bugsbane")
45  property bool navigationStartupWarning: settings.value( "MarbleTouch", "navigationStartupWarning", false)
46  property bool navigationStartupWarningEverShown: settings.value( "MarbleTouch", "navigationStartupWarningEverShown", false)
47  property string changelogShown: settings.value( "MarbleTouch", "changelogShown", "" )
48  property string owncloudSync: settings.value( "MarbleTouch", "owncloudSync", false )
49  property string owncloudServer: settings.value( "MarbleTouch", "owncloudServer", "" )
50  property string owncloudUsername: settings.value( "MarbleTouch", "owncloudUsername", "" )
51  property string owncloudPassword: settings.value( "MarbleTouch", "owncloudPassword", "" )
52 
53  // Save settings to file.
54  Component.onDestruction: {
55  settings.setValue( "MarbleWidget", "mapTheme", root.mapTheme )
56  settings.setValue( "MainWindow", "workOffline", root.workOffline )
57  settings.setValue( "MarbleWidget", "quitLongitude", root.quitLongitude )
58  settings.setValue( "MarbleWidget", "quitLatitude", root.quitLatitude )
59  settings.setValue( "MarbleWidget", "lastKnownLongitude", root.lastKnownLongitude )
60  settings.setValue( "MarbleWidget", "lastKnownLatitude", root.lastKnownLatitude )
61  settings.setValue( "MarbleWidget", "quitRadius", root.quitRadius )
62  settings.setValue( "MarbleWidget", "gpsTracking", root.gpsTracking )
63  settings.setValue( "MarbleWidget", "showPositionIndicator", root.showPositionIndicator )
64  settings.setValue( "MarbleWidget", "showTrack", root.showTrack )
65  settings.setValue( "MarbleWidget", "projection", root.projection )
66  settings.setValue( "MarbleWidget", "activeRenderPlugins", root.activeRenderPlugins )
67  settings.setValue( "MarbleTouch", "lastActivity", root.lastActivity )
68  settings.setValue( "MarbleTouch", "streetMapTheme", root.streetMapTheme )
69  settings.setValue( "MarbleTouch", "inhibitScreensaver", root.inhibitScreensaver )
70  settings.setValue( "MarbleTouch", "voiceNavigationMuted", root.voiceNavigationMuted )
71  settings.setValue( "MarbleTouch", "voiceNavigationSoundEnabled", root.voiceNavigationSoundEnabled )
72  settings.setValue( "MarbleTouch", "voiceNavigationSpeaker", root.voiceNavigationSpeaker )
73  settings.setValue( "MarbleTouch", "navigationStartupWarning", root.navigationStartupWarning )
74  settings.setValue( "MarbleTouch", "navigationStartupWarningEverShown", root.navigationStartupWarningEverShown )
75  settings.setValue( "MarbleTouch", "changelogShown", root.changelogShown )
76  settings.setValue( "MarbleTouch", "owncloudSync", root.owncloudSync )
77  settings.setValue( "MarbleTouch", "owncloudServer", root.owncloudServer )
78  settings.setValue( "MarbleTouch", "owncloudUsername", root.owncloudUsername )
79  settings.setValue( "MarbleTouch", "owncloudPassword", root.owncloudPassword )
80  }
81 
82  function removeElementsFromArray(array, elements) {
83  for( var j=0; j<elements.length; j++) {
84  for( var i=0; i<array.length; i++) {
85  if (array[i] === elements[j]) {
86  array.splice(i,1)
87  }
88  }
89  }
90  }
91 }
Settings
Definition: Settings.h:17
Settings::value
QVariant value(const QString &group, const QString &key, const QVariant &value=QVariant()) const
Definition: Settings.cpp:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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