-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKhipuMenuOptions.qml
81 lines (75 loc) · 2.27 KB
/
KhipuMenuOptions.qml
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
import QtQuick 2.2
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
/*
This file represents the menu options that appear on the menu
*/
ColumnLayout {
spacing: 30
RowLayout {
Layout.alignment : Qt.AlignHCenter
Text {
text: qsTr("Add a function: ")
}
TextField {
id: consoleInput
onAccepted: {
blackscreen.addFunction(text)
consoleInput.text = ""
}
}
}
Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
ListView{
id: plotView
anchors.fill: parent
model: proxyModel.sourceModel.currentSpace ? proxyModel.sourceModel.currentSpace.model() : null
currentIndex: 0
delegate:
Item{
height: 20
width: parent.width
Text{ text: " " + description }
MouseArea {
anchors.fill: parent
onClicked: {
plotView.currentIndex = index
proxyModel.sourceModel.setPlotCurrentIndex(plotView.currentIndex)
editExpressionDialog.colorChecker = 0
}
onDoubleClicked: {
editExpressionDialog.visible = true
}
}
}
highlight: Rectangle { color: "lightsteelblue" }
highlightFollowsCurrentItem: true
focus: true
}
}
KhipuEditPlotDialog{
id: editExpressionDialog
}
RowLayout {
Layout.alignment : Qt.AlignHCenter
Button{
Text{
anchors.centerIn: parent
text: "Remove"
}
onClicked: proxyModel.sourceModel.removeFunction(plotView.currentIndex);
}
}
/* you can put here future dimensional options, like:
item2d{
visible: khipuModel.currentSpace ? khipuModel.currentSpace.type === "2D" : false
(...)
}
item3d{
visible: khipuModel.currentSpace ? khipuModel.currentSpace.type === "3D" : false
(...)
}
*/
}