Warning, /education/marble/src/apps/marble-maps/PositionButton.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2015 Gábor Péterffy <peterffy95@gmail.com>
0004 //
0005 
0006 
0007 import QtQuick 2.3
0008 import QtQuick.Window 2.2
0009 
0010 Item {
0011     id: root
0012 
0013     property alias diameter: button.diameter
0014     property alias iconSource: button.iconSource
0015     property real angle: 0
0016     property alias showDirection: indicator.visible
0017 
0018     signal clicked()
0019 
0020     Image {
0021         id: indicator
0022         anchors {
0023             horizontalCenter: button.horizontalCenter
0024             verticalCenter: button.verticalCenter
0025         }
0026         width: root.diameter
0027         height: root.diameter
0028         source: "qrc:///backdrop.png"
0029         transform: Rotation {
0030             origin {
0031                 x: indicator.width / 2
0032                 y: indicator.height / 2
0033             }
0034             axis {
0035                 x: 0
0036                 y: 0
0037                 z: 1
0038             }
0039             angle: root.angle + 45
0040         }
0041     }
0042 
0043     CircularButton {
0044         id: button
0045         onClicked: root.clicked()
0046         anchors {
0047             horizontalCenter: parent.horizontalCenter
0048             verticalCenter: parent.verticalCenter
0049         }
0050     }
0051 
0052     width: 1.41 * diameter
0053     height: width
0054 }