[Avida-cvs] [avida-svn] r754 - branches/developers/avida-edward/source/python/AvidaGui2

avidaedward@myxo.css.msu.edu avidaedward at myxo.css.msu.edu
Mon Jun 19 10:03:09 PDT 2006


Author: avidaedward
Date: 2006-06-19 13:03:08 -0400 (Mon, 19 Jun 2006)
New Revision: 754

Modified:
   branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py
   branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:

- Updated to-do list
- Organism scope view: animated organism divide; animated heads
  movements; general cleanup to limit code duplication



Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py	2006-06-16 21:21:42 UTC (rev 753)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py	2006-06-19 17:03:08 UTC (rev 754)
@@ -484,73 +484,27 @@
           bg_item.setBrush(QBrush(color))
           bg_item.show()
 
-      if self.m_frames.m_ihead_info is not None:
-        head_item = self.m_ihead_item
-        head = self.m_frames.m_ihead_info[self.m_current_frame_number]
-        if displayed_genome_size < head:
-          head = -1
-        pt = self.m_inst_pts[head]
-        if pt.hidden():
-          head_item.hide()
-        else:
-          theta = pt.circle().oTheta() + pt.position() * pt.circle().dTheta()
-          x = pt.circle().radius()*math.cos(theta) + pt.circle().centerX()
-          y = pt.circle().radius()*math.sin(theta) + pt.circle().centerY()
+      for head_info, head_item in (
+        (self.m_frames.m_ihead_info, self.m_ihead_item),
+        (self.m_frames.m_rhead_info, self.m_rhead_item),
+        (self.m_frames.m_whead_info, self.m_whead_item),
+        (self.m_frames.m_fhead_info, self.m_fhead_item),
+      ):
+        if head_info is not None:
+          head = head_info[self.m_current_frame_number]
+          if displayed_genome_size < head:
+            head = -1
+          pt = self.m_inst_pts[head]
+          if pt.hidden():
+            head_item.hide()
+          else:
+            theta = pt.circle().oTheta() + pt.position() * pt.circle().dTheta()
+            x = pt.circle().radius()*math.cos(theta) + pt.circle().centerX()
+            y = pt.circle().radius()*math.sin(theta) + pt.circle().centerY()
 
-          head_item.setX(x)
-          head_item.setY(y)
-          head_item.show()
+            head_item.setX(x)
+            head_item.setY(y)
+            head_item.show()
 
-      if self.m_frames.m_rhead_info is not None:
-        head_item = self.m_rhead_item
-        head = self.m_frames.m_rhead_info[self.m_current_frame_number]
-        if displayed_genome_size < head:
-          head = -1
-        pt = self.m_inst_pts[head]
-        if pt.hidden():
-          head_item.hide()
-        else:
-          theta = pt.circle().oTheta() + pt.position() * pt.circle().dTheta()
-          x = pt.circle().radius()*math.cos(theta) + pt.circle().centerX()
-          y = pt.circle().radius()*math.sin(theta) + pt.circle().centerY()
-
-          head_item.setX(x)
-          head_item.setY(y)
-          head_item.show()
-
-      if self.m_frames.m_whead_info is not None:
-        head_item = self.m_whead_item
-        head = self.m_frames.m_whead_info[self.m_current_frame_number]
-        if displayed_genome_size < head:
-          head = -1
-        pt = self.m_inst_pts[head]
-        if pt.hidden():
-          head_item.hide()
-        else:
-          theta = pt.circle().oTheta() + pt.position() * pt.circle().dTheta()
-          x = pt.circle().radius()*math.cos(theta) + pt.circle().centerX()
-          y = pt.circle().radius()*math.sin(theta) + pt.circle().centerY()
-
-          head_item.setX(x)
-          head_item.setY(y)
-          head_item.show()
-
-      if self.m_frames.m_fhead_info is not None:
-        head_item = self.m_fhead_item
-        head = self.m_frames.m_fhead_info[self.m_current_frame_number]
-        if displayed_genome_size < head:
-          head = -1
-        pt = self.m_inst_pts[head]
-        if pt.hidden():
-          head_item.hide()
-        else:
-          theta = pt.circle().oTheta() + pt.position() * pt.circle().dTheta()
-          x = pt.circle().radius()*math.cos(theta) + pt.circle().centerX()
-          y = pt.circle().radius()*math.sin(theta) + pt.circle().centerY()
-
-          head_item.setX(x)
-          head_item.setY(y)
-          head_item.show()
-
     self.emit(PYSIGNAL("frameShownSig"),(self.m_frames, self.m_current_frame_number))
     self.m_canvas.update()

Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list	2006-06-16 21:21:42 UTC (rev 753)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list	2006-06-19 17:03:08 UTC (rev 754)
@@ -80,10 +80,6 @@
   - hack with a pause signal upon a certain event completed.
 - toggle to see legend instruction names to colors
 - toggle to see letters
-- animation of organism divide
-  - or, for now, some way of indicating that divide has occurred
-    - say, perhaps, just drawing a line at divide points when copy is
-      complete
 - in petri dish, indication of each mutation as it occurs.
 
 Priority Medium-
@@ -92,7 +88,6 @@
 - add a general box that allows us to send a message to the user in the
   form of a box that pops up. after they have read it the user can click
   ok. (a modal box with an explanation point)
-- consider different icons in navigation bar and freezer (12/21/05)
 - change the text in analyze mode to list the population instead of what
   it currently state (12/21/05)
 
@@ -162,6 +157,11 @@
 * 30-Jan-06 first step for Windows is that if python is installed,
 Avida-Ed can be downloaded and run -- Finished 24-Feb-06
 
+* June-06
+- animation of organism divide
+  - or, for now, some way of indicating that divide has occurred
+    - say, perhaps, just drawing a line at divide points when copy is
+      complete
 
 ************Josh*******************
 




More information about the Avida-cvs mailing list