[clocks] Added alarm.py



commit 1d65e92820046765fcc0eeae478611d23a12a2cf
Author: Emily Gonyer <emilyyrose gmail com>
Date:   Wed Jun 13 14:18:32 2012 -0400

    Added alarm.py
    
    Signed-off-by: Seif Lotfy <seif lotfy com>

 alarm.py |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/alarm.py b/alarm.py
new file mode 100644
index 0000000..cb32bde
--- /dev/null
+++ b/alarm.py
@@ -0,0 +1,32 @@
+#WEEKDAYS:
+day1 = "day1"
+day2 = "day2"
+day3 = "day3"
+day4 = "day4"
+day5 = "day5"
+day6 = "day6"
+day7 = "day7"
+
+class AlarmItem:
+    def __init__(self, name, time, repeat):
+        self.n = name
+        self.t = time
+        self.r = repeat
+
+    def set_alarm_time(self, time):
+        self.t = time 
+        
+    def get_alarm_time(self):
+        return self.t
+        
+    def set_alarm_name(self, name):
+        self.n = name
+    
+    def get_alarm_name(self):
+        return self.n
+        
+    def set_alarm_repeat(self, repeat):
+        self.r = repeat
+
+    def get_alarm_repeat(self):
+	return self.r



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]