Warning, /plasma/aura-browser/app/qml/NavigationSoundEffects.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2022 Aditya Mehra <aix.m@outlook.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.12 0008 import Aura 1.0 as Aura 0009 import QtMultimedia 0010 0011 pragma Singleton 0012 0013 QtObject { 0014 id: navigationSoundEffects 0015 0016 property SoundEffect clickedSound: SoundEffect { 0017 source: Qt.resolvedUrl("sounds/clicked.wav") 0018 } 0019 0020 property SoundEffect movingSound: SoundEffect { 0021 source: Qt.resolvedUrl("sounds/clicked.wav") 0022 } 0023 0024 function stopNavigationSounds() { 0025 if (clickedSound.playing) { 0026 clickedSound.stop(); 0027 } 0028 if (movingSound.playing) { 0029 movingSound.stop(); 0030 } 0031 } 0032 0033 function playClickedSound() { 0034 if(Aura.GlobalSettings.soundEffects){ 0035 clickedSound.play(); 0036 } 0037 } 0038 0039 function playMovingSound() { 0040 if(Aura.GlobalSettings.soundEffects){ 0041 movingSound.play(); 0042 } 0043 } 0044 }