QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
CameraTriggerIndicator.qml
Go to the documentation of this file.
1import QtQuick
2import QtLocation
3import QtQuick.Controls
4
5import QGroundControl
6import QGroundControl.Controls
7
8/// Marker for displaying a camera trigger on the map
9MapQuickItem {
10 anchorPoint.x: sourceItem.width / 2
11 anchorPoint.y: sourceItem.height / 2
12
13 sourceItem: Rectangle {
14 width: _radius * 2
15 height: _radius * 2
16 radius: _radius
17 color: "black"
18 opacity: 0.4
19
20 readonly property real _radius: ScreenTools.defaultFontPixelHeight * 0.6
21
22 // Bigger rectangle of camera icon
23 Rectangle {
24 id: cameraIconFrameRectangle
25 anchors.horizontalCenter: parent.horizontalCenter
26 anchors.verticalCenter: parent.verticalCenter
27 height: width * 0.6
28 width: parent.width * 0.6
29 color: qgcPal.window
30 radius: 4
31
32 // Little rectangle on top indicating viewfinder
33 Rectangle {
34 id: cameraIconViewFinderRectangle
35 anchors.horizontalCenter: cameraIconFrameRectangle.horizontalCenter
36 anchors.bottom: cameraIconFrameRectangle.top
37 width: cameraIconFrameRectangle.width * 0.5
38 height: cameraIconFrameRectangle.height * 0.3
39 color: qgcPal.window
40 radius: 2
41 }
42 }
43
44 // Circunference indicating the lens
45 Rectangle {
46 id: cameraIconLens
47 anchors.centerIn: cameraIconFrameRectangle
48 height: width
49 width: cameraIconFrameRectangle.height * 0.9
50 color: "transparent"
51 border.color: "black"
52 opacity: 0.9
53 border.width: 2
54 radius: width * 0.5
55 }
56 }
57}