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

baerb@myxo.css.msu.edu baerb at myxo.css.msu.edu
Wed Mar 29 11:49:20 PST 2006


Author: baerb
Date: 2006-03-29 14:49:14 -0500 (Wed, 29 Mar 2006)
New Revision: 543

Added:
   branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui
Modified:
   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/pyPetriConfigureCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui
   branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
Log:
Attempted to add new dialog box forcing the user to choose an existing or open
a new workspace -- does not work at this moment.

Put in a hack to overcome problem where code Avida-ED crashes if Avida core ends
(for instance if ends on number of updates).  Now the program will pause when 
the user selects that option.

No longer askes the user for a random number seed.  Now they have a choice of
making the run repeatable (random number seed set to 777) or not (seed set 
to 0).

Rearranged the tasks rewarded part of the configuration pane.  They are now
listed as five increasingly hard classes.



Added: branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingCtrl.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingCtrl.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+
+from qt import *
+from pyBeforeStartingView import pyBeforeStartingView
+
+# class to pop up a dialog box before AvidaEd starts
+
+class pyBeforeStartingCtrl (pyBeforeStartingView):
+  def __init__(self):
+    pyBeforeStartingView.__init__(self)
+    # self.connect(self.OpenExistingPushButton, SIGNAL("clicked()"),
+    #              self.m_session_mdl.m_session_mdtr, 
+    #              PYSIGNAL("workspaceOpenSig"))
+    # self.connect(self.CreateNewPushButton, SIGNAL("clicked()"),
+    #              self.m_session_mdl.m_session_mdtr, 
+    #              PYSIGNAL("workspaceOpenSig"))
+
+  def showDialog(self):
+    self.show()
+    self.exec_loop()
+    dialog_result = self.result()
+    print "BDB pyBeforeStgartingCtrl:showDialog dialog_result = " + str(dialog_result)

Added: branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui	2006-03-29 19:49:14 UTC (rev 543)
@@ -0,0 +1,78 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>pyBeforeStartingView</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>pyBeforeStartingView</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>224</width>
+            <height>100</height>
+        </rect>
+    </property>
+    <property name="paletteBackgroundColor">
+        <color>
+            <red>255</red>
+            <green>255</green>
+            <blue>100</blue>
+        </color>
+    </property>
+    <property name="caption">
+        <string>Before Starting</string>
+    </property>
+    <widget class="QButtonGroup">
+        <property name="name">
+            <cstring>BeforeStartingButtonGroup</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>0</x>
+                <y>0</y>
+                <width>222</width>
+                <height>92</height>
+            </rect>
+        </property>
+        <property name="title">
+            <string></string>
+        </property>
+        <vbox>
+            <property name="name">
+                <cstring>unnamed</cstring>
+            </property>
+            <widget class="QPushButton">
+                <property name="name">
+                    <cstring>OpenExistingPushButton</cstring>
+                </property>
+                <property name="paletteBackgroundColor">
+                    <color>
+                        <red>255</red>
+                        <green>255</green>
+                        <blue>100</blue>
+                    </color>
+                </property>
+                <property name="text">
+                    <string>Open Existing Workspace</string>
+                </property>
+            </widget>
+            <widget class="QPushButton">
+                <property name="name">
+                    <cstring>CreateNewPushButton</cstring>
+                </property>
+                <property name="paletteBackgroundColor">
+                    <color>
+                        <red>255</red>
+                        <green>255</green>
+                        <blue>100</blue>
+                    </color>
+                </property>
+                <property name="text">
+                    <string>Create New Workspace</string>
+                </property>
+            </widget>
+        </vbox>
+    </widget>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -11,6 +11,7 @@
 from pyPetriConfigureCtrl import pyPetriConfigureCtrl
 from pyQuitDialogCtrl import pyQuitDialogCtrl
 from pyDefaultFiles import pyDefaultFiles
+from pyBeforeStartingCtrl import pyBeforeStartingCtrl
 import os.path, shutil
 
 
@@ -110,12 +111,23 @@
     self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("removeStatusBarWidgetSig"), self.removeStatusBarWidgetSlot)
     self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("statusBarMessageSig"), self.statusBarMessageSlot)
     self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("statusBarClearSig"), self.statusBarClearSlot)
+    self.connect(
+      self.m_session_mdl.m_session_mdtr, PYSIGNAL("workspaceNewSig"),
+      self.fileNew)
+    self.connect(
+      self.m_session_mdl.m_session_mdtr, PYSIGNAL("workspaceOpenSig"),
+      self.fileOpen)
 
+
     self.navBarItemClickedSlot(self.m_nav_bar_ctrl.m_one_population_cli)
     self.m_nav_bar_ctrl.m_list_view.setSelected(self.m_nav_bar_ctrl.m_one_population_cli, True)
     self.splitter1.setSizes([100])
 
     self.show()
+    # junk=pyBeforeStartingCtrl()
+    # print "BDB pyEduWorkspaceCtrl -- before junk.showDialog"
+    # junk2 = junk.showDialog()
+    # print "BDB pyEduWorkspaceCtrl -- after junk.showDialog"
 
   def __del__(self):
     for key in self.m_cli_to_ctrl_dict.keys():

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -159,7 +159,14 @@
     stats = update = None
     if self.m_avida: stats = self.m_avida.m_population.GetStats()
     if stats: update = stats.GetUpdate()
-    if update: self.m_update_label.setText(QString("%1").arg(update))
+    if update: 
+      self.m_update_label.setText(QString("%1").arg(update))
+
+      # BDB -- Pause at certain update hack
+
+      if int(update) == int(self.m_session_mdl.m_update_to_pause):
+        print "BDB -- send the pause signal here"
+        self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doPauseAvidaSig"), ())
     
   def RenameDishSlot(self, dishName):
     descr()

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -40,17 +40,11 @@
       self.ChangeMutationTextSlot)
     self.connect(self.WorldSizeSlider, SIGNAL("valueChanged(int)"), 
       self.ChangeWorldSizeTextSlot)
-    self.connect(self.RewardNonePushButton, SIGNAL("clicked()"), 
-      self.RewardNoneSlot)
-    self.connect(self.RewardAllPushButton, SIGNAL("clicked()"), 
-      self.RewardAllSlot)
-    self.connect(self.RadomGeneratedRadioButton, SIGNAL("clicked()"), 
-      self.ChangeRandomSpinBoxSlot)
-    self.connect(self.RandomFixedRadioButton, SIGNAL("clicked()"), 
-      self.ChangeRandomSpinBoxSlot)
     self.connect(self.StopManuallyRadioButton, SIGNAL("clicked()"), 
-      self.ChangeStopSpinBoxSlot)
+      self.ChangeStopSpinBoxEnabledSlot)
     self.connect(self.StopAtRadioButton, SIGNAL("clicked()"), 
+      self.ChangeStopSpinBoxEnabledSlot)
+    self.connect(self.StopAtSpinBox, SIGNAL("valueChanged(int)"), 
       self.ChangeStopSpinBoxSlot)
     self.connect(self.SavePetriPushButton, SIGNAL("clicked()"), 
       self.m_session_mdl.m_session_mdtr, PYSIGNAL("freezeDishPhaseISig"))
@@ -94,17 +88,11 @@
       self.ChangeMutationTextSlot)
     self.disconnect(self.WorldSizeSlider, SIGNAL("valueChanged(int)"), 
       self.ChangeWorldSizeTextSlot)
-    self.disconnect(self.RewardAllPushButton, SIGNAL("clicked()"), 
-      self.RewardAllSlot)
-    self.disconnect(self.RewordNonePushButton, SIGNAL("clicked()"), 
-      self.RewardNoneSlot)
-    self.disconnect(self.RadomGeneratedRadioButton, SIGNAL("clicked()"), 
-      self.ChangeRandomSpinBoxSlot)
-    self.disconnect(self.RandomFixedRadioButton, SIGNAL("clicked()"), 
-      self.ChangeRandomSpinBoxSlot)
     self.disconnect(self.StopManuallyRadioButton, SIGNAL("clicked()"), 
-      self.ChangeStopSpinBoxSlot)
+      self.ChangeStopSpinBoxEnabledSlot)
     self.disconnect(self.StopAtRadioButton, SIGNAL("clicked()"), 
+      self.ChangeStopSpinBoxEnabledSlot)
+    self.disconnect(self.StopAtSpinBox, SIGNAL("valueChanged(int)"), 
       self.ChangeStopSpinBoxSlot)
     self.disconnect(self.SavePetriPushButton, SIGNAL("clicked()"), 
       self.m_session_mdl.m_session_mdtr, PYSIGNAL("freezeDishPhaseISig"))
@@ -150,40 +138,20 @@
     slide_value_txt = slide_value + " x " + slide_value + " cells"
     self.WorldSizeTextLabel.setText(slide_value_txt)
 
-  def RewardAllSlot(self):
-    self.NotCheckBox.setChecked(True)
-    self.NandCheckBox.setChecked(True)
-    self.AndCheckBox.setChecked(True)
-    self.OrnCheckBox.setChecked(True)
-    self.OrCheckBox.setChecked(True)
-    self.AndnCheckBox.setChecked(True)
-    self.NorCheckBox.setChecked(True)
-    self.XorCheckBox.setChecked(True)
-    self.EquCheckBox.setChecked(True)
-
-  def RewardNoneSlot(self):
-    self.NotCheckBox.setChecked(False)
-    self.NandCheckBox.setChecked(False)
-    self.AndCheckBox.setChecked(False)
-    self.OrnCheckBox.setChecked(False)
-    self.OrCheckBox.setChecked(False)
-    self.AndnCheckBox.setChecked(False)
-    self.NorCheckBox.setChecked(False)
-    self.XorCheckBox.setChecked(False)
-    self.EquCheckBox.setChecked(False)
-
-  def ChangeRandomSpinBoxSlot(self):
-    if self.RadomGeneratedRadioButton.isChecked() == True:
-      self.RandomSpinBox.setEnabled(False)
-    else:
-      self.RandomSpinBox.setEnabled(True)
-  
-  def ChangeStopSpinBoxSlot(self):
+  def ChangeStopSpinBoxEnabledSlot(self):
     if self.StopManuallyRadioButton.isChecked() == True:
       self.StopAtSpinBox.setEnabled(False)
+      # BDB -- hack for pause at given update
+      self.m_session_mdl.m_update_to_pause = -99
     else:
       self.StopAtSpinBox.setEnabled(True)
+      # BDB -- hack for pause at given update
+      self.m_session_mdl.m_update_to_pause = self.StopAtSpinBox.value()
   
+  def ChangeStopSpinBoxSlot(self):
+    # BDB -- hack for pause at given update
+    self.m_session_mdl.m_update_to_pause = self.StopAtSpinBox.value()
+     
   def FillDishSlot(self, dish_name, petri_dict):
     descr()
     
@@ -210,9 +178,13 @@
     if max_updates < 0:
        self.StopManuallyRadioButton.setChecked(True)
        self.StopAtRadioButton.setChecked(False)
+       # BDB -- hack for pause at given update
+       self.m_session_mdl.m_update_to_pause = -99
     else:
        self.StopManuallyRadioButton.setChecked(False)
        self.StopAtRadioButton.setChecked(True)
+       # BDB -- hack for pause at given update
+       self.m_session_mdl.m_update_to_pause = self.StopAtSpinBox.value()
     if settings_dict.has_key("WORLD-X") == True:
       self.WorldSizeSlider.setValue(int(settings_dict["WORLD-X"]))
     else:
@@ -221,12 +193,11 @@
       seed = int(settings_dict["RANDOM_SEED"])
     else:
       seed = 0
-    self.RandomSpinBox.setValue(seed)
     if seed == 0:
-       self.RadomGeneratedRadioButton.setChecked(True)
+       self.RandomGeneratedRadioButton.setChecked(True)
        self.RandomFixedRadioButton.setChecked(False)
     else:
-       self.RadomGeneratedRadioButton.setChecked(False)
+       self.RandomGeneratedRadioButton.setChecked(False)
        self.RandomFixedRadioButton.setChecked(True)
     if settings_dict.has_key("COPY_MUT_PROB") == True:
       copy_mutation_percent = float(settings_dict["COPY_MUT_PROB"]) * 100;
@@ -301,18 +272,28 @@
     # Turn off the controls 
 
     self.AncestorComboBox.setEnabled(False)
-    self.StopAtSpinBox.setEnabled(False)
-    self.StopManuallyRadioButton.setEnabled(False)
-    self.StopAtRadioButton.setEnabled(False)
+
+    # BDB -- while using pause at hack don't turn off these settings
+
+    # self.StopAtSpinBox.setEnabled(False) 
+    # self.StopManuallyRadioButton.setEnabled(False)
+    # self.StopAtRadioButton.setEnabled(False)
+
     self.WorldSizeSlider.setEnabled(False)
-    self.RandomSpinBox.setEnabled(False)
-    self.RadomGeneratedRadioButton.setEnabled(False)
+    self.RandomGeneratedRadioButton.setEnabled(False)
     self.RandomFixedRadioButton.setEnabled(False)
     self.MutationSlider.setEnabled(False)
     self.LocalBirthRadioButton.setEnabled(False)
     self.MassActionRadioButton.setEnabled(False)
-    self.RewardAllPushButton.setEnabled(False)
-    self.RewardNonePushButton.setEnabled(False)
+    self.EasyTextLabel.setEnabled(False)
+    self.ModerateTextLabel.setEnabled(False)
+    self.HardTextLabel.setEnabled(False)
+    self.VHardTextLabel.setEnabled(False)
+    self.BrutalTextLabel.setEnabled(False)
+    self.line1.setEnabled(False)
+    self.line2.setEnabled(False)
+    self.line3.setEnabled(False)
+    self.line4.setEnabled(False)
     self.NotCheckBox.setEnabled(False)
     self.NandCheckBox.setEnabled(False)
     self.AndCheckBox.setEnabled(False)
@@ -346,14 +327,20 @@
     self.StopManuallyRadioButton.setEnabled(True)
     self.StopAtRadioButton.setEnabled(True)
     self.WorldSizeSlider.setEnabled(True)
-    self.RandomSpinBox.setEnabled(True)
-    self.RadomGeneratedRadioButton.setEnabled(True)
+    self.RandomGeneratedRadioButton.setEnabled(True)
     self.RandomFixedRadioButton.setEnabled(True)
     self.MutationSlider.setEnabled(True)
     self.LocalBirthRadioButton.setEnabled(True)
     self.MassActionRadioButton.setEnabled(True)
-    self.RewardAllPushButton.setEnabled(True)
-    self.RewardNonePushButton.setEnabled(True)
+    self.EasyTextLabel.setEnabled(True)
+    self.ModerateTextLabel.setEnabled(True)
+    self.HardTextLabel.setEnabled(True)
+    self.VHardTextLabel.setEnabled(True)
+    self.BrutalTextLabel.setEnabled(True)
+    self.line1.setEnabled(True)
+    self.line2.setEnabled(True)
+    self.line3.setEnabled(True)
+    self.line4.setEnabled(True)
     self.NotCheckBox.setEnabled(True)
     self.NandCheckBox.setEnabled(True)
     self.AndCheckBox.setEnabled(True)
@@ -406,7 +393,7 @@
     settings_dict["WORLD-X"] = self.WorldSizeSlider.value()
     settings_dict["WORLD-Y"] = self.WorldSizeSlider.value()
     if self.RandomFixedRadioButton.isChecked() == True:
-      settings_dict["RANDOM_SEED"] = self.RandomSpinBox.value()
+      settings_dict["RANDOM_SEED"] = 777
     else:
       settings_dict["RANDOM_SEED"] = 0
     slide_value = float(self.MutationSlider.value())/100.0

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui	2006-03-29 19:49:14 UTC (rev 543)
@@ -361,11 +361,11 @@
             <property name="frameShadow">
                 <enum>Sunken</enum>
             </property>
-            <grid>
+            <vbox>
                 <property name="name">
                     <cstring>unnamed</cstring>
                 </property>
-                <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+                <widget class="QLabel">
                     <property name="name">
                         <cstring>RewardTextLabel</cstring>
                     </property>
@@ -375,48 +375,15 @@
                         </font>
                     </property>
                     <property name="text">
-                        <string>Which Functions Should Be Rewarded?</string>
+                        <string>&lt;p align="center"&gt;&lt;b&gt;What rewards are available in the environment?&lt;/b&gt;&lt;br&gt;
+(strength of reward shown in parentheses)&lt;/p&gt;</string>
                     </property>
                     <property name="alignment">
-                        <set>AlignCenter</set>
+                        <set>WordBreak|AlignCenter</set>
                     </property>
                 </widget>
-                <spacer row="1" column="0">
+                <widget class="QButtonGroup">
                     <property name="name">
-                        <cstring>spacer15_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>21</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-                <spacer row="1" column="3">
-                    <property name="name">
-                        <cstring>spacer16_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>21</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QButtonGroup" row="1" column="2">
-                    <property name="name">
                         <cstring>TasksToRewardGroup</cstring>
                     </property>
                     <property name="frameShape">
@@ -435,29 +402,29 @@
                         <property name="name">
                             <cstring>unnamed</cstring>
                         </property>
-                        <widget class="QCheckBox" row="0" column="0">
+                        <widget class="QCheckBox" row="2" column="0">
                             <property name="name">
-                                <cstring>NotCheckBox</cstring>
+                                <cstring>NandCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>not</string>
+                                <string>nand</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="1" column="0">
+                        <widget class="QCheckBox" row="2" column="2">
                             <property name="name">
-                                <cstring>NandCheckBox</cstring>
+                                <cstring>OrnCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>nand</string>
+                                <string>ornot</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="2" column="0">
+                        <widget class="QCheckBox" row="1" column="2">
                             <property name="name">
                                 <cstring>AndCheckBox</cstring>
                             </property>
@@ -468,52 +435,103 @@
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="0" column="1">
+                        <widget class="QCheckBox" row="1" column="4">
                             <property name="name">
-                                <cstring>OrnCheckBox</cstring>
+                                <cstring>OrCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>ornot</string>
+                                <string>or</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="2" column="1">
+                        <widget class="QCheckBox" row="1" column="6">
                             <property name="name">
-                                <cstring>AndnCheckBox</cstring>
+                                <cstring>NorCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>andnot</string>
+                                <string>nor</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="0" column="2">
+                        <widget class="QLabel" row="0" column="0">
                             <property name="name">
-                                <cstring>NorCheckBox</cstring>
+                                <cstring>EasyTextLabel</cstring>
                             </property>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
                             <property name="text">
-                                <string>nor</string>
+                                <string>&lt;p align="center"&gt;Easy&lt;br&gt;(1x)&lt;/p&gt;</string>
                             </property>
-                            <property name="checked">
-                                <bool>true</bool>
+                        </widget>
+                        <widget class="QLabel" row="0" column="4">
+                            <property name="name">
+                                <cstring>HardTextLabel</cstring>
                             </property>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>&lt;p align="center"&gt;Hard&lt;br&gt;(3x)&lt;/p&gt;</string>
+                            </property>
                         </widget>
-                        <widget class="QCheckBox" row="1" column="1">
+                        <widget class="QCheckBox" row="1" column="0">
                             <property name="name">
-                                <cstring>OrCheckBox</cstring>
+                                <cstring>NotCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>or</string>
+                                <string>not</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="1" column="2">
+                        <widget class="QLabel" row="0" column="2">
                             <property name="name">
+                                <cstring>ModerateTextLabel</cstring>
+                            </property>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>&lt;p align="center"&gt;Moderate&lt;br&gt;(2x)&lt;/p&gt;</string>
+                            </property>
+                        </widget>
+                        <widget class="Line" row="0" column="1" rowspan="3" colspan="1">
+                            <property name="name">
+                                <cstring>line1</cstring>
+                            </property>
+                            <property name="frameShape">
+                                <enum>VLine</enum>
+                            </property>
+                            <property name="frameShadow">
+                                <enum>Sunken</enum>
+                            </property>
+                            <property name="orientation">
+                                <enum>Vertical</enum>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="0" column="6">
+                            <property name="name">
+                                <cstring>VHardTextLabel</cstring>
+                            </property>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>&lt;p align="center"&gt;Very Hard&lt;br&gt;(4x)&lt;/p&gt;</string>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox" row="2" column="6">
+                            <property name="name">
                                 <cstring>XorCheckBox</cstring>
                             </property>
                             <property name="text">
@@ -523,74 +541,85 @@
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QCheckBox" row="2" column="2">
+                        <widget class="QCheckBox" row="2" column="4">
                             <property name="name">
-                                <cstring>EquCheckBox</cstring>
+                                <cstring>AndnCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>equals</string>
+                                <string>andnot</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                    </grid>
-                </widget>
-                <widget class="QButtonGroup" row="1" column="1">
-                    <property name="name">
-                        <cstring>RewardAllNoneButtonGroup</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>3</vsizetype>
-                            <horstretch>1</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="frameShadow">
-                        <enum>Plain</enum>
-                    </property>
-                    <property name="lineWidth">
-                        <number>0</number>
-                    </property>
-                    <property name="title">
-                        <string></string>
-                    </property>
-                    <property name="flat">
-                        <bool>true</bool>
-                    </property>
-                    <vbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QPushButton">
+                        <widget class="Line" row="0" column="3" rowspan="3" colspan="1">
                             <property name="name">
-                                <cstring>RewardNonePushButton</cstring>
+                                <cstring>line2</cstring>
                             </property>
-                            <property name="font">
-                                <font>
-                                </font>
+                            <property name="frameShape">
+                                <enum>VLine</enum>
                             </property>
-                            <property name="text">
-                                <string>None</string>
+                            <property name="frameShadow">
+                                <enum>Sunken</enum>
                             </property>
+                            <property name="orientation">
+                                <enum>Vertical</enum>
+                            </property>
                         </widget>
-                        <widget class="QPushButton">
+                        <widget class="Line" row="0" column="5" rowspan="3" colspan="1">
                             <property name="name">
-                                <cstring>RewardAllPushButton</cstring>
+                                <cstring>line3</cstring>
                             </property>
+                            <property name="frameShape">
+                                <enum>VLine</enum>
+                            </property>
+                            <property name="frameShadow">
+                                <enum>Sunken</enum>
+                            </property>
+                            <property name="orientation">
+                                <enum>Vertical</enum>
+                            </property>
+                        </widget>
+                        <widget class="Line" row="0" column="7" rowspan="3" colspan="1">
+                            <property name="name">
+                                <cstring>line4</cstring>
+                            </property>
+                            <property name="frameShape">
+                                <enum>VLine</enum>
+                            </property>
+                            <property name="frameShadow">
+                                <enum>Sunken</enum>
+                            </property>
+                            <property name="orientation">
+                                <enum>Vertical</enum>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="0" column="8">
+                            <property name="name">
+                                <cstring>BrutalTextLabel</cstring>
+                            </property>
                             <property name="font">
                                 <font>
                                 </font>
                             </property>
                             <property name="text">
-                                <string>All</string>
+                                <string>&lt;p align="center"&gt;Brutal&lt;br&gt;(5x)&lt;/p&gt;</string>
                             </property>
                         </widget>
-                    </vbox>
+                        <widget class="QCheckBox" row="1" column="8">
+                            <property name="name">
+                                <cstring>EquCheckBox</cstring>
+                            </property>
+                            <property name="text">
+                                <string>equals</string>
+                            </property>
+                            <property name="checked">
+                                <bool>true</bool>
+                            </property>
+                        </widget>
+                    </grid>
                 </widget>
-            </grid>
+            </vbox>
         </widget>
         <spacer>
             <property name="name">
@@ -644,7 +673,7 @@
                         </font>
                     </property>
                     <property name="text">
-                        <string>Random Number Generator Seed</string>
+                        <string>Should run be repeatable?</string>
                     </property>
                     <property name="alignment">
                         <set>AlignCenter</set>
@@ -683,81 +712,30 @@
                         </spacer>
                         <widget class="QRadioButton">
                             <property name="name">
-                                <cstring>RadomGeneratedRadioButton</cstring>
+                                <cstring>RandomGeneratedRadioButton</cstring>
                             </property>
                             <property name="font">
                                 <font>
                                 </font>
                             </property>
                             <property name="text">
-                                <string>Based on current time</string>
+                                <string>No</string>
                             </property>
                             <property name="checked">
                                 <bool>true</bool>
                             </property>
                         </widget>
-                        <widget class="QLayoutWidget">
+                        <widget class="QRadioButton">
                             <property name="name">
-                                <cstring>layout24</cstring>
+                                <cstring>RandomFixedRadioButton</cstring>
                             </property>
-                            <hbox>
-                                <property name="name">
-                                    <cstring>unnamed</cstring>
-                                </property>
-                                <widget class="QRadioButton">
-                                    <property name="name">
-                                        <cstring>RandomFixedRadioButton</cstring>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>Set to</string>
-                                    </property>
-                                </widget>
-                                <widget class="QSpinBox">
-                                    <property name="name">
-                                        <cstring>RandomSpinBox</cstring>
-                                    </property>
-                                    <property name="enabled">
-                                        <bool>false</bool>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>4</hsizetype>
-                                            <vsizetype>0</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="minimumSize">
-                                        <size>
-                                            <width>70</width>
-                                            <height>0</height>
-                                        </size>
-                                    </property>
-                                    <property name="maximumSize">
-                                        <size>
-                                            <width>90</width>
-                                            <height>32767</height>
-                                        </size>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                        </font>
-                                    </property>
-                                    <property name="maxValue">
-                                        <number>32767</number>
-                                    </property>
-                                    <property name="minValue">
-                                        <number>1</number>
-                                    </property>
-                                    <property name="value">
-                                        <number>32767</number>
-                                    </property>
-                                </widget>
-                            </hbox>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Yes</string>
+                            </property>
                         </widget>
                         <spacer>
                             <property name="name">
@@ -969,7 +947,7 @@
                         </font>
                     </property>
                     <property name="text">
-                        <string>Stop Run</string>
+                        <string>Pause Run</string>
                     </property>
                     <property name="alignment">
                         <set>WordBreak|AlignCenter</set>
@@ -1142,9 +1120,9 @@
 </widget>
 <connections>
     <connection>
-        <sender>RadomGeneratedRadioButton</sender>
+        <sender>RandomGeneratedRadioButton</sender>
         <signal>&lt;No Signal&gt;</signal>
-        <receiver>RadomGeneratedRadioButton</receiver>
+        <receiver>RandomGeneratedRadioButton</receiver>
         <slot>&lt;No)</slot>
     </connection>
 </connections>

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -66,6 +66,11 @@
     self.m_session_mdl.m_current_workspace = "default.workspace"
     self.m_session_mdl.m_current_freezer = os.path.join(self.m_session_mdl.m_current_workspace, "freezer")
 
+    # BDB -- hack to overcome problem with program crashing when Core ends
+
+    print "BDB -- pySessionCtrl: about to set .m_session_mdl.m_update_to_pause = -99"
+    self.m_session_mdl.m_update_to_pause = -99
+
     # Create a temporary subdirectory for general use in this session. Add a 
     # subdirectory to that for output files -- these files will only get 
     # put into named directories when frozen

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -53,6 +53,8 @@
   "AvidaGui2.pyAnalyzeControlsView",
   "AvidaGui2.pyAnalyzeControlsCtrl",
   "AvidaGui2.pyAvidaStatsInterface",
+  "AvidaGui2.pyBeforeStartingView",
+  "AvidaGui2.pyBeforeStartingCtrl",
   "AvidaGui2.pyDefaultFiles",
   "AvidaGui2.pyFreezeDialogView",
   "AvidaGui2.pyFreezeDialogCtrl",

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-03-29 05:10:40 UTC (rev 542)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-03-29 19:49:14 UTC (rev 543)
@@ -12,7 +12,7 @@
   
     settings_dict = in_dict["SETTINGS"]
 	
-    # Copies default event and environment files and adds names to the 
+    # Copies default event file and add to the 
     # temporary dictionary where the input files will live
 
     shutil.copyfile(os.path.join(workspace_dir, "events.default"), os.path.join(tmp_in_dir, "events.cfg"))
@@ -88,7 +88,10 @@
       if len(clean_line) > 0:
         var_name, value = string.split(clean_line)
         var_name = var_name.upper()
-        if settings_dict.has_key(var_name) == True:
+
+        # BDB -- added second if statment clause to support pause_at hack
+
+        if (settings_dict.has_key(var_name) == True) and (var_name != "MAX_UPDATES"):
           out_genesis_file.write(var_name + " " + str(settings_dict[var_name]) + "\n")
         else:
           out_genesis_file.write(line)




More information about the Avida-cvs mailing list