projects
/
kitchenalert
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Snoozable 00:00:00 alerts
[kitchenalert]
/
src
/
timer.h
diff --git
a/src/timer.h
b/src/timer.h
index
26c6f6a
..
cbfac47
100644
(file)
--- a/
src/timer.h
+++ b/
src/timer.h
@@
-34,13
+34,13
@@
#include <QModelIndex>
#include <QModelIndex>
-
+#include "alertsound.h"
/*! The timer class of KitchenAlert'
@author Heli Hyvättinen
/*! The timer class of KitchenAlert'
@author Heli Hyvättinen
- @date 2010-06-26
- @version 0.09
+ @date 2010-09-08
+ @version 0.1.1
The timer class of KitchenAlert.
The timer class of KitchenAlert.
@@
-52,28
+52,56
@@
class Timer : public QObject
public:
explicit Timer(QObject *parent = 0);
public:
explicit Timer(QObject *parent = 0);
- int getOriginalTimeInSeconds();
+ /*! Returns the original time in seconds
+ When the alert restarts, it is set to this time.
+ */
+ int getOriginalTimeInSeconds();
+
+ /*! Sets the original time in seconds */
void setOriginalTimeInSeconds(int seconds);
void setOriginalTimeInSeconds(int seconds);
+ /*! Returns the time remaining before the alert in seconds */
int getRemainingTimeInSeconds();
int getRemainingTimeInSeconds();
+ /*! Returns the alert text */
QString getAlertText();
QString getAlertText();
+
+ /*! Sets the alert text */
void setAlertText(QString text);
void setAlertText(QString text);
+ /*! Returns whether the timer is alerting */
bool isAlerting();
signals:
bool isAlerting();
signals:
-
+ /*! Emitted when the remaining time in the timer has changed */
void remainingTimeChanged();
void remainingTimeChanged();
+
+ /*! Emitted when the timer alerts */
void alert(QModelIndex indexOfAlerter);
public slots:
void alert(QModelIndex indexOfAlerter);
public slots:
+ /*! The internal QTimer is connected to this slot */
void secondPassed();
void secondPassed();
+
+ /*! Start the timer */
void start();
void start();
+
+ /*! Stop the timer*/
void stop();
void stop();
+
+ /*! Snooze the timer
+ Currently sets the timer to alert again in two minutes.
+ */
void snooze();
void snooze();
+ /*! Switches to use the default sound (and saves it to settings */
+ void enableDefaultSound();
+
+ /*! Changes the sound file used and saves it to settings */
+ void changeAlertSound(QString filename);
+
+
private:
private:
@@
-85,6
+113,8
@@
private:
QModelIndex whereAmI();
QModelIndex whereAmI();
+ AlertSound alertSound_;
+
};
#endif // TIMER_H
};
#endif // TIMER_H