-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.qml
88 lines (81 loc) · 2.09 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
import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
ApplicationWindow {
id: app
width: 600
height: 800
visible: true
title: qsTr("Annotation")
Material.theme: theme.checked ? Material.Dark : Material.Light
property var content
Popup {
id: helpwindow
modal: true
focus: true
width: help.width+40
height: help.height+40
margins: 20
anchors.centerIn: parent
Help {
id: help
onCloseMe: helpwindow.close()
}
}
header: ToolBar {
contentHeight: dbase.implicitHeight
ToolButton {
id: dbase
icon.source: "qrc:/icons/database-edit-outline.png"
onClicked: {
if (stackview.depth > 1) {
stackview.pop(StackView.PushTransition);
} else {
stackview.push(file,StackView.PushTransition);
}
}
}
Label {
text: backend.projet
font.bold: true
font.pixelSize: Qt.application.font.pixelSize * 1.4
anchors.centerIn: parent
}
ToolButton {
id: theme
checkable: true
checked: false
icon.source: "qrc:/icons/brightness-6.png"
anchors.right: parent.right
}
ToolButton {
id: helpbutton
icon.source: "qrc:/icons/help-circle-outline.png"
anchors.right: theme.left
onClicked:
helpwindow.open()
}
}
File {
id: file
onCloseMe: {
stackview.pop();
}
onSetUI: {
if(content)content.destroy();
content = Qt.createQmlObject(backend.getMainPage(uifile),stackview,"DynamicPage");
}
}
Page{
id: maininterface
Component.onCompleted: {
stackview.push(file);
}
}
StackView {
id: stackview
initialItem: maininterface
anchors.fill: parent
}
}