Warning, /plasma/plasma-bigscreen/components/qml/NavigationSoundEffects.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.14 0008 import QtMultimedia 5.14 0009 import Qt.labs.platform 1.1 0010 0011 pragma Singleton 0012 0013 QtObject { 0014 id: navigationSoundEffects 0015 0016 property SoundEffect clickedSound: SoundEffect { 0017 source: StandardPaths.locate(StandardPaths.GenericDataLocation, "sounds/plasma-bigscreen/clicked.wav") 0018 } 0019 0020 property SoundEffect movingSound: SoundEffect { 0021 source: StandardPaths.locate(StandardPaths.GenericDataLocation, "sounds/plasma-bigscreen/moving.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 clickedSound.play(); 0035 } 0036 0037 function playMovingSound() { 0038 movingSound.play(); 0039 } 0040 }