-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.qml
More file actions
45 lines (40 loc) · 1.06 KB
/
main.qml
File metadata and controls
45 lines (40 loc) · 1.06 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
import QtQuick
import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects
import QtCharts 6.3
import Qt.labs.qmlmodels 1.0
import QtQuick.Dialogs
import "."
ApplicationWindow {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
menuBar: MenuBar {
Menu {
title: qsTr("&Файл")
Action { text: qsTr("Відкрити спектр")
onTriggered: { fileDialog.open() }
}
Action { text: qsTr("Зберегти спектр") }
Action { text: qsTr("Зберегти CSV") }
}
}
FileDialog {
id: fileDialog
title: "Please choose a file"
onAccepted: {
var filePath = fileDialog.selectedFile.toString().replace("file:///",'')
console.log("You chose: " + filePath)
//fileSelected(filePath)
winSpectr.updateSpectrum(filePath)
}
onRejected: {
console.log("Canceled")
}
}
WinSpectr {
id: winSpectr
anchors.fill: parent
}
}