-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathImgControlPanel.qml
More file actions
131 lines (112 loc) · 2.93 KB
/
ImgControlPanel.qml
File metadata and controls
131 lines (112 loc) · 2.93 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import QtQuick 2.15
import QtQuick.Controls 2.15
import My 1.0
BasePanel {
id: root
Row {
anchors.leftMargin: 10
id: rows
anchors.bottom: parent.bottom
height: 60
spacing: 10
Button {
text: "Показть в отдельном окне"
width: 150
onClicked: backend.cntrlShowInWindow()
}
Button {
text: "Зашумиь белым"
width: 150
onClicked: backend.cntrlNoize(230, 25, 0)
}
Button {
text: "Зашумиь чёрныйм"
width: 150
onClicked: backend.cntrlNoize(0, 25, 255)
}
Button {
text: "Сравнить размер"
width: 150
onClicked: lbSize.text = backend.cntrlGetCompiredSize()
}
Button {
text: "Удалить линии"
width: 100
onClicked: backend.removeLines()
}
}
Row {
LoadButton {
id: btn
text: "Выгрузить"
useOpenDialog: false
width: 100
onAccepted: {
backend.cntrlExport(filePath)
}
}
Label {
id: lbSize
}
Button {
text: "Убрать шум"
onClicked: backend.removeNoise()
}
}
Row {
anchors.bottom: rows.top
anchors.bottomMargin: 10
Button {
text: "Операция над регионом"
width: 150
onClicked: backend.cntrlLowFreq(spinbox.realValue, addSP.value)
}
SpinBox {
id: addSP
value: 0
from: -255
to: 255
}
SpinBox {
id: spinbox
value: 100
from: -25500
to: 25500
stepSize: 50
property int decimals: 2
property real realValue: value / 100
validator: DoubleValidator {
bottom: Math.min(spinbox.from, spinbox.to)
top: Math.max(spinbox.from, spinbox.to)
}
textFromValue: function (value, locale) {
return Number(value / 100).toLocaleString(locale, 'f',
spinbox.decimals)
}
valueFromText: function (text, locale) {
return Number.fromLocaleString(locale, text) * 100
}
}
Button {
text: "Сортировка"
onClicked: backend.cntrlSortByLen()
}
ComboBox {
id: compCB
textRole: "text"
valueRole: "value"
model: [{
"text": "Матричные точки",
"value": 0
}, {
"text": "Начало матрицы",
"value": 1
}, {
"text": "Поверх",
"value": 2
}]
onCurrentIndexChanged: {
}
}
}
}