-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
119 lines (102 loc) · 3.02 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
import QtQuick 2.4
import QtQuick.Controls 1.3
import CCCMedia 1.0
import "Conference"
ApplicationWindow {
title: qsTr("CCC media")
width: 640
height: 480
visible: true
property int tileWidth: width / 3
property int tileHeight: height / 3
menuBar: MenuBar {
Menu {
title: qsTr("&File")
MenuItem {
text: qsTr("E&xit")
onTriggered: Qt.quit();
}
}
}
toolBar: ToolBar {
visible: mainView.state != ViewState.Main
ToolButton {
id: backButton
height: parent.height
text: qsTr("Back")
onClicked: {
if (mainView.state == ViewState.Conference) {
mainView.state = ViewState.Conferences ;
} else {
mainView.state = ViewState.Main
}
}
}
}
Rectangle {
id: mainView
anchors.fill: parent
color: "#2F2F2F"
state: ViewState.Main
MainMenu {
id: mainMenu
visible: false
anchors.fill: parent
color: "transparent"
onConferences: mainView.state = ViewState.Conferences
onEvents: mainView.state = ViewState.Events
onRecordings: mainView.state = ViewState.Recordings
onSettings: mainView.state = ViewState.Settings
}
Conference {
id: conference
visible: false
anchors.fill: parent
color: "transparent"
}
Conferences {
id: conferences
visible: false
anchors.fill: parent
color: "transparent"
onConferenceSelected: {
conference.conferenceUrl = url
mainView.state = ViewState.Conference
}
}
Events {
id: events
visible: false
anchors.fill: parent
color: "transparent"
}
Recordings {
id: recordings
visible: false
anchors.fill: parent
color: "transparent"
}
Settings {
id: settings
visible: false
anchors.fill: parent
color: "transparent"
}
onStateChanged: {
mainMenu.visible = state == ViewState.Main;
conference.visible = state == ViewState.Conference;
conferences.visible = state == ViewState.Conferences;
events.visible = state == ViewState.Events;
recordings.visible = state == ViewState.Recordings;
settings.visible = state == ViewState.Settings;
}
states: [
State { name: ViewState.Main },
State { name: ViewState.Conference },
State { name: ViewState.Conferences },
State { name: ViewState.Events },
State { name: ViewState.Recordings },
State { name: ViewState.Settings }
]
}
}