-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
150 lines (132 loc) · 4.41 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import QtQuick 2.12
import QtQuick.Window 2.12
import QtMultimedia 5.12
import "./qml-other/settings"
import "./qml-other/panels"
import "./qml-other/funcionality"
Window {
id: root
visible: true
width: 1080/2.5
height: 2340/2.5
color: colorTh.base
title: qsTr("Антидепрессия")
ColorTheme {
id: colorTh
}
SaveSet {
id: setApp
}
Item {
id: container
width: parent.width
height: parent.height
PersonPanel {
id: personPanel
width: parent.width
height: parent.height - bar.height
anchors.top: parent.top
state: "active"
}
ToDoPanel {
id: toDoPanel
width: parent.width
height: parent.height - bar.height
anchors.top: parent.top
anchors.left: personPanel.right
}
Rectangle {
id: bar
height: parent.width * 0.12
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
color: colorTh.base_ext
Image {
id: avatarMenu
source: personPanel.state != "active" ? "qrc:/resources/" + colorTh.icon_dir + "/avatar-off.png"
: "qrc:/resources/" + colorTh.icon_dir + "/avatar.png"
width: parent.height * 0.8
height: width
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: parent.width/5
fillMode: Image.PreserveAspectFit
MouseArea {
anchors.fill: parent
onClicked: {
personPanel.state = "active"
}
}
}
Image {
id: toDoMenu
source: personPanel.state != "deactive" ? "qrc:/resources/" + colorTh.icon_dir + "/ToDo-off.png"
: "qrc:/resources/" + colorTh.icon_dir + "/ToDo-on.png"
width: avatarMenu.width
height: width
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: parent.width/5
fillMode: Image.PreserveAspectFit
MouseArea {
anchors.fill: parent
onClicked: {
personPanel.state = "deactive"
}
}
}
}
FuncDisplay {
id: funcDisp
width: parent.width
height: parent.height
anchors.top: parent.top
anchors.right: parent.left
//anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle {
id: videoPlayer
width: parent.width
height: parent.height
anchors.centerIn: parent
color: colorTh.shadow
visible: false
function run() {
visible = true
player.play()
}
Video {
id: player
width: parent.width
height: width
anchors.centerIn: parent
fillMode: Image.PreserveAspectFit
source: "qrc:/resources/WhatIsDepress.mp4"
autoPlay: false
autoLoad: true
onStopped: {
videoPlayer.visible = false
}
}
Text {
text: qsTr("Нажмите в любую точку экрна,\nчтобы прервать воспроизведение")
font.family: "Segoe UI Semibold"
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: parent.width * 0.05
color: colorTh.contr
anchors.top: player.bottom
anchors.topMargin: height/2
anchors.horizontalCenter: parent.horizontalCenter
}
MouseArea {
anchors.fill: parent
onClicked: {
player.stop()
videoPlayer.visible = false
}
}
}
}
}