• 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
SearchField.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 
13 /*
14  * A textfield for searching locations.
15  */
16 TextField {
17  id: searchField
18  signal search( string term )
19  property bool busy: false
20 
21  placeholderText: "Search..."
22  // Icon to clear text in the textfield.
23  MarbleToolIcon {
24  id: clearButton
25  iconSource: main.icon( "actions/edit-clear-locationbar-rtl", 22 );
26  anchors.top: searchField.top
27  anchors.right: searchField.right
28  anchors.rightMargin: 5
29  height: parent.height - 2
30  width: parent.height - 2
31  visible: !parent.busy
32  // Reset text and clear search.
33  onClicked: {
34  searchField.text = ""
35  searchField.search( text )
36  }
37  }
38 
39  BusyIndicator {
40  anchors.verticalCenter: searchField.verticalCenter
41  anchors.right: searchField.right
42  anchors.rightMargin: 15
43  visible: searchField.busy
44  running: searchField.busy
45  }
46 
47  Keys.onPressed: {
48  if( event.key === Qt.Key_Return || event.key === Qt.Key_Enter ) {
49  searchField.search( text )
50  }
51  }
52 }
search
Definition: google-search.qml:12
Search
Definition: Search.qml:15
MarbleWindow::icon
void icon(name, size)
MarbleToolIcon
Definition: harmattan/MarbleToolIcon.qml:10
main
Definition: examples/cpp/marbleQuick2/main.qml:3
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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