X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Falertsound.h;h=d7f22ec99b768ae4772fabc4c1ffb71cd52d59a2;hb=de210dd7574f6aaaf52b5302d3a72014ab49c626;hp=19f4a59d30fb03a1ada6fd99ab17a71b298f7463;hpb=8c81978843d45998b02e3556bb4e326c37dac723;p=kitchenalert diff --git a/src/alertsound.h b/src/alertsound.h old mode 100644 new mode 100755 index 19f4a59..d7f22ec --- a/src/alertsound.h +++ b/src/alertsound.h @@ -1,7 +1,7 @@ /************************************************************************** KitchenAlert - Copyright (C) 2010 Heli Hyvättinen + Copyright (C) 2010-2011 Heli Hyvättinen This file is part of KitchenAlert. @@ -29,16 +29,14 @@ #include - - -#include +#include /*! Class for playing the alert sound' @author Heli Hyvättinen - @date 2010-07-20 - @version 0.1 + @date 2011-04-26 + @version 0.3.0 Class for playing (and stopping) the alert sound. @@ -50,6 +48,10 @@ class AlertSound : public QObject public: explicit AlertSound(QObject *parent = 0); + virtual ~AlertSound(); + + static const QString defaultsound_ ; /*! the name (with full path) of the default sound file */ + signals: public slots: @@ -62,16 +64,19 @@ public slots: /*! Changes the sound file (both current and saved in settings) */ void setSound(QString filename); + /*! Switches to using the default sound and saves this behaviour in settings */ void setDefaultSound(); private: - Phonon::MediaObject *pSound_; - QString defaultsound_; + QMediaPlayer *pSound_; /*! The media player used to play the sound */ + }; + + #endif // ALERTSOUND_H