[Avida-cvs] [Avida2-svn] r153 - trunk/source/python/AvidaGui2
baerb at myxo.css.msu.edu
baerb at myxo.css.msu.edu
Wed Apr 27 07:17:19 PDT 2005
Author: baerb
Date: 2005-04-27 10:17:19 -0400 (Wed, 27 Apr 2005)
New Revision: 153
Modified:
trunk/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
trunk/source/python/AvidaGui2/pyFreezerCtrl.py
trunk/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py
trunk/source/python/AvidaGui2/pyPetriConfigureView.ui
trunk/source/python/AvidaGui2/pyPetriDishCtrl.py
Log:
Attempt to get shutdown code to work correctly -- not functioning correctly.
Modified: trunk/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyEduWorkspaceCtrl.py 2005-04-15 11:10:37 UTC (rev 152)
+++ trunk/source/python/AvidaGui2/pyEduWorkspaceCtrl.py 2005-04-27 14:17:19 UTC (rev 153)
@@ -146,7 +146,7 @@
self.m_session_mdl.m_current_workspce = str(workspace_dir) + "/"
self.m_session_mdl.m_current_freezer = self.m_session_mdl.m_current_workspce + "freezer/"
self.m_session_mdl.m_session_mdtr.emit(
- PYSIGNAL("doRefreshFreezerInventory"), ())
+ PYSIGNAL("doRefreshFreezerInventorySig"), ())
# public slot
@@ -161,7 +161,7 @@
if freezer_dir.strip() != "":
self.m_session_mdl.m_current_freezer = str(freezer_dir) + "/"
self.m_session_mdl.m_session_mdtr.emit(
- PYSIGNAL("doRefreshFreezerInventory"), ())
+ PYSIGNAL("doRefreshFreezerInventorySig"), ())
# public slot
@@ -277,5 +277,6 @@
if quit_return == m_quit_avida_ed.QuitFlag:
self.emit(PYSIGNAL("quitAvidaPhaseIISig"), ())
elif quit_return == m_quit_avida_ed.FreezeQuitFlag:
- self.emit(PYSIGNAL("FreezeDishPhaseISig"), ())
+ print "at pyEduWorkspaceCtrl:startQuitProcessSlot emited FreezeDishPhaseISig"
+ self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("FreezeDishPhaseISig"), (False, True, ))
Modified: trunk/source/python/AvidaGui2/pyFreezerCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyFreezerCtrl.py 2005-04-15 11:10:37 UTC (rev 152)
+++ trunk/source/python/AvidaGui2/pyFreezerCtrl.py 2005-04-27 14:17:19 UTC (rev 153)
@@ -21,7 +21,7 @@
def construct(self, session_mdl):
self.m_session_mdl = session_mdl
self.connect(self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("doRefreshFreezerInventory"),
+ PYSIGNAL("doRefreshFreezerInventorySig"),
self.createFreezerIndexSlot)
self.createFreezerIndexSlot()
Modified: trunk/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py 2005-04-15 11:10:37 UTC (rev 152)
+++ trunk/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py 2005-04-27 14:17:19 UTC (rev 153)
@@ -18,6 +18,9 @@
self.m_gradient_scale_ctrl.construct(self.m_session_mdl)
self.m_live_controls_ctrl.construct(self.m_session_mdl)
self.m_petri_configure_ctrl.construct(self.m_session_mdl)
+ self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("freezeDishPhaseISig"), self.m_petri_dish_ctrl.extractPopulationSlot)
+ self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("freezeDishPhaseISig"), self.freezeDishPhaseISlot)
+
self.connect(self.m_petri_configure_ctrl, PYSIGNAL("freezeDishPhaseISig"), self.m_petri_dish_ctrl.extractPopulationSlot)
self.connect(self.m_petri_dish_ctrl, PYSIGNAL("freezeDishPhaseIISig"), self.m_petri_configure_ctrl.FreezePetriSlot)
self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("setAvidaSig"), self.setAvidaSlot)
@@ -116,3 +119,11 @@
if self.dishDisabled:
return
self.PopulationTextLabel.setText(dishName)
+
+ # Dummy routine
+
+ def freezeDishPhaseISlot(self, send_reset_signal = False, send_quit_signal = False):
+ print "in pyOnePop_PetriDishCtrl recieved freezeDishPhaseISig"
+ print "send_reset_signal = " + str(send_reset_signal)
+ print "send_quit_signal = " + str(send_quit_signal)
+
Modified: trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py 2005-04-15 11:10:37 UTC (rev 152)
+++ trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py 2005-04-27 14:17:19 UTC (rev 153)
@@ -228,11 +228,10 @@
is_empty_dish = m_pop_up_freezer_file_name.EmptyRadioButton.isChecked()
freezer_file = pyWriteToFreezer(tmp_dict, is_empty_dish, file_name)
self.m_session_mdl.m_session_mdtr.emit(
- PYSIGNAL("doRefreshFreezerInventory"), ())
+ PYSIGNAL("doRefreshFreezerInventorySig"), ())
if send_reset_signal:
- pass
+ print "sending reset signal from pyPetriConfigureCtrl:FreezePetriSlot"
if send_quit_signal:
- pass
-
-
-
\ No newline at end of file
+ print "sending quit signal from pyPetriConfigureCtrl:FreezePetriSlot"
+ self.m_session_mdl.m_session_mdtr.emit(
+ PYSIGNAL("quitAvidaPhaseIISig"), ())
Modified: trunk/source/python/AvidaGui2/pyPetriConfigureView.ui
===================================================================
--- trunk/source/python/AvidaGui2/pyPetriConfigureView.ui 2005-04-15 11:10:37 UTC (rev 152)
+++ trunk/source/python/AvidaGui2/pyPetriConfigureView.ui 2005-04-27 14:17:19 UTC (rev 153)
@@ -157,7 +157,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout78</cstring>
+ <cstring>layout10</cstring>
</property>
<vbox>
<property name="name">
@@ -184,7 +184,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout77</cstring>
+ <cstring>layout9</cstring>
</property>
<hbox>
<property name="name">
@@ -202,7 +202,7 @@
<number>1</number>
</property>
<property name="maxValue">
- <number>200</number>
+ <number>100</number>
</property>
<property name="lineStep">
<number>1</number>
@@ -224,12 +224,20 @@
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="font">
<font>
</font>
</property>
<property name="text">
- <string>0 x 0 cells</string>
+ <string>100 x 100 cells</string>
</property>
</widget>
</hbox>
Modified: trunk/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyPetriDishCtrl.py 2005-04-15 11:10:37 UTC (rev 152)
+++ trunk/source/python/AvidaGui2/pyPetriDishCtrl.py 2005-04-27 14:17:19 UTC (rev 153)
@@ -135,7 +135,7 @@
if self.m_canvas: self.m_canvas.update()
- def extractPopulationSlot(self):
+ def extractPopulationSlot(self, send_reset_signal = False, send_quit_signal = False):
population_dict = {}
for x in range(self.m_world_w):
for y in range(self.m_world_h):
@@ -145,7 +145,7 @@
organism = cell.GetOrganism()
genome = organism.GetGenome()
population_dict[cell.GetID()] = str(genome.AsString())
- self.emit(PYSIGNAL("freezeDishPhaseIISig"), (population_dict, ))
+ self.emit(PYSIGNAL("freezeDishPhaseIISig"), (population_dict, send_reset_signal, send_quit_signal, ))
def zoomSlot(self, zoom_factor):
if self.m_canvas_view:
More information about the Avida-cvs
mailing list