This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
110 lines (97 loc) · 2.05 KB
/
main.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
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
import QtQuick 2.11
import QtQuick.Window 2.11
import QtQuick.VirtualKeyboard 2.3
import QtQuick.Controls 2.3
import Smit.Is.Cool 1.0
ApplicationWindow {
id: window
visible: true
height: 640
width: 600
title: qsTr("InfixManipulator")
InfixToPostfix{id:c_interface }
TextField {
id: infixIP
placeholderText: qsTr("Enter Infix exprestion here")
width:parent.width-20
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 30
selectByMouse: true
}
Button {
id: evaluate
anchors.top:infixIP.bottom
anchors.topMargin: 20
anchors.left:parent.left
anchors.leftMargin: 10
text: qsTr("Evaluate")
onClicked: {
postfixOP.text = c_interface.toPostfix(infixIP.text);
ans.text = c_interface.toAns(postfixOP.text)
}
}
TextField {
id: postfixOP
width: parent.width-20
anchors.top: evaluate.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 30
activeFocusOnPress: false
}
Button {
id: copyPostfix
anchors.top:postfixOP.bottom
anchors.topMargin: 20
anchors.left:parent.left
anchors.leftMargin: 10
text: qsTr("Copy Postfix")
onClicked: c_interface.copyToClipBoard(postfixOP.text)
}
TextField {
id: ans
width: parent.width-20
anchors.top: copyPostfix.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 30
activeFocusOnPress: false
}
Button {
id: copyAns
anchors.top:ans.bottom
anchors.topMargin: 20
anchors.left:parent.left
anchors.leftMargin: 10
text: qsTr("Copy Answer")
onClicked: c_interface.copyToClipBoard(ans.text)
}
// on X11 and Windows
InputPanel {
id: inputPanel
z: 99
x: -8
y: 634
width: window.width
active:true
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: window.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
}
}