-
Notifications
You must be signed in to change notification settings - Fork 3
/
Main.qml
65 lines (52 loc) · 1.29 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
import QtQuick 2.8
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
// import QtQuick.Dialogs 1.2
import "qrc:/js/database.js" as DB
import "qrc:/js/initialize.js" as Initializer
import "qrc:/js/nav.js" as NavHelper
import Scaleconf
ApplicationWindow {
id: window
visible: true
width: 500
height: 700
property alias drawerPosition: menu.position
//run app startup code
Component.onCompleted: Initializer.startup()
//set the tool bar to the header
header: TopBar{id:topBar}
//declare the nav menu container
NavMenu{id: menu}
//declare the page manager
StackView{
id:pages
anchors.fill: parent
initialItem: "qrc:/qt/qml/Scaleconf/qml/pages/Home/Home.qml"
}
ErrorModal {
id: errorDialog
}
ScheduleAddedModal {
id: addedModal
}
EventAlreadySavedModal {
id: savedAlreadyModal
}
ScheduleDeleteModal {
id: confirmDelete
onAccepted: {
console.log("deleting: " + talkTitle);
DB.remove_schedule_entry(talkTitle);
model.clear();
DB.get_schedule_list(model);
this.close()
}
}
onClosing: {
close.accepted = false;
if(pages.depth > 1){
pages.pop();
}
}
}