123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- import QtQuick 1.1
- import QtMultimediaKit 1.1
- import QtMobility.feedback 1.1
- Item {
- id: notyfy
- SoundEffect {
- id: sndEffectRecv
- source : "file://"+settings.soundIncomingMessage
- }
- SoundEffect {
- id: sndEffectSent
- source : "file://"+settings.soundOutcomingMessage
- }
- SoundEffect {
- id: sndEffectBuddyLogsIn
- source : "file://"+settings.soundBuddyLogsIn
- }
- SoundEffect {
- id: sndEffectBuddyLogsOut
- source : "file://"+settings.soundBuddyLogsOut
- }
- SoundEffect {
- id: sndEffectSome1SaysYourName
- source : "file://"+settings.soundChatSomeoneSaysMyName
- }
- SoundEffect {
- id: sndEffectChatOthersTalk
- source : "file://"+settings.soundChatOthersTalk
- }
- HapticsEffect {
- id: hapticsEffectRecvMsg
- attackIntensity: 0
- attackTime: 250
- intensity: 1.0
- duration: 800 // set up the duration here, in millisecond
- fadeTime: 250
- fadeIntensity: 0
- running: false
- }
- HapticsEffect {
- id: hapticsEffectSentMsg
- attackIntensity: 0
- attackTime: 250
- intensity: 1.0
- duration: 400
- fadeTime: 250
- fadeIntensity: 0
- running: false
- }
- HapticsEffect {
- id: hapticsEffectBuddyLogsIn
- attackIntensity: 0.1
- attackTime: 500
- intensity: 1.0
- duration: 400
- fadeTime: 0
- fadeIntensity: 0
- running: false
- }
- function notifyMessageRecv() {
- if( settings.vibrationMessageReceived ) {
- hapticsEffectRecvMsg.running = true
- }
- sndEffectRecv.play()
- }
- function notifyMessageSent() {
- if( settings.vibrationMessageSent ) {
- hapticsEffectSentMsg.running = true
- }
- sndEffectSent.play()
- }
- function notifyBuddyLogsIn() {
- sndEffectBuddyLogsIn.play()
- }
- function notifyBuddyLogsOut() {
- sndEffectBuddyLogsOut.play()
- }
- function notifyChatSomeoneSaysMyName() {
- if( settings.vibrationChatSomeoneSaysMyName ) {
- hapticsEffectRecvMsg.running = true
- }
- sndEffectSome1SaysYourName.play()
- }
- function notifyChatOthersTalk() {
- if( settings.vibrationChatOthersTalk ) {
- hapticsEffectSentMsg.running = true
- }
- sndEffectChatOthersTalk.play()
- }
- }
|