QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PipState.qml
Go to the documentation of this file.
1import QtQuick
2
3// Used to manage state for itesm using with QGCPipOveral
4Item {
5 id: control
6 state: initState
7
8 readonly property string initState: "init"
9 readonly property string pipState: "pip"
10 readonly property string fullState: "full"
11 readonly property string windowState: "window"
12
13 property var pipView // PipView control
14 property bool isDark: true // true: Use dark overlay visuals
15
16 property var _viewControl: control.parent
17
18 states: [
19 State {
20 name: pipState
21
22 AnchorChanges {
23 target: _viewControl
24 anchors.top: pipView._pipContentItem.top
25 anchors.bottom: pipView._pipContentItem.bottom
26 anchors.left: pipView._pipContentItem.left
27 anchors.right: pipView._pipContentItem.right
28 }
29
30 ParentChange {
31 target: _viewControl
32 parent: pipView._pipContentItem
33 }
34 },
35 State {
36 name: fullState
37
38 AnchorChanges {
39 target: _viewControl
40 anchors.top: pipView.parent.top
41 anchors.bottom: pipView.parent.bottom
42 anchors.left: pipView.parent.left
43 anchors.right: pipView.parent.right
44 }
45
46 ParentChange {
47 target: _viewControl
48 parent: pipView.parent
49 }
50 },
51 State {
52 name: windowState
53
54 AnchorChanges {
55 target: _viewControl
56 anchors.top: pipView._windowContentItem.top
57 anchors.bottom: pipView._windowContentItem.bottom
58 anchors.left: pipView._windowContentItem.left
59 anchors.right: pipView._windowContentItem.right
60 }
61
62 ParentChange {
63 target: _viewControl
64 parent: pipView._windowContentItem
65 }
66
67 StateChangeScript {
68 script: pipView.showWindow()
69 }
70 }
71 ]
72}