Fixes to speed alarm and poi alerts. Added flicker effect. Some new fields to text...
[jspeed] / src / speedalarm.h
index 10e3581..9d8ca3e 100644 (file)
 
 #include <QtCore/QObject>
 
+class QTimer;
+
 class SpeedAlarm : public QObject
 {
     Q_OBJECT
 
 public:
+    ~SpeedAlarm();
+    static int const ALARM_INTERVAL = 15;
     static SpeedAlarm& instance();
     void start();
     void end();
 
+signals:
+    void speedExceedChanged(bool exceeded);
+
 public slots:
     void loadConfig();
 
 private slots:
     void onDataUpdated();
+    void playAlarmSound();
 
 private:
     SpeedAlarm();
+    void startAlarmTimer();
     bool loaded_;
     QString soundFile_;
-    int threshold_;
+    double threshold_;
     bool enabled_;
     bool isOver_;
+    QTimer* timer_;
 };
 
 #endif