-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.qml
91 lines (78 loc) · 2.34 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
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls.Material 2.2
import QtQuick.Window 2.3
import QtQuick.Dialogs 1.3
import "toolcomps"
ApplicationWindow{
//app properties
id: mainWindow
visible: true
width: 800
height: 800
property bool themeColor: cppobj.returnTheme()
property string optionheading:qsTr("exam")
//Material style property
//Material.accent: Material.blue
//Material.elevation :10
//Material.background: Material.BlueGrey
//Material.foreground: Material.LightGreen
//Material.primary: Material.Blue
//pixel density for android
//property real dp: (Screen.pixelDensity *25.4) / 160
title: qsTr("APP1.0")
Material.theme: themeColor ? Material.Light:Material.Dark
Component{
id:toolbaroptions
Toolbaroptions{
height:40
toolbarcolor: Material.color(Material.Teal)
labeltext:optionheading
// source1:qsTr("qrc:/images/black/back_32.png")
// source2:qsTr("qrc:/images/black/settings32.png")
source1:qsTr("qrc:/images/white/back24.png")
source2:qsTr("qrc:/images/white/settings24.png")
}
}
Component{
id:toolbarhome
ToolbarHome{
toolbarheight: 50
labeltext:qsTr("HOME")
//source1:qsTr("qrc:/images/black/list32.png")
source1: Qt.resolvedUrl("qrc:/images/white/list24.png")
Connections{
target: drawerhome
onClosed: {
if(optionmenustate=="iconchanged"){
optionmenustate="";
}
}
}
}
}
// setting the header for the app.
header: Loader {
id:headerloder
focus: true
sourceComponent:stackView.depth>1 ?toolbaroptions:toolbarhome
}
StackView {
id: stackView
property url pageUrl:Qt.resolvedUrl("qrc:/toolcomps/Homepage.qml")
property string stackqquery: null
property string testNoquery: null
initialItem: pageUrl
anchors.fill: parent
}
DrawerHome{
id:drawerhome
height: mainWindow.height-header.height
y: header.height
}
MessageDialoguebox{
id : messageDialog
}
}