• 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
MapThemeSelectionPage.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 
14 /*
15  * Page to select map theme from a list.
16  */
17 Page {
18  tools: ToolBarLayout {
19  MarbleToolIcon {
20  iconSource: main.icon( "actions/go-previous-view", 48 );
21  onClicked: pageStack.pop()
22  }
23  }
24 
25  ListView {
26  id: mapListView
27  anchors.fill: parent
28  anchors.margins: UiConstants.DefaultMargin
29  highlightFollowsCurrentItem: true
30  model: marbleWidget.mapThemeModel
31 
32  // Delegate that displays a preview image and the name of the map theme.
33  delegate:
34  Rectangle {
35  id: themeItem
36  width: mapListView.width
37  height: mapImage.height + 5
38  // Highlight current map theme with a blue background.
39  color: mapThemeId === settings.mapTheme ? "lightsteelblue" : "white"
40  Row {
41  anchors.verticalCenter: parent.verticalCenter
42  anchors.left: parent.left
43  anchors.leftMargin: 15
44  // Preview image of the map theme.
45  Image {
46  id: mapImage
47  source: "image://maptheme/" + mapThemeId
48  }
49  // Label with the name of the map theme.
50  Label {
51  id: themeLabel
52  text: display
53  anchors.verticalCenter: parent.verticalCenter
54  }
55  }
56  // If the user clicks on a theme, use it for the map.
57  MouseArea {
58  anchors.fill: parent
59  onClicked: {
60  mapListView.currentIndex = index
61  settings.mapTheme = mapThemeId
62  }
63  }
64  }
65  }
66 }
Rectangle
MarbleWindow::icon
void icon(name, size)
MarbleToolIcon
Definition: harmattan/MarbleToolIcon.qml:10
main
Definition: main.qml:12
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