forked from FEC-SIH-23/Blind-FEC-Extractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnalysisButton.qml
59 lines (54 loc) · 1.48 KB
/
AnalysisButton.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
// AnalyseButton.qml
// import QtQuick 2.15
import QtQuick 2.2
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import QtQuick.Dialogs
import QtCore
Rectangle {
width: 170
height: 170
radius: 170 / 2
// color: "#FF5440"
property alias buttonText: btext.text
property alias imageSource: hotImage.source
property int uploadFlag
Image {
id: hotImage
width: 25 * 1.5
height: 25 * 1.5
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "analyse.svg"
}
Text {
id: btext
anchors.top: hotImage.bottom
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 32/2
color: "#1E1A1D"
text: "Analyse"
}
MouseArea {
id: mouse
anchors.fill: parent
onClicked: if ( uploadFlag === 0 ) {
// stackView.push("Loading.qml")window.inputText
stackView.push("Loading.qml", {uploadFlag: "0"})
}
else {
fileDialog.open()
// stackView.push("Loading.qml")
}
}
FileDialog {
id: fileDialog
// currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
onAccepted: {
console.log(selectedFile)
// stackView.push("Loading.qml")
window.inputText = selectedFile
stackView.push("Loading.qml", {uploadFlag: "1"})
}
}
}