Refactor alarm system and replace notification method

The old OpenVR overlays did not function for unknown reasons, and it was
not possible to get them to work.

With this a white overlay with ALARM ACTIVATED will be shown for 3 seconds.
It's not pretty, but it effectively communicates that an alarm has been
activated.

This fixes
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/417
This commit is contained in:
Vasily
2020-06-05 20:52:13 +02:00
committed by username223
parent 8c2af7477c
commit 4757756d32
16 changed files with 531 additions and 457 deletions
+50
View File
@@ -0,0 +1,50 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
MyComboBox {
textRole: "text"
valueRole: "value"
model: [
{ value: 0, text: "00" },
{ value: 1, text: "01" },
{ value: 2, text: "02" },
{ value: 3, text: "03" },
{ value: 4, text: "04" },
{ value: 5, text: "05" },
{ value: 6, text: "06" },
{ value: 7, text: "07" },
{ value: 8, text: "08" },
{ value: 9, text: "09" },
{ value: 10, text: "10" },
{ value: 11, text: "11" },
{ value: 12, text: "12" },
{ value: 13, text: "13" },
{ value: 14, text: "14" },
{ value: 15, text: "15" },
{ value: 16, text: "16" },
{ value: 17, text: "17" },
{ value: 18, text: "18" },
{ value: 19, text: "19" },
{ value: 20, text: "20" },
{ value: 21, text: "21" },
{ value: 22, text: "22" },
{ value: 23, text: "23" },
]
delegate: ItemDelegate {
width: parent.width
text: modelData.text
hoverEnabled: true
contentItem: MyText {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
text: parent.text
color: parent.enabled ? "#ffffff" : "#909090"
}
background: Rectangle {
color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d")
}
}
}