Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lapsetab.py
diff options
context:
space:
mode:
authorolpc <olpc@xo-10-D5-61.localdomain>2010-06-22 22:37:31 (GMT)
committer olpc <olpc@xo-10-D5-61.localdomain>2010-06-22 22:37:31 (GMT)
commitb5c04ff29befec16f77f4674a95949bc0a36129f (patch)
treeba5d747749b7514da6bc64f72c280895104b1bf3 /lapsetab.py
Initial commitHEADmaster
Diffstat (limited to 'lapsetab.py')
-rw-r--r--lapsetab.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/lapsetab.py b/lapsetab.py
new file mode 100644
index 0000000..ff13e5e
--- /dev/null
+++ b/lapsetab.py
@@ -0,0 +1,35 @@
+# This maneges the interface of and provides functionality for the
+# "Time-Lapse Collection" tab.
+
+import interface
+import collectdata
+
+TAB_NAME = "Time Lapse Collection"
+WIDGET_NAME = "time_lapse_collection"
+
+
+class Tab(interface.NewTab):
+ def make(self):
+ self.lapse_speed = 30
+ self.jurnal_name = ''
+
+ def on_begin_collecting(self, widget):
+ print 'collecting tltab'
+ self.collection = collectdata.Lapse(self)
+
+ def on_name_changed(self, widget):
+ # this along with others could be moved to NewTab class
+ self.jurnal_name = widget.get_text()
+
+ def on_speed_changed(self, widget):
+ hours = self.get_widget('hour_speed').get_value()
+ mins = self.get_widget('min_speed').get_value()
+ secs = self.get_widget('sec_speed').get_value()
+ # I should do this a nicer non math way
+ self.lapse_speed = int(hours * 3600 + mins * 60 + secs)
+ print "lapse speed changed: ", self.lapse_speed
+
+
+
+
+tab = Tab(interface.GLADE_TABS, WIDGET_NAME, TAB_NAME)