Bugfixes
[kitchenalert] / src / alertsound.h
old mode 100644 (file)
new mode 100755 (executable)
index d754087..d7f22ec
@@ -1,7 +1,7 @@
 /**************************************************************************
         KitchenAlert
 
-        Copyright (C) 2010  Heli Hyvättinen
+        Copyright (C) 2010-2011  Heli Hyvättinen
 
         This file is part of KitchenAlert.
 
 
 #include <QObject>
 
-
-
- #include <Phonon>
-
+#include <QMediaPlayer>
 
 
 /*! Class for playing the alert sound'
 
   @author Heli Hyvättinen
-  @date 2010-06-26
-  @version 0.09
+  @date 2011-04-26
+  @version 0.3.0
 
 Class for playing (and stopping) the alert sound.
 
@@ -51,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:
@@ -60,13 +61,22 @@ public slots:
     /*! Stops the sound from playing */
     void stop();
 
+    /*! 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_;
+   QMediaPlayer *pSound_; /*! The media player used to play the sound */
+
 
 
 };
 
+
+
 #endif // ALERTSOUND_H