Added resources

This commit is contained in:
Claudio Maradonna 2017-08-21 22:35:26 +02:00
parent e076f9aeae
commit 882ed92bc7
4 changed files with 21 additions and 0 deletions

View File

@ -40,3 +40,6 @@ DISTFILES += \
HEADERS += \ HEADERS += \
src/boxingtimer.h \ src/boxingtimer.h \
src/boxingsettings.h src/boxingsettings.h
RESOURCES += \
harbour-boxing-timer.qrc

5
harbour-boxing-timer.qrc Normal file
View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/audio">
<file>resources/bell.wav</file>
</qresource>
</RCC>

View File

@ -30,12 +30,19 @@
import QtQuick 2.0 import QtQuick 2.0
import Sailfish.Silica 1.0 import Sailfish.Silica 1.0
import QtMultimedia 5.0
import Pw.Unitoo.Backend 1.0 import Pw.Unitoo.Backend 1.0
import "pages" import "pages"
ApplicationWindow { ApplicationWindow {
BoxingTimer { BoxingTimer {
id: boxingTimer id: boxingTimer
onStatusChanged: {
if (status === BoxingTimer.Start) {
bell.play()
}
}
} }
BoxingSettings { BoxingSettings {
@ -47,6 +54,12 @@ ApplicationWindow {
} }
} }
SoundEffect {
id: bell
source: "qrc:/audio/resources/bell.wav"
}
initialPage: firstPage initialPage: firstPage
cover: Qt.resolvedUrl("cover/CoverPage.qml") cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: Orientation.Portrait allowedOrientations: Orientation.Portrait

BIN
resources/bell.wav Normal file

Binary file not shown.