forked from chili-epfl/Carpenter-App-RoofDesigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointContextMenu.qml
More file actions
86 lines (78 loc) · 2.32 KB
/
PointContextMenu.qml
File metadata and controls
86 lines (78 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.2
import "." // to import Settings
Rectangle {
id: pointContextMenu
width: childrenRect.width + 10
height: childrenRect.height
z: Settings.contextMenuZ
radius: Settings.contextMenuRadius
color: Settings.contextMenuColor
visible: false
property Item cx: cx
property Item cy: cy
property Item cz: cz
property Item mx: mx
property Item my: my
property Item mz: mz
RowLayout {
x: 5
spacing: 0
Button {
id: cx
text: "x"
style: TogglableButton { icon: "\uf023" }
onClicked: {
checked = !checked
sketch.setPointReaction("cx", checked, mouseArea.selectTool.selectedItem.identifier);
}
}
Button {
id: cy
text: "y"
style: TogglableButton { icon: "\uf023" }
onClicked: {
checked = !checked
sketch.setPointReaction("cy", checked, mouseArea.selectTool.selectedItem.identifier);
}
}
Button {
id: cz
text: "z"
style: TogglableButton { icon: "\uf023" }
onClicked: {
checked = !checked
sketch.setPointReaction("cz", checked, mouseArea.selectTool.selectedItem.identifier);
}
}
Button {
id: mx
text: "x"
style: TogglableButton { icon: "\uf01e" }
onClicked: {
checked = !checked
sketch.setPointReaction("mx", checked, mouseArea.selectTool.selectedItem.identifier);
}
}
Button {
id: my
text: "y"
style: TogglableButton { icon: "\uf01e" }
onClicked: {
checked = !checked
sketch.setPointReaction("my", checked, mouseArea.selectTool.selectedItem.identifier);
}
}
Button {
id: mz
text: "z"
style: TogglableButton { icon: "\uf01e" }
onClicked: {
checked = !checked
sketch.setPointReaction("mz", checked, mouseArea.selectTool.selectedItem.identifier);
}
}
}
}