[Avida-cvs] [avida-svn] r813 - branches/developers/avida-edward/source/python/AvidaGui2
avidaedward@myxo.css.msu.edu
avidaedward at myxo.css.msu.edu
Fri Jul 7 05:43:32 PDT 2006
Author: avidaedward
Date: 2006-07-07 08:43:32 -0400 (Fri, 07 Jul 2006)
New Revision: 813
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup_utils.py
branches/developers/avida-edward/source/python/AvidaGui2/descr.py
branches/developers/avida-edward/source/python/AvidaGui2/pyHardwareTracer.py
branches/developers/avida-edward/source/python/AvidaGui2/pyInstructionDescriptionCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismDataCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py
branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py
branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:
- Removed pane-division between organism and organism-hardware in
organism viewer.
- Added "just executed" instruction description field.
- Renamed "current instruction" description field to "about to execute".
- Added a slider to control test-cpu mutation rate from back of organism
scope.
- Title in organism view: instructions to drag organism into viewer,
then change to name of organism.
- Replace flip arrow on organism scope with a button with text reading
"flip to settings".
- Added "info", "question", "warning" and "critical" messaging to the
user in the form of dialog boxes. After reading, the user can click
'ok'; in question, user can also click 'cancel'. (Modal boxes with
word bubble, question mark, exclamation point, or 'X'.)
- Note: can disable debugging messages via 'AvidaGui2.descr.DEBUG =
False'.
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-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/Avida_ED_startup_utils.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -16,6 +16,8 @@
import AvidaCore
import sys
+from descr import descr, info, question, warning, critical
+
# For developers : this asks the pyTemporaryReloads class to reload
# certain parts of the python source code for the Avida gui, picking up
# any changes since the last launch of the gui. This can be called
@@ -23,6 +25,16 @@
# the results of changes to the source code).
#
def Reload():
+ answer = question(
+"""Question dialog box permits
+'okay' or 'cancel'.""")
+ info("answer:", answer)
+
+ answer = question(
+"""(Again...)
+'okay' or 'cancel'.""")
+ info("answer:", answer)
+
import AvidaGui2.pyTemporaryReloads
reload(AvidaGui2.pyTemporaryReloads)
# Ask the linecache module to refresh its cache with new versions of
@@ -46,6 +58,12 @@
sys.exc_traceback = sys.last_traceback = None
s_splash.message("Loading Avida-ED user-interface ...")
s_splash.show()
+
+ info("Demo of one-element information message.")
+ info("Demo of multi-element information message.", "ick.")
+ warning("Demo of warning message with arbitrary elements.", None, [1,2,3,5], s_splash)
+ critical("Demo of critical message.")
+
try:
Reload()
from AvidaGui2.pyEduMainCtrl import pyEduMainCtrl
@@ -91,6 +109,8 @@
# edu_main_controller.m_prompt_for_workspace_ctrl.showDialog()
print """
+ To disable debugging messages, type 'AvidaGui2.descr.DEBUG = False'.
+
Type 'avida_ed=AvidaEd()' to reload the AvidaEd user interface.
"""
Modified: branches/developers/avida-edward/source/python/AvidaGui2/descr.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/descr.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/descr.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -1,17 +1,78 @@
+from qt import QMessageBox
+
import inspect
DEBUG = True
#DEBUG = False
-def descr(*details):
- if DEBUG:
+def _details(*details):
s = inspect.stack()
l = len(s) - 1
- frame = s[1]
- mthd = getattr(inspect.getargvalues(frame[0])[3]['self'], frame[3], None)
- doc, cls, fnm = mthd is None and (None, None, None) or (mthd.im_func.__doc__, mthd.im_class.__name__, mthd.im_func.__name__)
+ frame = s[2]
+ args, varargs, varkw, locals = inspect.getargvalues(frame[0])
+ if locals.has_key('self'):
+ mthd = getattr(locals['self'], frame[3], None)
+ doc, cls, fnm = mthd is None and (None, None, None) or (mthd.im_func.__doc__, mthd.im_class.__name__, mthd.im_func.__name__)
+ fun = "%s.%s" % (cls, fnm)
+ else:
+ doc = frame[0].f_code.co_consts[0]
+ fun = frame[0].f_code.co_name
if doc is None: doc = "<no docs.>"
- pfx, txt = details is () and ('.'*l, doc) or (' '*l, str(details))
- print "%s %s.%s: %s" % (pfx, cls, fnm, txt)
+ if details is ():
+ pfx, txt = '.'*l, doc
+ elif len(details) == 1:
+ pfx, txt = ' '*l, str(*details)
+ else:
+ pfx, txt = ' '*l, str(details)
+ return pfx, fun, txt
+def descr(*details):
+ if DEBUG:
+ pfx, fun, txt = _details(*details)
+ print "%s %s: %s" % (pfx, fun, txt)
+ return "%s %s: %s" % (pfx, fun, txt)
+
+def info(*details):
+ pfx, fun, txt = _details(*details)
+ QMessageBox.information(
+ None,
+ "Avida-ED Information",
+ txt,
+ QMessageBox.Ok,
+ QMessageBox.NoButton,
+ QMessageBox.NoButton
+ )
+
+def question(*details):
+ pfx, fun, txt = _details(*details)
+ return QMessageBox.Ok == QMessageBox.question(
+ None,
+ "Question",
+ txt,
+ QMessageBox.Ok,
+ QMessageBox.Cancel
+ )
+
+def warning(*details):
+ pfx, fun, txt = _details(*details)
+ QMessageBox.warning(
+ None,
+ "Avida-ED Warning",
+ "(In function %s:)\n%s" % (fun, txt),
+ QMessageBox.Ok,
+ QMessageBox.NoButton,
+ QMessageBox.NoButton
+ )
+
+def critical(*details):
+ pfx, fun, txt = _details(*details)
+ QMessageBox.critical(
+ None,
+ "Avida-ED Critical Error",
+ "(In function %s:)\n%s" % (fun, txt),
+ QMessageBox.Ok,
+ QMessageBox.NoButton,
+ QMessageBox.NoButton
+ )
+
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyHardwareTracer.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyHardwareTracer.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyHardwareTracer.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -8,7 +8,11 @@
def __init__(self, progress_callback = None):
pyHardwareTracerBase.__init__(self)
self.m_progress_callback = progress_callback
+ self.m_copy_mutation_rate = 0.0
+ def setTestCPUCopyMutationRate(self, copy_mutation_rate):
+ self.m_copy_mutation_rate = copy_mutation_rate
+
def TraceHardware_CPU(self, hardware):
self.m_hardware_trace.recordFrame(hardware)
if self.m_progress_callback is not None:
@@ -70,8 +74,7 @@
test_info.Clear()
organism = cTestCPU.SetupTestOrganism(test_info, analyze_genotype.GetGenome(), 0)
descr(organism)
- organism.MutationRates().SetCopyMutProb(0.08)
- organism.MutationRates().SetPointMutProb(0.08)
+ organism.MutationRates().SetCopyMutProb(self.m_copy_mutation_rate)
cTestCPU.TestGenome_Body(test_info, organism, analyze_genotype.GetGenome(), 0)
# Record some of the genotype's statistics.
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyInstructionDescriptionCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyInstructionDescriptionCtrl.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyInstructionDescriptionCtrl.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -71,28 +71,25 @@
self.setAlignment(Qt.WordBreak)
self.setReadOnly(True)
- #self.read_fn = None
+ self.read_fn = None
def setReadFn(self, sender, read_fn):
- #self.read_fn = read_fn
+ self.read_fn = read_fn
self.connect(sender, PYSIGNAL("propagated-FrameShownSig"), self.frameShownSlot)
return self
def frameShownSlot(self, frames, frame_no):
- #if frames is not None and frame_no < frames.m_gestation_time and self.read_fn is not None:
label_text = "(no instruction)"
- if frames is not None and frame_no < frames.m_gestation_time:
- #self.read_fn(frames, frame_no)
- inst_set = frames.getHardwareSnapshotAt(frame_no).GetInstSet()
- short_name = frames.m_genome_info[frame_no][frames.m_ihead_info[frame_no]]
- #self.setText(short_name)
+ actual_frame_no = None
+ if frames is not None and self.read_fn is not None:
+ actual_frame_no = self.read_fn(frames, frame_no)
+ if (actual_frame_no is not None) and (0 <= actual_frame_no) and (actual_frame_no < frames.m_gestation_time):
+ inst_set = frames.getHardwareSnapshotAt(actual_frame_no).GetInstSet()
+ short_name = frames.m_genome_info[actual_frame_no][frames.m_ihead_info[actual_frame_no]]
inst = cInstruction()
inst.SetSymbol(short_name)
long_name = inst_set.GetName(inst)
description = descriptions_dict.has_key(short_name) and descriptions_dict[short_name] or ""
label_text = "%s: %s\n%s" % (short_name, long_name, description)
- #self.setText("%s: %s" % (short_name, long_name))
- #else:
- # self.setText("(no instruction)")
self.setText(label_text)
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -36,10 +36,12 @@
current_page_int = self.m_organism_scope_widget_stack.id(current_page)
if (current_page_int == 0):
self.m_organism_scope_widget_stack.raiseWidget(1)
+ self.m_flip_button_text_label.setText("<p align=\"right\">Flip to<br>Viewer</p>")
QToolTip.remove(self.m_organism_scope_toggle)
QToolTip.add(self.m_organism_scope_toggle,"Flip to see <b><i>Organism Viewer</i></b>")
else:
self.m_organism_scope_widget_stack.raiseWidget(0)
+ self.m_flip_button_text_label.setText("<p align=\"right\">Flip to<br>Settings</p>")
QToolTip.remove(self.m_organism_scope_toggle)
QToolTip.add(self.m_organism_scope_toggle,"Flip to see <b><i>Organism Viewer Settings</i></b>")
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismView.ui 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismView.ui 2006-07-07 12:43:32 UTC (rev 813)
@@ -25,7 +25,7 @@
</property>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout64</cstring>
+ <cstring>layout7</cstring>
</property>
<hbox>
<property name="name">
@@ -66,12 +66,25 @@
</font>
</property>
<property name="text">
- <string>[organism]</string>
+ <string>[drag an organism into this window for analysis]</string>
</property>
<property name="toolTip" stdset="0">
<string>Name of organism being analyzed (dragged in from freezer)</string>
</property>
</widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>m_flip_button_text_label</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string><p align="right">Flip to<br>Settings</p></string>
+ </property>
+ </widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout178</cstring>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureCtrl.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureCtrl.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -3,39 +3,115 @@
from qt import *
+import math
+
class pyOrganismConfigureCtrl(pyOrganismConfigureView):
def __init__(self, parent = None, name = None, fl = 0):
pyOrganismConfigureView.__init__(self, parent, name, fl)
+
def construct(self, session_mdl):
self.m_session_mdl = session_mdl
- self.connect(self.m_heads_type_cb, SIGNAL("activated(int)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_HeadsTypeCBActivatedSig"))
+ self.connect(self.m_mutation_slider, SIGNAL("valueChanged(int)"),
+ self.ChangeMutationTextSlot)
+ self.connect(self.m_mutation_rate_lineedit, SIGNAL("returnPressed()"),
+ self.ChangeMutationSliderSlot)
- self.connect(self.m_show_task_tests_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowTaskTestsCBToggledSig"))
- self.connect(self.m_show_registers_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowRegistersCBToggledSig"))
- self.connect(self.m_animate_head_movement_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_AnimateHeadMovementCBToggledSig"))
- self.connect(self.m_show_stacks_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowStacksCBToggledSig"))
- self.connect(self.m_show_heads_as_letters_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowHeadsAsLettersCBToggledSig"))
- self.connect(self.m_show_instruction_names_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowInstructionNamesCBToggledSig"))
- self.connect(self.m_show_inputs_and_outputs_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowInputsAndOutputsCBToggledSig"))
- self.connect(self.m_show_full_stacks_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowFullStacksCBToggledSig"))
- self.connect(self.m_animate_instruction_copy_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_AnimateInstructionCopyCBToggledSig"))
- self.connect(self.m_show_hardware_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_ShowHardwareCBToggledSig"))
- self.connect(self.m_animate_organism_divide_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_AnimateOrganismDivideCBToggledSig"))
+ #self.connect(self.m_mutation_slider, SIGNAL("valueChanged(int)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_MutationSliderValueChangedSig"))
- self.connect(self.m_layout_spacing_sb, SIGNAL("valueChanged(int)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_LayoutSpacingSBValueChangedSig"))
- self.connect(self.m_hardware_indicator_size_sb, SIGNAL("valueChanged(int)"), self.m_session_mdl.m_session_mdtr,
- PYSIGNAL("ScopeConfig_HardwareIndicatorSBValueChangedSig"))
+ self.m_mutation_slider.setValue(-30000)
+ #self.ChangeMutationTextSlot()
+
+ #self.connect(self.m_heads_type_cb, SIGNAL("activated(int)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_HeadsTypeCBActivatedSig"))
+
+ #self.connect(self.m_show_task_tests_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowTaskTestsCBToggledSig"))
+ #self.connect(self.m_show_registers_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowRegistersCBToggledSig"))
+ #self.connect(self.m_animate_head_movement_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_AnimateHeadMovementCBToggledSig"))
+ #self.connect(self.m_show_stacks_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowStacksCBToggledSig"))
+ #self.connect(self.m_show_heads_as_letters_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowHeadsAsLettersCBToggledSig"))
+ #self.connect(self.m_show_instruction_names_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowInstructionNamesCBToggledSig"))
+ #self.connect(self.m_show_inputs_and_outputs_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowInputsAndOutputsCBToggledSig"))
+ #self.connect(self.m_show_full_stacks_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowFullStacksCBToggledSig"))
+ #self.connect(self.m_animate_instruction_copy_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_AnimateInstructionCopyCBToggledSig"))
+ #self.connect(self.m_show_hardware_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_ShowHardwareCBToggledSig"))
+ #self.connect(self.m_animate_organism_divide_cb, SIGNAL("toggled(bool)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_AnimateOrganismDivideCBToggledSig"))
+
+ #self.connect(self.m_layout_spacing_sb, SIGNAL("valueChanged(int)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_LayoutSpacingSBValueChangedSig"))
+ #self.connect(self.m_hardware_indicator_size_sb, SIGNAL("valueChanged(int)"), self.m_session_mdl.m_session_mdtr,
+ # PYSIGNAL("ScopeConfig_HardwareIndicatorSBValueChangedSig"))
+
+
+
+ # When the user changes the mutation slider (which has a log scale) change the
+ # text next to it (which is liner)
+
+ def ChangeMutationTextSlot(self):
+ slide_value = float(self.m_mutation_slider.value())/10000.0
+ slide_value = pow(10,slide_value)
+ if slide_value < 0.0011:
+ slide_value = 0.0
+ if slide_value >= 1 or slide_value < 0.00001:
+ slide_value_txt = ("%1.1f" % (slide_value)) # + "%"
+ elif slide_value > 0.1:
+ slide_value_txt = ("%1.2f" % (slide_value)) # + "%"
+ elif slide_value > 0.01:
+ slide_value_txt = ("%1.3f" % (slide_value)) # + "%"
+ else:
+ slide_value_txt = ("%1.4f" % (slide_value)) # + "%"
+ self.m_mutation_rate_lineedit.setText(slide_value_txt)
+ self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("ScopeConfig_MutationSliderValueChangedSig"),(slide_value,))
+
+ # When the user changes the mutation slider (which has a log scale) change the
+ # text next to it (which is liner). Must check if the text entered is a
+ # valid real number
+
+ def ChangeMutationSliderSlot(self):
+ validNumEntered = True
+ mutText = str(self.m_mutation_rate_lineedit.text())
+ mutText = (mutText.rstrip('% ')).lstrip('+- ')
+ decPtLocation = mutText.find('.')
+ if (decPtLocation == -1):
+ if (not mutText.isdigit()):
+ validNumEntered = False
+ else:
+ mutValue = float(mutText)
+ else:
+ if (not (mutText[0:decPtLocation].isdigit() and
+ mutText[decPtLocation+1:].isdigit())):
+ validNumEntered = False
+ else:
+ decPlace = float(len(mutText[decPtLocation+1:]))
+ divisor = pow(10.0,decPlace)
+ mutValue = float(mutText[0:decPtLocation]) + \
+ (float(mutText[decPtLocation+1:])/divisor)
+
+ # if they have entered a bad number pull the current value off the slider
+
+ if (not validNumEntered):
+ self.ChangeMutationTextSlot()
+ else:
+ if (mutValue < 0.0):
+ mutValue = 0.0
+ elif (mutValue > 100.0):
+ mutValue = 100.0
+ if mutValue > 0.00001:
+ self.m_mutation_slider.setValue(int(math.log10(mutValue) * 10000))
+ else:
+ self.m_mutation_slider.setValue(-30000)
+
+ self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("ScopeConfig_MutationSliderValueChangedSig"),(mutValue,))
+
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureView.ui 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismConfigureView.ui 2006-07-07 12:43:32 UTC (rev 813)
@@ -8,14 +8,14 @@
<rect>
<x>0</x>
<y>0</y>
- <width>577</width>
+ <width>492</width>
<height>487</height>
</rect>
</property>
<property name="caption">
<string>pyOrganismConfigureView</string>
</property>
- <grid>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -25,47 +25,12 @@
<property name="spacing">
<number>2</number>
</property>
- <widget class="QLayoutWidget" row="3" column="1">
+ <widget class="QLabel">
<property name="name">
- <cstring>layout25</cstring>
+ <cstring>textLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_animate_head_movement_cb</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="3" column="0">
- <property name="name">
- <cstring>textLabel4</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
@@ -74,122 +39,142 @@
</property>
<property name="font">
<font>
- <pointsize>9</pointsize>
+ <pointsize>14</pointsize>
<bold>1</bold>
</font>
</property>
<property name="text">
- <string><p align="right">Animate Head Movement:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="2" column="0">
- <property name="name">
- <cstring>textLabel4_2</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Animate Instruction Copy:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>textLabel1</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- </font>
- </property>
- <property name="text">
<string><p align="center">Organism Scope Settings</p></string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="QFrame">
<property name="name">
- <cstring>layout25_2</cstring>
+ <cstring>frame10</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
</property>
- <hbox>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="QLabel">
<property name="name">
- <cstring>m_animate_instruction_copy_cb</cstring>
+ <cstring>MutationRateHeadTextLabel</cstring>
</property>
- <property name="enabled">
- <bool>false</bool>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
</property>
<property name="text">
- <string></string>
+ <string>Per Site Mutation Rate</string>
</property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
<property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
+ <string><p>Set the rate of mutation from 0 to 100%</p></string>
</property>
</widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="4" column="1">
- <property name="name">
- <cstring>layout25_3</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>m_animate_organism_divide_cb</cstring>
+ <cstring>layout16</cstring>
</property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>m_mutation_slider</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>130</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="focusPolicy">
+ <enum>StrongFocus</enum>
+ </property>
+ <property name="minValue">
+ <number>-30000</number>
+ </property>
+ <property name="maxValue">
+ <number>20000</number>
+ </property>
+ <property name="lineStep">
+ <number>100</number>
+ </property>
+ <property name="pageStep">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>-3010</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string><p>Set Mutation Rate from 0 to 100 % <br>(use right and left arrow keys to fine tune the value)</P></string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>m_mutation_rate_lineedit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>40</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>45</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>%</string>
+ </property>
+ <property name="inputMask">
+ <string>xxxxx%; </string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string><P>Enter the exact mutation rate (0.0 to 100.0%)</p></string>
+ </property>
+ </widget>
+ </hbox>
</widget>
- </hbox>
+ </vbox>
</widget>
- <spacer row="15" column="0" rowspan="1" colspan="2">
+ <spacer>
<property name="name">
<cstring>spacer53</cstring>
</property>
@@ -206,591 +191,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel" row="14" column="0">
- <property name="name">
- <cstring>textLabel3</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Layout Spacing:</p></string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="12" column="1">
- <property name="name">
- <cstring>layout24_2_2_2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_task_tests_cb</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="11" column="0">
- <property name="name">
- <cstring>textLabel2_2_2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Inputs and Outputs:</p></string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="7" column="1">
- <property name="name">
- <cstring>layout24_2_3</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_hardware_cb</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="12" column="0">
- <property name="name">
- <cstring>textLabel2_2_2_2_2_2</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Task Tests:</p></string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="9" column="1">
- <property name="name">
- <cstring>layout24_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_stacks_cb</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Show organism's stacks</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="11" column="1">
- <property name="name">
- <cstring>layout24_2_2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_inputs_and_outputs_cb</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Show organism's input and output buffers</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="8" column="1">
- <property name="name">
- <cstring>layout24_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_registers_cb</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Show organism's registers</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QSpinBox" row="14" column="1">
- <property name="name">
- <cstring>m_layout_spacing_sb</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="6" column="1">
- <property name="name">
- <cstring>layout24</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_heads_as_letters_cb</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="8" column="0">
- <property name="name">
- <cstring>textLabel2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Registers:</p></string>
- </property>
- </widget>
- <widget class="QSpinBox" row="13" column="1">
- <property name="name">
- <cstring>m_hardware_indicator_size_sb</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" stdset="0">
- <string>How large to display stack, register and buffer information</string>
- </property>
- </widget>
- <widget class="QLabel" row="7" column="0">
- <property name="name">
- <cstring>textLabel2_2_3</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Hardware:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="13" column="0">
- <property name="name">
- <cstring>textLabel2_2_2_2_2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Hardware Indicator Size:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="10" column="0">
- <property name="name">
- <cstring>textLabel2_2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Full Stacks:</p></string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="10" column="1">
- <property name="name">
- <cstring>layout24_2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_full_stacks_cb</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Show either top or full stack (only works if <B><I>Show Stacks</i></b> is selected</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="9" column="0">
- <property name="name">
- <cstring>textLabel2_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Stacks:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="4" column="0">
- <property name="name">
- <cstring>textLabel4_3</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Animate Organism Divide:</p></string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="5" column="1">
- <property name="name">
- <cstring>layout24_3</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>m_show_instruction_names_cb</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="toolTip" stdset="0">
- <string><i>Not implemented</i></string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="6" column="0">
- <property name="name">
- <cstring>textLabel2</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Heads As Letters:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="5" column="0">
- <property name="name">
- <cstring>textLabel2_3</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Show Instruction Names:</p></string>
- </property>
- </widget>
- <widget class="QLabel" row="1" column="0">
- <property name="name">
- <cstring>textLabel4_2_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string><p align="right">Heads Type:</p></string>
- </property>
- </widget>
- <widget class="QComboBox" row="1" column="1">
- <item>
- <property name="text">
- <string>Dots</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Letters</string>
- </property>
- </item>
- <property name="name">
- <cstring>m_heads_type_cb</cstring>
- </property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- </font>
- </property>
- <property name="toolTip" stdset="0">
- <string>How to display read, write, flow and instruction heads</string>
- </property>
- </widget>
- </grid>
+ </vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismDataCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismDataCtrl.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismDataCtrl.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -186,12 +186,21 @@
self.widget_factory.setWidgetFn(instDescrSetup)
self.hideshow_cur_inst = self.hideshow_factory.newWidget()
- self.hideshow_cur_inst.getLabel().setText("Current instruction")
+ self.hideshow_cur_inst.getLabel().setText("About to Execute")
self.widget_factory.setParent(self.hideshow_cur_inst)
- self.curinst_descr = self.widget_factory.newWidget().setReadFn(self, None)
+ self.curinst_descr = self.widget_factory.newWidget().setReadFn(self, lambda f, fn: fn)
self.curinst_descr.setText("(no instruction)")
self.hideshow_all_hardware.updateMinWidth(self.hideshow_cur_inst.minimumWidth())
+ self.widget_factory.setWidgetFn(instDescrSetup)
+
+ self.hideshow_prv_inst = self.hideshow_factory.newWidget()
+ self.hideshow_prv_inst.getLabel().setText("Just Executed")
+ self.widget_factory.setParent(self.hideshow_prv_inst)
+ self.prvinst_descr = self.widget_factory.newWidget().setReadFn(self, lambda f, fn: fn - 1)
+ self.prvinst_descr.setText("(no instruction)")
+ self.hideshow_all_hardware.updateMinWidth(self.hideshow_prv_inst.minimumWidth())
+
# Create tasks widget
# self.widget_factory.setWidgetFn(tasksSetup)
# self.hideshow_tasks = self.hideshow_tasks_create()
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -4,6 +4,10 @@
from AvidaCore import cAnalyzeGenotype, cGenome, cInstruction, cInstUtil, cString
from pyHardwareTracer import pyHardwareTracer
from pyTimeline import pyTimeline, TimelineFlag
+
+from descr import descr, warning
+
+
from qt import *
import os
@@ -19,6 +23,12 @@
if not name: self.setName("pyOrganismScopeCtrl")
+ self.m_test_cpu_mutation_rate = 0.0
+ warning(
+"""random warning during initialization of
+"pyOrganismScopeCtrl" object."""
+)
+
def construct(self, session_mdl):
print "pyOrganismScopeCtrl.construct()."
self.m_session_mdl = session_mdl
@@ -28,38 +38,41 @@
self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("setAvidaSig"), self.setAvidaSlot)
self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("setDebugOrganismFileSig"), self.setDebugOrganismFileSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_HeadsTypeCBActivatedSig"),
- self.HeadsTypeCBActivatedSlot)
+ self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_MutationSliderValueChangedSig"),
+ self.MutationSliderValueChangedSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowTaskTestsCBToggledSig"),
- self.ShowTaskTestsCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowRegistersCBToggledSig"),
- self.ShowRegistersCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_AnimateHeadMovementCBToggledSig"),
- self.AnimateHeadMovementCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowStacksCBToggledSig"),
- self.ShowStacksCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowHeadsAsLettersCBToggledSig"),
- self.ShowHeadsAsLettersCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowInstructionNamesCBToggledSig"),
- self.ShowInstructionNamesCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowInputsAndOutputsCBToggledSig"),
- self.ShowInputsAndOutputsCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowFullStacksCBToggledSig"),
- self.ShowFullStacksCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_AnimateInstructionCopyCBToggledSig"),
- self.AnimateInstructionCopyCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowHardwareCBToggledSig"),
- self.ShowHardwareCBToggledSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_AnimateOrganismDivideCBToggledSig"),
- self.AnimateOrganismDivideCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_HeadsTypeCBActivatedSig"),
+ # self.HeadsTypeCBActivatedSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_LayoutSpacingSBValueChangedSig"),
- self.LayoutSpacingSBValueChangedSlot)
- self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_HardwareIndicatorSBValueChangedSig"),
- self.HardwareIndicatorSBValueChangedSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowTaskTestsCBToggledSig"),
+ # self.ShowTaskTestsCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowRegistersCBToggledSig"),
+ # self.ShowRegistersCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_AnimateHeadMovementCBToggledSig"),
+ # self.AnimateHeadMovementCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowStacksCBToggledSig"),
+ # self.ShowStacksCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowHeadsAsLettersCBToggledSig"),
+ # self.ShowHeadsAsLettersCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowInstructionNamesCBToggledSig"),
+ # self.ShowInstructionNamesCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowInputsAndOutputsCBToggledSig"),
+ # self.ShowInputsAndOutputsCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowFullStacksCBToggledSig"),
+ # self.ShowFullStacksCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_AnimateInstructionCopyCBToggledSig"),
+ # self.AnimateInstructionCopyCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_ShowHardwareCBToggledSig"),
+ # self.ShowHardwareCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_AnimateOrganismDivideCBToggledSig"),
+ # self.AnimateOrganismDivideCBToggledSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_LayoutSpacingSBValueChangedSig"),
+ # self.LayoutSpacingSBValueChangedSlot)
+ #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_HardwareIndicatorSBValueChangedSig"),
+ # self.HardwareIndicatorSBValueChangedSlot)
+
def dragEnterEvent( self, e ):
e.acceptAction(True)
@@ -133,6 +146,7 @@
progress_callback = ProgressCallback(self.m_session_mdl.m_session_mdtr)
hardware_tracer = pyHardwareTracer(progress_callback)
+ hardware_tracer.setTestCPUCopyMutationRate(self.m_test_cpu_mutation_rate)
hardware_tracer.traceAnalyzeGenotype(analyze_genotype, self.m_avida.m_environment, should_use_resources = False)
progress_callback(2000)
@@ -173,48 +187,52 @@
QMessageBox.NoButton
)
- def HeadsTypeCBActivatedSlot(self, index):
- self.anim.setDisplayHeadsAs(index)
+ def MutationSliderValueChangedSlot(self, value):
+ self.m_test_cpu_mutation_rate = value / 100.
+ descr("self.m_test_cpu_mutation_rate", self.m_test_cpu_mutation_rate)
- def ShowTaskTestsCBToggledSlot(self, bool):
- self.anim.setShowTaskTestsCBToggled(bool)
+ #def HeadsTypeCBActivatedSlot(self, index):
+ # self.anim.setDisplayHeadsAs(index)
- def ShowRegistersCBToggledSlot(self, bool):
- self.anim.setShowRegistersCBToggled(bool)
+ #def ShowTaskTestsCBToggledSlot(self, bool):
+ # self.anim.setShowTaskTestsCBToggled(bool)
- def AnimateHeadMovementCBToggledSlot(self, bool):
- pass
+ #def ShowRegistersCBToggledSlot(self, bool):
+ # self.anim.setShowRegistersCBToggled(bool)
- def ShowStacksCBToggledSlot(self, bool):
- self.anim.setShowStacksCBToggled(bool)
+ #def AnimateHeadMovementCBToggledSlot(self, bool):
+ # pass
- def ShowHeadsAsLettersCBToggledSlot(self, bool):
- pass
+ #def ShowStacksCBToggledSlot(self, bool):
+ # self.anim.setShowStacksCBToggled(bool)
- def ShowInstructionNamesCBToggledSlot(self, bool):
- self.anim.setShowInstructionNamesCBToggled(bool)
+ #def ShowHeadsAsLettersCBToggledSlot(self, bool):
+ # pass
- def ShowInputsAndOutputsCBToggledSlot(self, bool):
- self.anim.setShowInputsAndOutputsCBToggled(bool)
+ #def ShowInstructionNamesCBToggledSlot(self, bool):
+ # self.anim.setShowInstructionNamesCBToggled(bool)
- def ShowFullStacksCBToggledSlot(self, bool):
- self.anim.setShowFullStacksCBToggled(bool)
+ #def ShowInputsAndOutputsCBToggledSlot(self, bool):
+ # self.anim.setShowInputsAndOutputsCBToggled(bool)
- def AnimateInstructionCopyCBToggledSlot(self, bool):
- pass
+ #def ShowFullStacksCBToggledSlot(self, bool):
+ # self.anim.setShowFullStacksCBToggled(bool)
- def ShowHardwareCBToggledSlot(self, bool):
- self.anim.setShowHardwareCBToggled(bool)
+ #def AnimateInstructionCopyCBToggledSlot(self, bool):
+ # pass
- def AnimateOrganismDivideCBToggledSlot(self, bool):
- pass
+ #def ShowHardwareCBToggledSlot(self, bool):
+ # self.anim.setShowHardwareCBToggled(bool)
- def LayoutSpacingSBValueChangedSlot(self, value):
- pass
+ #def AnimateOrganismDivideCBToggledSlot(self, bool):
+ # pass
- def HardwareIndicatorSBValueChangedSlot(self, value):
- self.anim.setHardwareIndicatorSBValueChanged(value)
+ #def LayoutSpacingSBValueChangedSlot(self, value):
+ # pass
+ #def HardwareIndicatorSBValueChangedSlot(self, value):
+ # self.anim.setHardwareIndicatorSBValueChanged(value)
+
def flagEvents(self):
"Flag events on timeline"
if self.m_frames is not None:
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeView2.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -86,6 +86,8 @@
QCanvasView.__init__(self,parent,name,fl)
if not name: self.setName("pyOrganismScopeView2")
+ self.setFrameShape(QScrollView.NoFrame)
+ self.setFrameShadow(QScrollView.Plain)
self.setVScrollBarMode(QScrollView.AlwaysOff)
self.setHScrollBarMode(QScrollView.AlwaysOff)
self.m_canvas = QCanvas()
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyTemporaryReloads.py 2006-07-07 12:43:32 UTC (rev 813)
@@ -96,6 +96,7 @@
"AvidaGui2.pyPopulationCellItem",
"AvidaGui2.pyReadFreezer",
"AvidaGui2.pyTaskDescriptionCtrl",
+ "AvidaGui2.pyTimeline",
"AvidaGui2.pyTimelineView",
"AvidaGui2.pyTimelineCtrl",
"AvidaGui2.pyWriteGenesisEvent",
Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-07-07 02:54:14 UTC (rev 812)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-07-07 12:43:32 UTC (rev 813)
@@ -90,21 +90,13 @@
- hack with a pause signal upon a certain event completed.
- toggle to see legend instruction names to colors
- toggle to see letters
+
- in petri dish, indication of each mutation as it occurs.
-
-- title in organism view: instructions to drag organism into viewer,
- then change to name of organism. (jeff)
-- get rid of pane
- see tasks on timeline (josh)
-- task box
-- step forward/back buttons in organism scope
Priority Medium-
- run things throught the test cpus (so we can accurately paint loaded
dishes and so the graphs have good data from the get go)
-- 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)
- change the text in analyze mode to list the population instead of what
it currently state (12/21/05)
@@ -177,6 +169,7 @@
15-Jun-06 Add Viewers to view choice on menu -- Finished 03-Jul-06
+
************Kaben******************
* 23-Jan-06 Get program to run on all Macs -- Finished 27-Jan-06
@@ -192,6 +185,26 @@
- say, perhaps, just drawing a line at divide points when copy is
complete
+* July-06
+- task box in org scope
+- step forward/back buttons in organism scope
+
+- got rid of pane-division between organism and organism-hardware in org
+ scope
+- added "just executed" instruction description field
+- renamed "current instruction" description field to "about to execute"
+- added a slider to control test-cpu mutation rate from back of organism
+ scope.
+- title in organism view: instructions to drag organism into viewer,
+ then change to name of organism.
+- replace flip arrow on organism scope with a button with text reading
+ "flip to settings"
+- added "info", "question", "warning" and "critical" messaging to the
+ user in the form of dialog boxes. After reading, the user can click
+ 'ok'; in question, user can also click 'cancel'. (modal boxes with
+ word bubble, question mark, exclamation point, or 'X'.)
+- Note: can disable debugging messages via 'AvidaGui2.descr.DEBUG = False'.
+
************Josh*******************
16-Jan-06 Get Windows version working -- Finished 21-Feb-06
More information about the Avida-cvs
mailing list