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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • apps
  • marble-touch
  • harmattan
harmattan/MarbleWindow.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 Daniel Marth <danielmarth@gmx.at>
8 // Copyright 2012 Dennis Nienhüser <earthwings@gentoo.org>
9 
10 import QtQuick 1.0
11 import com.nokia.meego 1.0
12 import org.kde.edu.marble 0.11
13 
14 PageStackWindow {
15  width: screen.displayWidth
16  height: screen.displayHeight
17 
18  property Item marbleWidget: MainWidget {}
19  property bool inPortrait: width < height
20  property string components: "harmattan"
21 
22  property alias navigationMenu: navigation
23 
24  initialPage: "qrc:/activities/VirtualGlobe.qml"
25 
26  // Stores the settings of the application.
27  MarbleSettings {
28  id: settings
29  }
30 
31  // Displays all available activities and starts them if the user clicks on them.
32  Menu {
33  id: navigation
34  content: ActivitySelectionView {
35  id: activitySelection
36  width: pageStack.currentPage.width-50
37  height: 555
38  onItemSelected: navigation.close()
39  }
40  }
41 
42  function showNavigation() {
43  navigation.open()
44  }
45 
46  function openActivity( activity ) {
47  activitySelection.openActivity( activity )
48  }
49 
50  function openPage( path ) {
51  pageStack.push( path )
52  }
53 
54  Component.onCompleted: {
55  if ( settings.lastActivity === "" ) {
56  activitySelection.initializeDelayed()
57  } else {
58  activitySelection.openActivity( settings.lastActivity )
59  }
60  }
61 
62  function icon( name, size ) {
63  if ( name === "actions/go-previous-view" ) {
64  return "image://theme/icon-m-toolbar-back"
65  } else if ( name === "actions/edit-find" ) {
66  return "image://theme/icon-m-toolbar-search"
67  } else if ( name === "actions/configure" ) {
68  return "image://theme/icon-m-toolbar-settings"
69  } else if ( name === "actions/go-up" ) {
70  return "image://theme/icon-m-toolbar-up"
71  } else if ( name === "places/user-identity" ) {
72  return "image://theme/icon-s-common-location"
73  } else if ( name === "devices/network-wireless" ) {
74  return "qrc:/marble/wireless.svg"
75  } else if ( name === "actions/show-menu" ) {
76  return "image://theme/icon-m-toolbar-view-menu"
77  } else if ( name === "actions/document-edit" ) {
78  return "image://theme/icon-m-toolbar-edit"
79  } else if ( name === "actions/edit-clear-locationbar-rtl" ) {
80  return "image://theme/icon-m-input-clear"
81  } else if ( name === "actions/text-speak" ) {
82  return "image://theme/icon-m-toolbar-volume"
83  } else if ( name === "status/task-attention" ) {
84  return "image://theme/icon-l-error"
85  } else if ( name === "actions/media-playback-start" ) {
86  return "image://theme/icon-m-toolbar-mediacontrol-play"
87  } else if ( name === "actions/dialog-cancel" ) {
88  return "image://theme/icon-s-cancel"
89  } else if ( name === "actions/dialog-close" ) {
90  return "image://theme/icon-s-cancel"
91  } else if ( name === "places/folder" ) {
92  return "image://theme/icon-m-common-directory"
93  } else if ( name === "mimetypes/unknown" ) {
94  return "image://theme/icon-m-content-document"
95  } else if ( name === "places/favorites" ) {
96  return "image://theme/icon-m-toolbar-favorite-mark"
97  } else if ( name === "actions/go-home" ) {
98  return "image://theme/icon-m-toolbar-home"
99  } else if ( name === "actions/download" ) {
100  return "image://theme/icon-s-transfer-download"
101  } else if ( name === "actions/upload" ) {
102  return "image://theme/icon-s-transfer-upload"
103  }
104 
105  return name
106  }
107 }
ActivitySelectionView::openActivity
void openActivity(name)
MarbleSettings
Definition: settings.h:13
ActivitySelectionView
Definition: ActivitySelectionView.qml:16
MainWidget
Definition: MainWidget.qml:18
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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
  • 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