Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2013-12-25 16:12:52 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2013-12-25 16:12:52 (GMT)
commit0f295a9a5f6d3e7913a73cb365a161c3bef4520a (patch)
tree80530dd05dd251c51659200cfcca63b682b08cf0 /activity.py
parentc962744b7ecd6d86001963e2e6dfb31a8eb0fd93 (diff)
needs a bit of work
Diffstat (limited to 'activity.py')
-rwxr-xr-xactivity.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/activity.py b/activity.py
index 1053648..94d7e06 100755
--- a/activity.py
+++ b/activity.py
@@ -22,7 +22,7 @@ class Activity(activity.Activity):
def __init__(self, handle):
activity.Activity.__init__(self, handle)
-
+ self.init_vars()
self.build_toolbar()
self.actividad = conozco.Conozco(self)
self.build_canvas()
@@ -31,6 +31,7 @@ class Activity(activity.Activity):
def init_vars(self):
self._image = None
+ self._places = {}
def build_toolbar(self):
@@ -102,6 +103,8 @@ class Activity(activity.Activity):
self._pygamecanvas.grab_focus()
self._pygamecanvas.run_pygame(self.actividad.principal)
+
+
def _new_picture(self, widget):
try:
chooser = ObjectChooser(parent=self)
@@ -119,15 +122,22 @@ class Activity(activity.Activity):
#self.actividad.fondo = self._image
#self.actividad.pantalla.blit(self._image, (0, 0))
- def _add_point(self, widget, label="", value="0.0"):
+ def _add_point(self, widget, label="", value="City"):
#data = (label, float(value))
#if not data in self.chart_data:
pos = self.labels_and_values.add_value(label, value)
+ print 'new pos', pos
+ self._places[pos] = [value, (0,0)]
#self.chart_data.insert(pos, data)
#self._update_chart_data()
def _add_coor(self, pos):
- self.labels_and_values.update_selected_value(pos)
+ path = self.labels_and_values.update_selected_value(pos)
+ self._places[path][1] = pos
+ self._update_points()
+
+ def _update_points(self):
+ self.actividad.update_points(self._places)
def read_file(self, file_path):
pass