-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
75 lines (70 loc) · 1.81 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
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.1
import Backend 1.0
ApplicationWindow {
id: main_window
visible: true
width: 640
height: 680
//color: "transparent"
//flags: Qt.FramelessWindowHint
title: qsTr("NiceGlass")
property alias swipeView: swipeView
property alias tabBar: tabBar
property alias homePage: homePage
minimumHeight: 250
minimumWidth: 300
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: tabBar.currentIndex
HomePage {
id: homePage
objectName: "homePage"
}
LedConfigPage {
id: configPage
}
}
ConfigurationWindow {
id: configurationWindow
width: 0.5 * parent.width
height: 0.6 * parent.height
}
footer: TabBar {
id: tabBar
height: main_window.height * 0.1
currentIndex: swipeView.currentIndex
TabButton {
id: tabButtonInicio
height: parent.height
text: qsTr("Início")
font.pointSize: parent.height? parent.height/1.5 : 20
onPressed: {swipeView.setCurrentIndex(0)}
}
TabButton {
id: tabButtonConfig
height: parent.height
text: qsTr("LED")
font.pointSize: parent.height? parent.height/1.5 : 20
onPressed: {swipeView.setCurrentIndex(1)}
}
}
Backend{
id: backend
onSerialOpened: console.debug("Opened");
onNewMsgDialog: {
msgDialog.title = title;
msgDialog.text = msg;
msgDialog.open();
}
}
MessageDialog {
id: msgDialog
title: "stdtitle"
text: "stdtext"
//standardButtons: Dialog.Ok
}
}