mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
slot function in QML
This commit is contained in:
parent
656ddfe287
commit
7e1b06efdc
1 changed files with 8 additions and 3 deletions
|
@ -5,11 +5,16 @@ Item {
|
|||
id: tablet
|
||||
objectName: "tablet"
|
||||
|
||||
property double miclevel: 0.8
|
||||
property double micLevel: 0.8
|
||||
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
// called by C++ code to keep mic level display bar UI updated
|
||||
function setMicLevel(newMicLevel) {
|
||||
tablet.micLevel = newMicLevel;
|
||||
}
|
||||
|
||||
// used to look up a button by its uuid
|
||||
function findButtonIndex(uuid) {
|
||||
if (!uuid) {
|
||||
|
@ -101,7 +106,7 @@ Item {
|
|||
}
|
||||
Rectangle {
|
||||
id: audioBarMask
|
||||
width: parent.width * tablet.miclevel
|
||||
width: parent.width * tablet.micLevel
|
||||
color: "#333333"
|
||||
radius: 5
|
||||
anchors.bottom: parent.bottom
|
||||
|
@ -205,7 +210,7 @@ Item {
|
|||
|
||||
PropertyChanges {
|
||||
target: tablet
|
||||
miclevel: 0
|
||||
micLevel: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue