• 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
  • plasma
plasma/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 org.kde.edu.marble 0.11
11 import QtQuick 1.0
12 import com.nokia.meego 1.0
13 
14 Item {
15  width: 800
16  height: 480
17 
18  property bool inPortrait: height > width
19  //property variant initialPage: activitySelection
20  property Item marbleWidget: MainWidget {}
21  property string components: "plasma"
22 
23  property alias navigationMenu: navigation
24 
25  property variant initialPage: "qrc:/activities/VirtualGlobe.qml"
26 
27  Item {
28  id: contentArea
29  anchors.fill: parent
30 
31  PageStack {
32  id: pageStack
33  anchors.top: parent.top
34  anchors.left: parent.left
35  anchors.right: parent.right
36  anchors.bottom: toolBar.top
37  toolBar: toolBar
38  clip: true
39  }
40 
41  ToolBar {
42  id: toolBar
43  anchors.bottom: parent.bottom
44  anchors.left: parent.left
45  anchors.right: parent.right
46  }
47  }
48 
49  Menu {
50  id: navigation
51  content: ActivitySelectionView {
52  id: activitySelection
53  width: 300
54  height: 555
55  onItemSelected: navigation.close()
56  }
57  }
58 
59  // Stores the settings of the application.
60  MarbleSettings {
61  id: settings
62  }
63 
64  function showNavigation() {
65  navigation.open()
66  }
67 
68  function openActivity( activity ) {
69  activitySelection.openActivity( activity )
70  }
71 
72  function openPage( path ) {
73  pageStack.push( path )
74  }
75 
76  function icon( name, size ) {
78  var base = "/usr/share/icons/oxygen/" + size + "x" + size
79  return base + "/" + name + ".png"
80  }
81 
82  Component.onCompleted: {
83  pageStack.push(main.initialPage)
84  if ( settings.lastActivity === "" ) {
85  activitySelection.initializeDelayed()
86  } else {
87  activitySelection.openActivity( settings.lastActivity )
88  }
89  }
90 }
MarbleSettings
Definition: settings.h:13
main
Definition: examples/cpp/marbleQuick2/main.qml:3
MarbleWindow::initialPage
variant initialPage
Definition: plasma/MarbleWindow.qml:23
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