-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
140 lines (114 loc) · 3.42 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import QtQuick 2.13
import QtQuick.Window 2.12
import QtQuick.Controls 2.5
import QtGraphicalEffects 1.0
import "ScriptFiles/LoginScreen.js" as LoginLoader
import "Login/"
Window {
visible: true
width: 1280
height: 720
title: qsTr("Beyaz Masa")
Rectangle{
width: 100
height: 20
color: "dimGray"
anchors.bottom: parent.bottom
anchors.left: parent.left
z: 100
Text {
text:Backend.screenType
color: "white"
font.bold: true
font.family: "Tahoma"
font.pointSize : 9
anchors.centerIn: parent
layer.enabled: true
layer.effect: DropShadow{
color: "black"
radius: 3
samples: 5
}
}
}
onWidthChanged: {
Backend.BootWidth = width
}
Component.onCompleted: {
Backend.BootWidth = width
}
MouseArea{
anchors.fill: parent
}
Rectangle{
id: appWindow
color: "#2b534e"
anchors.fill: parent
Component.onCompleted: {
LoginLoader.loadLoginScreen();
}
Rectangle {
width: parent.width
height: parent.height
anchors.centerIn : parent
color: "transparent"
ScrollView {
anchors.fill : parent
clip : true
Flow{
width : parent.parent.width
Rectangle{
width: 200
height: appWindow.height
color: "red"
PersonelQML{
anchors.fill: parent
}
}
Rectangle{
width: parent.width-200
height: appWindow.height
color: "green"
MainMenu{
anchors.fill: parent
}
}
}
}
}
}
Connections {
target: Backend
onMessageChanged: {
var component = Qt.createComponent("qrc:/Comman/MessageDialog.qml");
if (component.status === Component.Ready) {
var sprite = component.createObject(appWindow);
if (sprite === null) {
// Error Handling
console.log("Error creating object");
}else{
sprite.message = _message;
sprite.showDialog();
}
} else if (component.status === Component.Error) {
// Error Handling
console.log("Error loading component:", component.errorString());
}
}
}
Connections{
target: User
onLogined:{
// var component = Qt.createComponent("qrc:/MainMenu.qml");
// if (component.status === Component.Ready) {
// var sprite = component.createObject(appWindow);
// if (sprite === null) {
// console.log("Error creating object");
// }
// } else if (component.status === Component.Error) {
// console.log("Error loading component:", component.errorString());
// }
// LoginLoader.loadPersonelScreen();
}
}
}