• 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/MenuItemSwitch.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 2011 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 // Large parts of this file are based on the file MenuItem.qml found
12 // in the Qt Components project with the following disclaimer:
13 
14 /*
15 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
16 ** All rights reserved.
17 ** Contact: Nokia Corporation (qt-info@nokia.com)
18 **
19 ** This file is part of the Qt Components project.
20 **
21 ** You may use this file under the terms of the BSD license as follows:
22 **
23 ** "Redistribution and use in source and binary forms, with or without
24 ** modification, are permitted provided that the following conditions are
25 ** met:
26 ** * Redistributions of source code must retain the above copyright
27 ** notice, this list of conditions and the following disclaimer.
28 ** * Redistributions in binary form must reproduce the above copyright
29 ** notice, this list of conditions and the following disclaimer in
30 ** the documentation and/or other materials provided with the
31 ** distribution.
32 ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
33 ** the names of its contributors may be used to endorse or promote
34 ** products derived from this software without specific prior written
35 ** permission.
36 **
37 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
41 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
48 */
49 
50 import QtQuick 1.1
51 import com.nokia.meego 1.0
52 
53 MenuItem {
54  id: root
55 
56  property alias switchText: root.text
57  property alias checked: switchItem.checked
58 
59  Switch {
60  id: switchItem
61  anchors.verticalCenter: parent.verticalCenter
62  anchors.right: parent.right
63  anchors.margins: 5
64  checked: true
65  }
66 
67  MouseArea {
68  id: mouseArea
69  anchors.fill: parent
70  onClicked: { if (parent.enabled) parent.clicked(); }
71  }
72 
73  onClicked: switchItem.checked = !switchItem.checked
74 }
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