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

jclune@myxo.css.msu.edu jclune at myxo.css.msu.edu
Fri Jun 23 14:55:58 PDT 2006


Author: jclune
Date: 2006-06-23 17:55:57 -0400 (Fri, 23 Jun 2006)
New Revision: 771

Modified:
   branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup.py
   branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup_utils.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyAvida.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
Log:
Petri dish now resizes on boot up.

Modified: branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup.py	2006-06-23 04:55:21 UTC (rev 770)
+++ branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup.py	2006-06-23 21:55:57 UTC (rev 771)
@@ -10,6 +10,6 @@
 def Interactive():
   import IPython
   import __builtin__
-  ipython_shell = IPython.Shell.IPShell(argv=["-c", "import iqt; import AvidaGui2; from AvidaGui2.Avida_ED_startup_utils import *; AvidaCore.cConfig.InitGroupList(); avida_ed = AvidaEd()"])
+  ipython_shell = IPython.Shell.IPShell(argv=["-c", "import iqt; import AvidaGui2; from AvidaGui2.Avida_ED_startup_utils import *; AvidaCore.cConfig.InitGroupList(); avida_ed = AvidaEd();print 'Fooooooooooooooooooooooooo!'"])
   ipython_shell.mainloop()
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup_utils.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup_utils.py	2006-06-23 04:55:21 UTC (rev 770)
+++ branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup_utils.py	2006-06-23 21:55:57 UTC (rev 771)
@@ -74,6 +74,12 @@
 
     edu_main_controller.m_prompt_for_workspace_ctrl = session_ctrl.m_session_controller_factory.m_session_controllers_list[2]
 
+    #launching the loading of the default petri dish from here
+    edu_main_controller.m_edu_workspace_ctrl.m_session_mdl.m_session_mdtr.emit( 
+      qt.PYSIGNAL("doInitializeAvidaPhaseISig"),
+      (edu_main_controller.m_edu_workspace_ctrl.m_session_mdl.m_tempdir,))
+
+
   finally:
     s_splash.clear()
     s_splash.hide()

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyAvida.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyAvida.py	2006-06-23 04:55:21 UTC (rev 770)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyAvida.py	2006-06-23 21:55:57 UTC (rev 771)
@@ -46,7 +46,9 @@
 
     self.m_avida_threaded_driver = pyAvidaThreadedDriver(self.m_environment)
     self.m_avida_threaded_driver.construct()
+    print "I am making a population!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
     self.m_population = self.m_avida_threaded_driver.GetPopulation()
+    print "Population made"
     self.m_avida_thread_mdtr = pyMdtr()
     self.m_should_update = False
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2006-06-23 04:55:21 UTC (rev 770)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2006-06-23 21:55:57 UTC (rev 771)
@@ -29,7 +29,6 @@
     self.m_freezer_ctrl.construct(session_mdl)
     self.m_cli_to_ctrl_dict = {}
     self.m_ctrl_to_cli_dict = {}
-    print "conecting initiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalize"
     self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("initializeWithDefaultPetriDishSig"),
        self.Restart_ExpActionSlot)
 
@@ -437,7 +436,6 @@
       self.emit(PYSIGNAL("quitAvidaPhaseIISig"), ())
 
   def Restart_ExpActionSlot(self):
-    print "in restarttttttttttttttttttttttttttttttttttttt"
     # If the user clicks the repopulate button pretend that they double
     # click the default empty petri dish from the freezer
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-06-23 04:55:21 UTC (rev 770)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-06-23 21:55:57 UTC (rev 771)
@@ -119,6 +119,7 @@
          self.m_session_mdl.m_session_mdtr.emit(
            PYSIGNAL("doInitializeAvidaPhaseISig"),
            (self.m_session_mdl.m_tempdir,))
+         
 
  
   def MakeConfigVisibleSlot (self):
@@ -218,7 +219,6 @@
       descr()
 
 #    if self.isVisible():
-      print "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ"
       print "self is ", self
 
       Restart_Only_Flag = False
@@ -248,7 +248,11 @@
             return
 
       self.RenameDishSlot(dish_name)
-      self.MakeConfigVisibleSlot()
+      print "8888888888888888888888888888888888888888888888888888888888888888"
+#      self.m_session_mdl.m_session_mdtr.emit(
+#           PYSIGNAL("doInitializeAvidaPhaseISig"),
+#           (self.m_session_mdl.m_tempdir,))
+      #self.MakeConfigVisibleSlot()
       self.finishedPetriDish = False
       self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("FillDishSig"), 
         (dish_name, petri_dict, ))

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py	2006-06-23 04:55:21 UTC (rev 770)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py	2006-06-23 21:55:57 UTC (rev 771)
@@ -100,7 +100,13 @@
     self.connect(self.m_petri_dish_ctrl_v_scrollBar, SIGNAL("prevLine()"), 
                  self.vbarScrollPrevLineSlot)    
 
+#  def resizeEvent (self, event):
+#    print "JUST RESIZED----------------------------------------------------->"
+#    print self.width()
+#    print self.height()
 
+
+
   def restart(self):
     self.m_cell_info = None
     self.m_changed_cell_items = []
@@ -123,20 +129,6 @@
       self.m_map_cell_width,
       self.m_canvas)
 
-  #@JMC delete this...just testing something
-  def createNewPseudoCellItem(self, n):
-    #self.m_occupied_cells_ids.append(n)
-    return pyPopulationCellItem(
-      None,
-      (n%self.m_world_w) * self.m_map_cell_width,
-      (n/self.m_world_w) * self.m_map_cell_width,
-      self.m_map_cell_width,
-      self.m_map_cell_width,
-      self.m_canvas)
-
-
-
-
   def setAvidaSlot(self, avida):
     print "pyPetriDishCtrl.setAvidaSlot() ..."
     old_avida = self.m_avida
@@ -174,20 +166,20 @@
     self.m_background_rect.setPen(QPen(Qt.black))
     self.m_background_rect.show()
     self.m_background_rect.setZ(0.0)
-    print "COULD PAINT CELLS HERE"
 
-
     if self.m_cell_info: del self.m_cell_info
     self.m_cell_info = [None] * self.m_world_w * self.m_world_h
     self.m_occupied_cells_ids = []
 
+    print "COULD PAINT CELLS HERE"
+#    self.updateCellItem(465)
+
+
     self.m_thread_work_cell_item_index = 0
     self.m_cs_min_value = 0
     self.m_cs_value_range = 0
     self.m_changed_cell_items = self.m_cell_info[:]
     self.updateCellItems(True)
-    print "Trying to paint cells HERE"
-#    self.updatePseudoCellItem(465)
 
   def setDragSlot(self, org_clicked_on_item = None):
     descr(org_clicked_on_item)
@@ -220,6 +212,7 @@
           self.updateCellItems(self.m_last_m_org_clicked_on_item.m_population_cell.GetID())
 
   def updateCellItem(self, cell_id):
+    print "Kabennnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
     if self.m_cell_info[cell_id] is None:
       self.m_cell_info[cell_id] = self.createNewCellItem(cell_id)
     cell_info_item = self.m_cell_info[cell_id]
@@ -231,19 +224,6 @@
         cell_info_item.setPen(QPen(QColor(0,255,0)))
         self.m_last_cell_outlined = cell_info_item      
 
-  #delete @JMC just testing
-  def updatePseudoCellItem(self, cell_id):
-    if self.m_cell_info[cell_id] is None:
-      self.m_cell_info[cell_id] = self.createNewPseudoCellItem(cell_id)
-    cell_info_item = self.m_cell_info[cell_id]
-    self.m_indexer(cell_info_item, self.m_cs_min_value, self.m_cs_value_range)
-    cell_info_item.updateColorUsingFunctor(self.m_color_lookup_functor)
-
-    if self.m_org_clicked_on_item:
-      if cell_info_item.m_population_cell.GetID == self.m_org_clicked_on_item.m_population_cell.GetID:
-        cell_info_item.setPen(QPen(QColor(0,255,0)))
-        self.m_last_cell_outlined = cell_info_item      
-
   def updateCellItems(self, should_update_all = False):
     if self.m_cell_info:
 




More information about the Avida-cvs mailing list