[Avida-cvs] [avida-svn] r766 - branches/developers/avida-edward/source/python/AvidaGui2
baerb@myxo.css.msu.edu
baerb at myxo.css.msu.edu
Thu Jun 22 12:38:32 PDT 2006
Author: baerb
Date: 2006-06-22 15:38:32 -0400 (Thu, 22 Jun 2006)
New Revision: 766
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeOrganismView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerView.ui
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/pyPetriConfigureCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyQuitDialogView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:
Change some mouse over help.
Fixed it so you can run with just one cell.
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyBeforeStartingView.ui 2006-06-22 19:38:32 UTC (rev 766)
@@ -78,7 +78,7 @@
<bool>false</bool>
</property>
<property name="toolTip" stdset="0">
- <string><p>Use a directory that has already been created</P></string>
+ <string><p>Use a workspace that has already been created</P></string>
</property>
</widget>
<widget class="QPushButton">
@@ -126,7 +126,7 @@
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string><p>Don't freeze and return to the program</P></string>
+ <string><p>Don't freeze; return to the program</P></string>
</property>
</widget>
</vbox>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeOrganismView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeOrganismView.ui 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeOrganismView.ui 2006-06-22 19:38:32 UTC (rev 766)
@@ -96,7 +96,7 @@
<string>Cancel</string>
</property>
<property name="toolTip" stdset="0">
- <string><p>Don't save, return to the program</P></string>
+ <string><p>Don't save; return to the program</P></string>
</property>
</widget>
</hbox>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py 2006-06-22 19:38:32 UTC (rev 766)
@@ -26,7 +26,22 @@
freezer_item_name = QString()
if e.source() is self:
return
- if ( QTextDrag.decode( e, freezer_item_name ) ) : #freezer_item_name is a string...the file name
+
+ # freezer_item_name is a string...the file name
+
+ print type(e)
+
+ if ( QIconDrag.canDecode(e)):
+ print "BDB -- can decode icon"
+ format = QDropEvent.format(e, 0)
+ print "format = " + str(format)
+ print type(e.encodedData(format))
+ print "--------------------"
+ print dir(e.encodedData(format))
+ print str(e.encodedData(format))
+ print "BDB -- " + str(e.encodedData(format).data())
+ if ( QTextDrag.decode( e, freezer_item_name ) ) :
+ print "BDB:pyFreezerListView freezer_item_name = ", str(freezer_item_name)
if freezer_item_name[:9] == 'organism.':
freezer_item_name = freezer_item_name[9:]
self.FreezeOrganism(freezer_item_name)
@@ -49,10 +64,13 @@
def __init__(self, *args):
apply(QListViewItem.__init__,(self,) + args)
descr()
+
def dragEntered(self):
descr()
+
def dragLeft(self):
descr()
+
def dropped(self, e):
descr(e)
@@ -60,10 +78,13 @@
def __init__(self, *args):
apply(QListViewItem.__init__,(self,) + args)
descr()
+
def dragEntered(self):
descr()
+
def dragLeft(self):
descr()
+
def dropped(self, e):
descr(e)
@@ -71,11 +92,14 @@
def __init__(self, *args):
apply(QListViewItem.__init__,(self,) + args)
descr()
+
def dragEntered(self):
self.setDropEnabled(True)
descr()
+
def dragLeft(self):
descr()
+
def dropped(self, e):
descr(e)
@@ -132,7 +156,7 @@
SIGNAL("rightButtonPressed(QListViewItem*, const QPoint &, int )"),
self.right_clicked_itemSlot)
self.setAcceptDrops(1)
- QToolTip.add(self,"Storage for environment settings, full populations and individual organisms")
+ QToolTip.add(self,"<p>Storage for environment settings, full populations and individual organisms</p>")
descr()
# This shadows pyFreezerView.languageChange, which was generated by
@@ -225,12 +249,8 @@
file_name = os.path.join(self.m_session_mdl.m_current_freezer, file_name)
dragHolder = self.itemDrag( file_name, self )
-# maybe play with iconView
-# dragHolder.dragEnabled()
dragHolder.dragCopy()
-
-
# if freezer item is clicked read file/directory assocatied with item
def clicked_itemSlot(self, item):
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerView.ui 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerView.ui 2006-06-22 19:38:32 UTC (rev 766)
@@ -104,7 +104,7 @@
<enum>AllColumns</enum>
</property>
<property name="toolTip" stdset="0">
- <string>Storage for</string>
+ <string><p>Storage for existing petri dishes and organisims</p></string>
</property>
</widget>
</vbox>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismCtrl.py 2006-06-22 19:38:32 UTC (rev 766)
@@ -37,9 +37,9 @@
if (current_page_int == 0):
self.m_organism_scope_widget_stack.raiseWidget(1)
QToolTip.remove(self.m_organism_scope_toggle)
- QToolTip.add(self.m_organism_scope_toggle,"Flip to see <b><i>Organism Scope</i></b>")
+ 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)
QToolTip.remove(self.m_organism_scope_toggle)
- QToolTip.add(self.m_organism_scope_toggle,"Flip to see <b><i>Organism Scope Settings</i></b>")
+ 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-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOneOrganismView.ui 2006-06-22 19:38:32 UTC (rev 766)
@@ -113,7 +113,7 @@
<iconset>image1</iconset>
</property>
<property name="toolTip" stdset="0">
- <string>Flip to see <b><i>Organism Scope Settings</i></b></string>
+ <string>Flip to see <b><i>Organism Viewer Settings</i></b></string>
</property>
</widget>
<spacer>
@@ -229,12 +229,14 @@
<container>0</container>
<sizepolicy>
<hordata>5</hordata>
- <verdata>5</verdata>
+ <verdata>0</verdata>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<pixmap>image2</pixmap>
<property type="0">3</property>
+ <property type="1">pyOrganismConfigureCtrl</property>
+ <property type="3">-1</property>
<property type="pyOrganismConfigureCtrl"></property>
<property type="-1">1</property>
</customwidget>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py 2006-06-22 19:38:32 UTC (rev 766)
@@ -82,6 +82,8 @@
self.connect(self.AncestorIconView,
SIGNAL("dropped(QDropEvent*,const QValueList<QIconDragItem>&)"),
self.petriAncestorDroppedSlot)
+ self.connect(self.AncestorIconView, SIGNAL("clicked(QIconViewItem*)"),
+ self.setAncestorDragSlot)
self.ChangeMutationTextSlot()
self.ChangeWorldSizeTextSlot()
self.m_session_mdl.m_session_mdtr.emit(
@@ -597,8 +599,12 @@
descr(e)
freezer_item_name = QString()
- if ( QTextDrag.decode( e, freezer_item_name ) ) : #freezer_item_name is a string...the file name
+
+ # freezer_item_name is a string...the file name
+
+ if ( QTextDrag.decode( e, freezer_item_name ) ) :
freezer_item_name = str(e.encodedData("text/plain"))
+ print "BDB:dragEnterEvent -- freezer item name = " + freezer_item_name
if os.path.exists(freezer_item_name) == False:
descr("that was not a valid path (1)")
else:
@@ -611,6 +617,7 @@
freezer_item_name = QString()
if ( QTextDrag.decode( e, freezer_item_name ) ) :
freezer_item_name = str(e.encodedData("text/plain"))
+ print "BDB:dropEvent -- freezer item name = " + freezer_item_name
if os.path.exists(freezer_item_name) == False:
print "that was not a valid path (2)"
else:
@@ -626,6 +633,7 @@
freezer_item_name = QString()
if ( QTextDrag.decode( e, freezer_item_name ) and not self.DishDisabled) :
freezer_item_name = str(e.encodedData("text/plain"))
+ print "BDB:petriDroppedEvent -- freezer item name = " + freezer_item_name
if freezer_item_name[-8:] == 'organism':
core_name = freezer_item_name[:-9]
core_name = os.path.basename(str(freezer_item_name[:-9]))
@@ -638,8 +646,29 @@
freezer_item_name = QString()
if ( QTextDrag.decode( e, freezer_item_name ) and not self.DishDisabled) :
freezer_item_name = str(e.encodedData("text/plain"))
+ print "BDB:petriAncestorDroppedEvent -- freezer item name = " + freezer_item_name
if freezer_item_name[-8:] == 'organism':
core_name = freezer_item_name[:-9]
core_name = os.path.basename(str(freezer_item_name[:-9]))
tmp_item = QIconViewItem(self.AncestorIconView, core_name, self.image0)
return
+
+ # class itemDrag(QTextDrag):
+ # def __init__(self, item_name, parent=None, name=None):
+ # QStoredDrag.__init__(self, 'item name (QString)', parent, name)
+ # self.setText(item_name)
+ # descr(item_name)
+
+
+ def setAncestorDragSlot(self, item):
+ descr()
+
+ # if the user clicks on a portion of the ancestor icon view that does not
+ # have an actual icon quit this subroutine
+
+ print type(item)
+ if (not item):
+ print "BDB -- Not an item"
+ return
+ dragHolder = QTextDrag("ancestor." + str(item.text()), self.AncestorIconView, "dragname")
+ dragHolder.dragCopy()
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureView.ui 2006-06-22 19:38:32 UTC (rev 766)
@@ -136,7 +136,7 @@
<enum>Horizontal</enum>
</property>
<property name="toolTip" stdset="0">
- <string><p>Set Mutation Rate from 0 to 100 % (use right and left arrow keys to fine tune the value)</P></string>
+ <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" row="1" column="1">
@@ -170,7 +170,7 @@
<string>xxxxx%; </string>
</property>
<property name="toolTip" stdset="0">
- <string><P>Enter the exact mutation rate (1 to 100%)</p></string>
+ <string><P>Enter the exact mutation rate (0.0 to 100.0%)</p></string>
</property>
</widget>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
@@ -189,7 +189,7 @@
<set>AlignCenter</set>
</property>
<property name="toolTip" stdset="0">
- <string>Set the rate of mutation from 0 to 1</string>
+ <string><p>Set the rate of mutation from 0 to 100%</p></string>
</property>
</widget>
</grid>
@@ -251,7 +251,7 @@
<enum>Horizontal</enum>
</property>
<property name="toolTip" stdset="0">
- <string>Set the size of the petri dish (1 to 100)</string>
+ <string><p>Set the height and width of the petri dish (1 to 100)</p></string>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="1">
@@ -293,7 +293,7 @@
<string>000; </string>
</property>
<property name="toolTip" stdset="0">
- <string><p>Enter world size</p></string>
+ <string><p>Enter exact height and width of the petri dish</p></string>
</property>
</widget>
<widget class="QLabel">
@@ -437,6 +437,9 @@
<property name="arrangement">
<enum>TopToBottom</enum>
</property>
+ <property name="toolTip" stdset="0">
+ <string><P>The name of the organism(s) that will start the population on an empty petri dish (normally dragged in)</p></string>
+ </property>
</widget>
</vbox>
</widget>
@@ -536,7 +539,7 @@
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string>When a new organism is split off place it in one of the 8 cells around the parent</string>
+ <string><p>When a new organism is split off place it in one of the 8 cells around the parent</p></string>
</property>
</widget>
<widget class="QRadioButton">
@@ -554,7 +557,7 @@
<string>Anywhere, randomly</string>
</property>
<property name="toolTip" stdset="0">
- <string>When a new organism is split off place it in a cell any where in the petri dish</string>
+ <string><p>When a new organism is split off place it in a cell anywhere in the petri dish</p></string>
</property>
</widget>
</hbox>
@@ -1016,7 +1019,7 @@
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string>Each time this petri is run the results will not be exactly the same</string>
+ <string><p>Each time this petri dish is run the mutations will be different</p></string>
</property>
</widget>
<widget class="QRadioButton">
@@ -1034,7 +1037,7 @@
<string>Yes</string>
</property>
<property name="toolTip" stdset="0">
- <string>Each time this petri is run the results will be exactly the same</string>
+ <string><p>Each time this petri dish is run the mutations will be exactly the same</p></string>
</property>
</widget>
</hbox>
@@ -1143,7 +1146,7 @@
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
- <string>Program will run until you pause it using the button under the petri dish</string>
+ <string><p>Run will continue until you pause it using the button under the petri dish</P></string>
</property>
</widget>
<widget class="QRadioButton">
@@ -1165,7 +1168,7 @@
<string>At</string>
</property>
<property name="toolTip" stdset="0">
- <string>Run will pause at a given update and wait to you press the play button under the petri dish</string>
+ <string><p>Run will pause at a given update and wait to you press the play button under the petri dish</p></string>
</property>
</widget>
<widget class="QSpinBox">
@@ -1194,6 +1197,9 @@
<property name="value">
<number>10000</number>
</property>
+ <property name="toolTip" stdset="0">
+ <string><p>Run will pause at a given update and wait to you press the play button under the petri dish</p></string>
+ </property>
</widget>
</hbox>
</widget>
@@ -1229,7 +1235,7 @@
<string>Freeze Petri Dish</string>
</property>
<property name="toolTip" stdset="0">
- <string>Save either an empty or full petri dish to the freezer</string>
+ <string><p>Save either an empty or full petri dish to the freezer</p></string>
</property>
</widget>
</vbox>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2006-06-22 19:38:32 UTC (rev 766)
@@ -25,7 +25,6 @@
def hasHeightForWidth(self): return True
def heightForWidth(self, w): return w
-#class pyPetriDishCtrl(pyPetriDishView):
class pyPetriDishCtrl(QWidget):
def __init__(self,parent = None,name = None,fl = 0):
#pyPetriDishView.__init__(self,parent,name,fl)
@@ -84,12 +83,22 @@
PYSIGNAL("orgClickedOnSig"), self.updateOrgClickedOutlineCellNumberSlot)
self.connect( self.m_session_mdl.m_session_mdtr,
PYSIGNAL("orgClickedOnSig"), self.setDragSlot)
- self.connect(self.m_petri_dish_ctrl_h_scrollBar, SIGNAL("valueChanged(int)"), self.moveCanvasHorizontallySlot)
- self.connect(self.m_petri_dish_ctrl_h_scrollBar, SIGNAL("nextLine()"), self.hbarScrollNextLineSlot)
- self.connect(self.m_petri_dish_ctrl_h_scrollBar, SIGNAL("prevLine()"), self.hbarScrollPrevLineSlot)
- self.connect(self.m_petri_dish_ctrl_v_scrollBar, SIGNAL("valueChanged(int)"), self.moveCanvasVerticallySlot)
- self.connect(self.m_petri_dish_ctrl_v_scrollBar, SIGNAL("nextLine()"), self.vbarScrollNextLineSlot)
- self.connect(self.m_petri_dish_ctrl_v_scrollBar, SIGNAL("prevLine()"), self.vbarScrollPrevLineSlot)
+ self.connect(self.m_petri_dish_ctrl_h_scrollBar,
+ SIGNAL("valueChanged(int)"),
+ self.moveCanvasHorizontallySlot)
+ self.connect(self.m_petri_dish_ctrl_h_scrollBar,
+ SIGNAL("nextLine()"),
+ self.hbarScrollNextLineSlot)
+ self.connect(self.m_petri_dish_ctrl_h_scrollBar,
+ SIGNAL("prevLine()"),
+ self.hbarScrollPrevLineSlot)
+ self.connect(self.m_petri_dish_ctrl_v_scrollBar,
+ SIGNAL("valueChanged(int)"),
+ self.moveCanvasVerticallySlot)
+ self.connect(self.m_petri_dish_ctrl_v_scrollBar, SIGNAL("nextLine()"),
+ self.vbarScrollNextLineSlot)
+ self.connect(self.m_petri_dish_ctrl_v_scrollBar, SIGNAL("prevLine()"),
+ self.vbarScrollPrevLineSlot)
def restart(self):
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyQuitDialogView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyQuitDialogView.ui 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyQuitDialogView.ui 2006-06-22 19:38:32 UTC (rev 766)
@@ -77,7 +77,7 @@
<string>Cancel</string>
</property>
<property name="toolTip" stdset="0">
- <string><p>Don't quit, return to the program</P></string>
+ <string><p>Don't quit; return to the program</P></string>
</property>
</widget>
</hbox>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py 2006-06-22 19:38:32 UTC (rev 766)
@@ -179,7 +179,7 @@
# array (ignoring the edges)
if (num_ancestors > 9):
- return int(float(world_x * world_y) * (float(org_num + 1)/float(num_ancestors + 1)))
+ return int(float(world_x * world_y) * (float(org_num + 1)/float(num_ancestors + 1))) % (world_x * world_y)
spots = {};
if (num_ancestors == 1):
@@ -212,4 +212,4 @@
x = spots[org_num * 2]
y = spots[(org_num * 2) + 1]
- return int((round(world_y * y) * world_x) + round(world_x * x))
+ return int((round(world_y * y) * world_x) + round(world_x * x)) % (world_x * world_y)
Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-06-22 14:08:13 UTC (rev 765)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-06-22 19:38:32 UTC (rev 766)
@@ -13,13 +13,11 @@
29-Apr-06 Change configuration on fly -- work with Kaben on the underlieing problem
-15-Jun-06 Move Freezer/Viewer line up
-
15-Jun-06 Drop on viewer icon
15-Jun-06 Change menu item "Restart Experiment" -> "Start New Experiment"
-15-Jun-06 Add Viewer to view choice on menu
+15-Jun-06 Add Viewers to view choice on menu
15-Jun-06 Add text "environmental settings" on main screen
@@ -157,6 +155,8 @@
-Make the slider have the textbox that shows the readout value this box can also take input if they put a number in it (which then changes the slider) and has up and down arrows next to it -- Finished 14-Jun-06
+15-Jun-06 Move Freezer/Viewer line up -- Finished 16-Jun-06
+
************Kaben******************
* 23-Jan-06 Get program to run on all Macs -- Finished 27-Jan-06
More information about the Avida-cvs
mailing list