• 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
  • examples
  • qml
  • google-search
google-search.qml
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 import Qt 4.7
12 import org.kde.edu.marble 0.11
13 
14 Rectangle {
15  width: 700
16  height: 700
17 
18  SystemPalette { id: activePalette }
19 
20  Image {
21  x: 113
22  y: 0
23  source: "marble.png"
24  anchors.horizontalCenter: parent.horizontalCenter
25  }
26 
27  Rectangle {
28  id: searchinput
29  x: 38
30  y: 117
31  width: 565
32  height: 49
33  border.color: "black"
34  border.width: 1
35  anchors.horizontalCenter: parent.horizontalCenter
36 
37  TextInput {
38  anchors.fill: parent
39  anchors.margins: 10
40  id: searchterm
41  text: ""
42  font.pointSize: 18
43  focus: true
44  }
45  }
46 
47  Item {
48  id: buttonlayouter
49  anchors.top: searchinput.bottom
50  anchors.horizontalCenter: parent.horizontalCenter
51  anchors.margins: 10
52  height: button1.height
53 
54  Button {
55  id: button1
56  anchors.right: buttonlayouter.horizontalCenter
57  anchors.margins: 10
58  width: 126
59  height: 25
60  label: "Marble Search"
61 
62  onClicked: { map.search.find( searchterm.text ) }
63  }
64 
65  Button {
66  id: button2
67  anchors.left: buttonlayouter.horizontalCenter
68  anchors.margins: 10
69  width: 140
70  height: 25
71  label: "I'm Feeling Lucky"
72  }
73  }
74 
75  Item {
76  id: mapcontainer
77  width: 600
78  height: 400
79  anchors.horizontalCenter: buttonlayouter.horizontalCenter
80  anchors.top: buttonlayouter.bottom
81  anchors.margins: 30
82  clip: true
83 
84  MarbleWidget {
85  id: map
86  width: 600
87  height: 400
88  activeRenderPlugins: [ "navigation", "scalebar" ]
89 
90  property Search search: Search {
91  map: map
92  placemarkDelegate: myDelegate
93  }
94  }
95 
96  Component {
97  id: myDelegate
98 
99  Image {
100  source: "marker.svg"
101  fillMode: Image.PreserveAspectFit
102  width: 64;
103  height: 64
104 
105  property bool showDetails: false
106 
107  Text {
108  anchors.horizontalCenter: parent.horizontalCenter
109  anchors.bottom: parent.bottom
110  width: parent.width
111  height: parent.height
112  wrapMode: Text.WrapAtWordBoundaryOrAnywhere
113  color: "white"
114  text: index+1
115  horizontalAlignment: Text.AlignHCenter
116  }
117 
118  Rectangle
119  {
120  anchors.left: parent.right
121  id: itemdetails
122  scale: 0.75
123  width: 140
124  height: 60
125  color: "yellow"
126  radius: 10
127  border.width: 1
128  border.color: "gray"
129  z: 42
130 
131  visible: parent.showDetails
132 
133  Text {
134  id: itemdetailtext
135  x: 10
136  y: 5
137  width: parent.width - 20
138  height: parent.height - 10
139  text: display
140  wrapMode: "WrapAtWordBoundaryOrAnywhere"
141  clip: true
142  }
143 
144  states: State {
145  name: "back"
146  PropertyChanges { target: itemdetails; scale: 1 }
147  when: itemdetailtext.visible
148  }
149 
150  transitions: Transition {
151  NumberAnimation { properties: "scale"; duration: 100 }
152  }
153  }
154 
155  MouseArea {
156  anchors.fill: parent
157  onClicked: showDetails = !showDetails
158  }
159  }
160  }
161  }
162 }
search
Definition: google-search.qml:12
Button
Definition: cloud-sync/Button.qml:11
Marble::radius
static qreal radius(qreal zoom)
Definition: thumbnailer.cpp:99
Search
Definition: Search.qml:15
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 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