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

baerb@myxo.css.msu.edu baerb at myxo.css.msu.edu
Fri Jun 30 13:32:24 PDT 2006


Author: baerb
Date: 2006-06-30 16:32:24 -0400 (Fri, 30 Jun 2006)
New Revision: 788

Modified:
   branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishView.ui
   branches/developers/avida-edward/source/python/AvidaGui2/pyOnePopulationCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
   branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:

Added label to flip button.

Opened items in Freezer list

Added some comments and deleted some print statements.`



Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py	2006-06-30 20:32:24 UTC (rev 788)
@@ -290,7 +290,7 @@
     lines = lines + ["freezer/@default.empty", "START_CREATURE0 default"]
     lines = lines + ["freezer/@default.empty", "AGE_LIMIT 100"]
     lines = lines + ["freezer/@default.empty", "MAX_UPDATES -1"]
-    lines = lines + ["freezer/@ancestor.organism", "rucavcqgfcqapqcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccutycasvab"]
+    lines = lines + ["freezer/@ancestor.organism", "rucavcqgfcqapqcccccccccccccccccccccccccccutycasvab"]
     out_lines = []
     num_lines = len(lines)/2
     for line_num in range(num_lines):

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2006-06-30 20:32:24 UTC (rev 788)
@@ -445,6 +445,7 @@
     thawed_item = pyReadFreezer(file_name)
     self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doDefrostDishSig"),
       ("@default.empty", thawed_item,))
+    print "BDB -- in Restart_ExpActionSlot File name is " + file_name
     self.m_session_mdl.m_session_mdtr.emit(
       PYSIGNAL("freezerItemDoubleClicked"), (file_name, ))
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py	2006-06-30 20:32:24 UTC (rev 788)
@@ -17,9 +17,11 @@
     apply(QListView.__init__,(self,) + args)
     self.setAcceptDrops( True )
     self.viewport().setAcceptDrops( True )
+
   def construct(self, session_mdl):
     descr()
     self.m_session_mdl = session_mdl
+    
 
   def contentsDropEvent(self, e):
     descr(e)
@@ -32,16 +34,13 @@
     print type(e)
 
     if ( QIconDrag.canDecode(e)):
-      print "BDB -- can decode icon"
       format = QDropEvent.format(e, 0)
       print "format = " + str(format)
       print type(e.encodedData(format))
       print "--------------------"
       print dir(e.encodedData(format))
       print str(e.encodedData(format))
-      print "BDB -- " + str(e.encodedData(format).data())
     if ( QTextDrag.decode( e, freezer_item_name ) ) :
-      print "BDB:pyFreezerListView freezer_item_name = ", str(freezer_item_name)
       if freezer_item_name[:9] == 'organism.':
         freezer_item_name = freezer_item_name[9:] 
         self.FreezeOrganism(freezer_item_name)
@@ -189,6 +188,9 @@
     self.m_empty_item.setDropEnabled(True)
     self.m_full_item.setDropEnabled(True)
     self.m_organism_item.setDropEnabled(True)
+    self.m_list_view.setOpen(self.m_empty_item, True)
+    self.m_list_view.setOpen(self.m_full_item, True)
+    self.m_list_view.setOpen(self.m_organism_item, True)
 
 
   def createFreezerIndexSlot(self):
@@ -275,8 +277,7 @@
       thawed_item = pyReadFreezer(file_name)
       self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doDefrostDishSig"),
         (item.text(0), thawed_item,))
-      print "item.text(0) is ", item.text(0)
-      print "thawed_item is ", thawed_item
+      print "BDB -- in clicked_item slot File name is " + file_name
       self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("freezerItemDoubleClicked"),
         (file_name,))
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-06-30 20:32:24 UTC (rev 788)
@@ -99,6 +99,7 @@
 
     if (current_page_int == 0):
        self.m_petri_dish_widget_stack.raiseWidget(1)
+       self.FlipButtonTextLabel.setText("<p align=\"right\">Flip to<br>Petri Dish</p>")
        QToolTip.remove(self.m_petri_dish_toggle)
        QToolTip.add(self.m_petri_dish_toggle,
          "Flip to see the <b><i>Petri Dish</i></b>")
@@ -107,6 +108,7 @@
 
     else:
        self.m_petri_dish_widget_stack.raiseWidget(0)
+       self.FlipButtonTextLabel.setText("<p align=\"right\">Flip to<br>Settings</p>")
        QToolTip.remove(self.m_petri_dish_toggle)
        QToolTip.add(self.m_petri_dish_toggle,
          "Flip to see the <b><i>Environmental Settings</i></b>")
@@ -115,7 +117,8 @@
            PYSIGNAL("doInitializeAvidaPhaseISig"),
            (self.m_session_mdl.m_tempdir,))
          
-
+  # if the configuration page is not visable make it so (also adjust labling
+  # on flip button correctly
  
   def MakeConfigVisibleSlot (self):
     if self.dishDisabled:
@@ -124,6 +127,10 @@
     current_page_int = self.m_petri_dish_widget_stack.id(current_page)
     if (current_page_int != 1):
        self.m_petri_dish_widget_stack.raiseWidget(1)
+       self.FlipButtonTextLabel.setText("<p align=\"right\">Flip to<br>Petri Dish</p>")
+       QToolTip.remove(self.m_petri_dish_toggle)
+       QToolTip.add(self.m_petri_dish_toggle,
+         "Flip to see the <b><i>Petri Dish</i></b>")
        
   def SetDishDisabledSlot(self):
     self.dishDisabled = True
@@ -213,7 +220,6 @@
       descr()
 
 #    if self.isVisible():
-      print "self is ", self
 
       # If the petri dish is already filled prompt the user if they want to 
       # freeze the existing dish
@@ -228,9 +234,14 @@
         if (not self.m_session_mdl.saved_full_dish):
           m_check_to_freeze = pyQuitDialogCtrl("Start New Experiment")
           quit_return = m_check_to_freeze.showDialog()
+ 
+          # if user chose not to freeze but only load the new dish
 
           if quit_return == m_check_to_freeze.QuitFlag:
             self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doEnablePetriDishSig"), ())
+
+          # if user user chose to freeze the existing population
+
           elif quit_return == m_check_to_freeze.FreezeQuitFlag:
             self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doEnablePetriDishSig"), ())
             self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("freezeDishPhaseISig"), (True, False, ))

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishView.ui	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishView.ui	2006-06-30 20:32:24 UTC (rev 788)
@@ -104,6 +104,19 @@
                                 <string>Name of petri dish dragged in from the freezer</string>
                             </property>
                         </widget>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>FlipButtonTextLabel</cstring>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>9</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>&lt;p align="right"&gt;Flip to&lt;br&gt;Settings&lt;/p&gt;</string>
+                            </property>
+                        </widget>
                         <widget class="QLayoutWidget">
                             <property name="name">
                                 <cstring>layout178</cstring>
@@ -506,6 +519,10 @@
         <property type="0">-1</property>
         <property type="1">pyPetriDishCtrl</property>
         <property type="0">-1</property>
+        <property type="1">pyPetriDishCtrl</property>
+        <property type="0">-1</property>
+        <property type="1">pyPetriDishCtrl</property>
+        <property type="0">-1</property>
         <property type="pyPetriDishCtrl"></property>
         <property type="-1">1</property>
     </customwidget>
@@ -575,6 +592,10 @@
         <property type="0">-1</property>
         <property type="1">pyGradientScaleCtrl</property>
         <property type="0">-1</property>
+        <property type="1">pyGradientScaleCtrl</property>
+        <property type="0">-1</property>
+        <property type="1">pyGradientScaleCtrl</property>
+        <property type="0">-1</property>
         <property type="pyGradientScaleCtrl"></property>
         <property type="-1">1</property>
     </customwidget>
@@ -644,6 +665,10 @@
         <property type="0">-1</property>
         <property type="1">pyLiveControlsCtrl</property>
         <property type="0">-1</property>
+        <property type="1">pyLiveControlsCtrl</property>
+        <property type="0">-1</property>
+        <property type="1">pyLiveControlsCtrl</property>
+        <property type="0">-1</property>
         <property type="pyLiveControlsCtrl"></property>
         <property type="-1">1</property>
     </customwidget>

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePopulationCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePopulationCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePopulationCtrl.py	2006-06-30 20:32:24 UTC (rev 788)
@@ -31,7 +31,7 @@
       self.m_session_mdl.m_session_mdtr, 
       PYSIGNAL("freezerItemDoubleClickedOnInOnePopSig"))
     self.connect( self.m_session_mdl.m_session_mdtr, 
-      PYSIGNAL("freezerItemDoubleClicked"), self.freezerItemDoubleClicked)
+      PYSIGNAL("freezerItemDoubleClicked"), self.freezerItemDoubleClickedSlot)
     self.connect(self.m_session_mdl.m_session_mdtr,
       PYSIGNAL("restartPopulationSig"), self.restartPopulationSlot)
 
@@ -110,7 +110,7 @@
       else: 
         self.emit(PYSIGNAL("petriDishDroppedInPopViewSig"), (e,))
 
-  def freezerItemDoubleClicked(self, freezer_item_name):
+  def freezerItemDoubleClickedSlot(self, freezer_item_name):
    if self.isVisible():
      self.emit(PYSIGNAL("freezerItemDoubleClickedOnInOnePopSig"), 
        (freezer_item_name,))

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-06-30 20:32:24 UTC (rev 788)
@@ -50,7 +50,10 @@
           self.start_cell_location = self.find_location(world_x, world_y, 
              num_ancestors, i)
           cells_dict[str(self.start_cell_location)] = str(i)
-          #this variable is used in pyPetriDishCtrl.py to outline the founding organisms
+
+          # This variable is used in pyPetriDishCtrl.py to outline the 
+          # founding organisms
+
           self.m_session_mdl.m_founding_cells_dict = None
           self.m_session_mdl.m_founding_cells_dict = cells_dict
 
@@ -222,10 +225,4 @@
     x = spots[org_num * 2]
     y = spots[(org_num * 2) + 1]
 
-    print "THE NUMBER OF ANCESTORS IS ", num_ancestors
-
-    print "At the end of find_location -------------------------------------------------"    
-    print "returning " , int((round(world_y * y) * world_x) + round(world_x * x)) % (world_x * world_y)
-    print "done printing"
-    print "for some reason this text is not printing"
     return int((round(world_y * y) * world_x) + round(world_x * x)) % (world_x * world_y)

Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list	2006-06-30 19:34:26 UTC (rev 787)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list	2006-06-30 20:32:24 UTC (rev 788)
@@ -39,11 +39,17 @@
 
 15-Jun-06 Change wording on can't freeze message
 
-15-Jun-06 Add Splash screen
-
 15-Jun-06 Create CGI script to allow users to enter information when they check out avida executable.
 
+29-Jun-06 set petri dish flag to open
 
+29-Jun-06 change name of restart petri dish
+
+29-Jun-06 Same control on front and back of petri dish.
+
+30-Jun-06 Make cell location relative to center of screen (use +/- X and Y) instead of using Avida cell location
+
+
 ************Jeff*******************
 
 Priority High




More information about the Avida-cvs mailing list