[Avida-cvs] [Avida2-svn] r98 - trunk/source/python/AvidaGui2

jclune at myxo.css.msu.edu jclune at myxo.css.msu.edu
Fri Apr 1 09:50:41 PST 2005


Author: jclune
Date: 2005-04-01 12:50:41 -0500 (Fri, 01 Apr 2005)
New Revision: 98

Modified:
   trunk/source/python/AvidaGui2/pyGraphView.py
   trunk/source/python/AvidaGui2/pyOnePop_StatsCtrl.py
   trunk/source/python/AvidaGui2/pyOnePop_StatsView.py
   trunk/source/python/AvidaGui2/pyOnePop_StatsView.ui
   trunk/source/python/AvidaGui2/pyPetriDishCtrl.py
   trunk/source/python/AvidaGui2/pySessionDumbViewBase.py
   trunk/source/python/AvidaGui2/pyTest.py
Log:
Mouse pressing now works in the new setup where the Oth cell is the top left corner. Some other minor changes as well. 


Modified: trunk/source/python/AvidaGui2/pyGraphView.py
===================================================================
--- trunk/source/python/AvidaGui2/pyGraphView.py	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pyGraphView.py	2005-04-01 17:50:41 UTC (rev 98)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 
-# Form implementation generated from reading ui file 'pyGraphView.ui'
+# Form implementation generated from reading ui file './pyGraphView.ui'
 #
-# Created: Thu Mar 31 04:19:19 2005
+# Created: Thu Mar 31 12:36:38 2005
 #      by: The PyQt User Interface Compiler (pyuic) 3.13
 #
 # WARNING! All changes made in this file will be lost!

Modified: trunk/source/python/AvidaGui2/pyOnePop_StatsCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyOnePop_StatsCtrl.py	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pyOnePop_StatsCtrl.py	2005-04-01 17:50:41 UTC (rev 98)
@@ -37,11 +37,11 @@
     stats = self.m_avida.m_population.GetStats()
              
     #STATISTICS WINDOW
-    avg_merit = stats.GetAveMerit()
-    self.m_avg_merit.setText(QString("%1").arg(avg_merit))
+    avg_fitness = stats.GetAveFitness()
+    self.m_avg_fitness.setText(QString("%1").arg(avg_fitness))
 
-    dom_merit = stats.GetDomMerit()
-    self.m_dom_merit.setText(QString("%1").arg(dom_merit))
+    dom_fitness = stats.GetDomFitness()
+    self.m_dom_fitness.setText(QString("%1").arg(dom_fitness))
 
     num_orgs = stats.GetNumCreatures()
     self.m_num_orgs.setText(QString("%1").arg(num_orgs))
@@ -114,14 +114,13 @@
 
 
   def updateOrgReportSlot(self, clickedCellNum):
-    print "an organism was just clicked on!"
   
     self.clickedCellNumber = clickedCellNum
     
     clickedCell = self.m_avida.m_population.GetCell(int(clickedCellNum))
 
-    print "clickedCell.IsOccupied() returns " 
-    print clickedCell.IsOccupied()
+#    print "clickedCell.IsOccupied() returns " 
+#    print clickedCell.IsOccupied()
 
     if not clickedCell.IsOccupied():
       #PAINT the stats fields empty
@@ -140,7 +139,10 @@
     m_org_fitness = phenotype.GetFitness()
     self.m_org_fitness.setText(QString("%1").arg(m_org_fitness))    
 
-    m_org_name = genotype.GetName()
+    m_org_name = str(genotype.GetName())
+    hyphen_position = m_org_name.find('-')
+    m_org_name = m_org_name[hyphen_position+1:]   
+
     self.m_org_name.setText(str(m_org_name))
 
 #    self.m_org_name.setText(('-'))

Modified: trunk/source/python/AvidaGui2/pyOnePop_StatsView.py
===================================================================
--- trunk/source/python/AvidaGui2/pyOnePop_StatsView.py	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pyOnePop_StatsView.py	2005-04-01 17:50:41 UTC (rev 98)
@@ -2,7 +2,7 @@
 
 # Form implementation generated from reading ui file 'pyOnePop_StatsView.ui'
 #
-# Created: Thu Mar 31 04:19:23 2005
+# Created: Fri Apr 1 00:24:13 2005
 #      by: The PyQt User Interface Compiler (pyuic) 3.13
 #
 # WARNING! All changes made in this file will be lost!
@@ -196,21 +196,21 @@
         groupBox5Layout = QGridLayout(self.groupBox5.layout())
         groupBox5Layout.setAlignment(Qt.AlignTop)
 
-        self.m_dom_merit = QLabel(self.groupBox5,"m_dom_merit")
-        self.m_dom_merit.setSizePolicy(QSizePolicy(5,5,0,0,self.m_dom_merit.sizePolicy().hasHeightForWidth()))
-        m_dom_merit_font = QFont(self.m_dom_merit.font())
-        m_dom_merit_font.setPointSize(10)
-        self.m_dom_merit.setFont(m_dom_merit_font)
+        self.m_dom_fitness = QLabel(self.groupBox5,"m_dom_fitness")
+        self.m_dom_fitness.setSizePolicy(QSizePolicy(5,5,0,0,self.m_dom_fitness.sizePolicy().hasHeightForWidth()))
+        m_dom_fitness_font = QFont(self.m_dom_fitness.font())
+        m_dom_fitness_font.setPointSize(10)
+        self.m_dom_fitness.setFont(m_dom_fitness_font)
 
-        groupBox5Layout.addWidget(self.m_dom_merit,1,1)
+        groupBox5Layout.addWidget(self.m_dom_fitness,1,1)
 
-        self.m_avg_merit = QLabel(self.groupBox5,"m_avg_merit")
-        self.m_avg_merit.setSizePolicy(QSizePolicy(5,5,0,0,self.m_avg_merit.sizePolicy().hasHeightForWidth()))
-        m_avg_merit_font = QFont(self.m_avg_merit.font())
-        m_avg_merit_font.setPointSize(10)
-        self.m_avg_merit.setFont(m_avg_merit_font)
+        self.m_avg_fitness = QLabel(self.groupBox5,"m_avg_fitness")
+        self.m_avg_fitness.setSizePolicy(QSizePolicy(5,5,0,0,self.m_avg_fitness.sizePolicy().hasHeightForWidth()))
+        m_avg_fitness_font = QFont(self.m_avg_fitness.font())
+        m_avg_fitness_font.setPointSize(10)
+        self.m_avg_fitness.setFont(m_avg_fitness_font)
 
-        groupBox5Layout.addWidget(self.m_avg_merit,0,1)
+        groupBox5Layout.addWidget(self.m_avg_fitness,0,1)
 
         self.textLabel14_3_3_2 = QLabel(self.groupBox5,"textLabel14_3_3_2")
         self.textLabel14_3_3_2.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_2.sizePolicy().hasHeightForWidth()))
@@ -277,97 +277,92 @@
         groupBox4Layout = QVBoxLayout(self.groupBox4.layout())
         groupBox4Layout.setAlignment(Qt.AlignTop)
 
-        layout32 = QVBoxLayout(None,0,6,"layout32")
+        layout80 = QGridLayout(None,1,1,0,6,"layout80")
 
-        layout26 = QHBoxLayout(None,0,6,"layout26")
+        self.m_org_name = QLabel(self.groupBox4,"m_org_name")
+        self.m_org_name.setSizePolicy(QSizePolicy(5,5,0,0,self.m_org_name.sizePolicy().hasHeightForWidth()))
+        m_org_name_font = QFont(self.m_org_name.font())
+        m_org_name_font.setPointSize(10)
+        self.m_org_name.setFont(m_org_name_font)
 
+        layout80.addWidget(self.m_org_name,0,1)
+
+        self.textLabel14_3_3_2_2_2_2 = QLabel(self.groupBox4,"textLabel14_3_3_2_2_2_2")
+        self.textLabel14_3_3_2_2_2_2.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_2_2_2_2.sizePolicy().hasHeightForWidth()))
+        self.textLabel14_3_3_2_2_2_2.setMaximumSize(QSize(32767,40))
+        textLabel14_3_3_2_2_2_2_font = QFont(self.textLabel14_3_3_2_2_2_2.font())
+        textLabel14_3_3_2_2_2_2_font.setPointSize(10)
+        self.textLabel14_3_3_2_2_2_2.setFont(textLabel14_3_3_2_2_2_2_font)
+
+        layout80.addWidget(self.textLabel14_3_3_2_2_2_2,2,0)
+
         self.textLabel14_3_3_3 = QLabel(self.groupBox4,"textLabel14_3_3_3")
         self.textLabel14_3_3_3.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_3.sizePolicy().hasHeightForWidth()))
         self.textLabel14_3_3_3.setMaximumSize(QSize(32767,40))
         textLabel14_3_3_3_font = QFont(self.textLabel14_3_3_3.font())
         textLabel14_3_3_3_font.setPointSize(10)
         self.textLabel14_3_3_3.setFont(textLabel14_3_3_3_font)
-        layout26.addWidget(self.textLabel14_3_3_3)
 
-        self.m_org_name = QLabel(self.groupBox4,"m_org_name")
-        self.m_org_name.setSizePolicy(QSizePolicy(5,5,0,0,self.m_org_name.sizePolicy().hasHeightForWidth()))
-        m_org_name_font = QFont(self.m_org_name.font())
-        m_org_name_font.setPointSize(10)
-        self.m_org_name.setFont(m_org_name_font)
-        layout26.addWidget(self.m_org_name)
-        layout32.addLayout(layout26)
+        layout80.addWidget(self.textLabel14_3_3_3,0,0)
 
-        layout27 = QHBoxLayout(None,0,6,"layout27")
+        self.textLabel14_3_3_3_3_2 = QLabel(self.groupBox4,"textLabel14_3_3_3_3_2")
+        self.textLabel14_3_3_3_3_2.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_3_3_2.sizePolicy().hasHeightForWidth()))
+        textLabel14_3_3_3_3_2_font = QFont(self.textLabel14_3_3_3_3_2.font())
+        textLabel14_3_3_3_3_2_font.setPointSize(10)
+        self.textLabel14_3_3_3_3_2.setFont(textLabel14_3_3_3_3_2_font)
 
+        layout80.addWidget(self.textLabel14_3_3_3_3_2,4,1)
+
+        self.m_org_age = QLabel(self.groupBox4,"m_org_age")
+        m_org_age_font = QFont(self.m_org_age.font())
+        m_org_age_font.setPointSize(10)
+        self.m_org_age.setFont(m_org_age_font)
+
+        layout80.addWidget(self.m_org_age,3,1)
+
+        self.m_org_fitness = QLabel(self.groupBox4,"m_org_fitness")
+        self.m_org_fitness.setSizePolicy(QSizePolicy(5,5,0,0,self.m_org_fitness.sizePolicy().hasHeightForWidth()))
+        m_org_fitness_font = QFont(self.m_org_fitness.font())
+        m_org_fitness_font.setPointSize(10)
+        self.m_org_fitness.setFont(m_org_fitness_font)
+
+        layout80.addWidget(self.m_org_fitness,1,1)
+
         self.textLabel14_3_3_2_3 = QLabel(self.groupBox4,"textLabel14_3_3_2_3")
         self.textLabel14_3_3_2_3.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_2_3.sizePolicy().hasHeightForWidth()))
         self.textLabel14_3_3_2_3.setMaximumSize(QSize(32767,40))
         textLabel14_3_3_2_3_font = QFont(self.textLabel14_3_3_2_3.font())
         textLabel14_3_3_2_3_font.setPointSize(10)
         self.textLabel14_3_3_2_3.setFont(textLabel14_3_3_2_3_font)
-        layout27.addWidget(self.textLabel14_3_3_2_3)
 
-        self.textLabel14_3_3_3_3_2 = QLabel(self.groupBox4,"textLabel14_3_3_3_3_2")
-        self.textLabel14_3_3_3_3_2.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_3_3_2.sizePolicy().hasHeightForWidth()))
-        textLabel14_3_3_3_3_2_font = QFont(self.textLabel14_3_3_3_3_2.font())
-        textLabel14_3_3_3_3_2_font.setPointSize(10)
-        self.textLabel14_3_3_3_3_2.setFont(textLabel14_3_3_3_3_2_font)
-        layout27.addWidget(self.textLabel14_3_3_3_3_2)
-        layout32.addLayout(layout27)
+        layout80.addWidget(self.textLabel14_3_3_2_3,4,0)
 
-        layout29 = QHBoxLayout(None,0,6,"layout29")
+        self.textLabel1 = QLabel(self.groupBox4,"textLabel1")
+        textLabel1_font = QFont(self.textLabel1.font())
+        textLabel1_font.setPointSize(10)
+        self.textLabel1.setFont(textLabel1_font)
 
+        layout80.addWidget(self.textLabel1,3,0)
+
         self.textLabel14_3_3_2_2_3 = QLabel(self.groupBox4,"textLabel14_3_3_2_2_3")
         self.textLabel14_3_3_2_2_3.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_2_2_3.sizePolicy().hasHeightForWidth()))
         self.textLabel14_3_3_2_2_3.setMaximumSize(QSize(32767,40))
         textLabel14_3_3_2_2_3_font = QFont(self.textLabel14_3_3_2_2_3.font())
         textLabel14_3_3_2_2_3_font.setPointSize(10)
         self.textLabel14_3_3_2_2_3.setFont(textLabel14_3_3_2_2_3_font)
-        layout29.addWidget(self.textLabel14_3_3_2_2_3)
 
-        self.m_org_fitness = QLabel(self.groupBox4,"m_org_fitness")
-        self.m_org_fitness.setSizePolicy(QSizePolicy(5,5,0,0,self.m_org_fitness.sizePolicy().hasHeightForWidth()))
-        m_org_fitness_font = QFont(self.m_org_fitness.font())
-        m_org_fitness_font.setPointSize(10)
-        self.m_org_fitness.setFont(m_org_fitness_font)
-        layout29.addWidget(self.m_org_fitness)
-        layout32.addLayout(layout29)
+        layout80.addWidget(self.textLabel14_3_3_2_2_3,1,0)
 
-        layout30 = QHBoxLayout(None,0,6,"layout30")
-
-        self.textLabel14_3_3_2_2_2_2 = QLabel(self.groupBox4,"textLabel14_3_3_2_2_2_2")
-        self.textLabel14_3_3_2_2_2_2.setSizePolicy(QSizePolicy(5,5,0,0,self.textLabel14_3_3_2_2_2_2.sizePolicy().hasHeightForWidth()))
-        self.textLabel14_3_3_2_2_2_2.setMaximumSize(QSize(32767,40))
-        textLabel14_3_3_2_2_2_2_font = QFont(self.textLabel14_3_3_2_2_2_2.font())
-        textLabel14_3_3_2_2_2_2_font.setPointSize(10)
-        self.textLabel14_3_3_2_2_2_2.setFont(textLabel14_3_3_2_2_2_2_font)
-        layout30.addWidget(self.textLabel14_3_3_2_2_2_2)
-
         self.m_org_gestation_time = QLabel(self.groupBox4,"m_org_gestation_time")
         self.m_org_gestation_time.setSizePolicy(QSizePolicy(5,5,0,0,self.m_org_gestation_time.sizePolicy().hasHeightForWidth()))
         m_org_gestation_time_font = QFont(self.m_org_gestation_time.font())
         m_org_gestation_time_font.setPointSize(10)
         self.m_org_gestation_time.setFont(m_org_gestation_time_font)
-        layout30.addWidget(self.m_org_gestation_time)
-        layout32.addLayout(layout30)
 
-        layout31 = QHBoxLayout(None,0,6,"layout31")
-
-        self.textLabel1 = QLabel(self.groupBox4,"textLabel1")
-        textLabel1_font = QFont(self.textLabel1.font())
-        textLabel1_font.setPointSize(10)
-        self.textLabel1.setFont(textLabel1_font)
-        layout31.addWidget(self.textLabel1)
-
-        self.m_org_age = QLabel(self.groupBox4,"m_org_age")
-        m_org_age_font = QFont(self.m_org_age.font())
-        m_org_age_font.setPointSize(10)
-        self.m_org_age.setFont(m_org_age_font)
-        layout31.addWidget(self.m_org_age)
-        layout32.addLayout(layout31)
+        layout80.addWidget(self.m_org_gestation_time,2,1)
+        groupBox4Layout.addLayout(layout80)
         spacer1_2_2 = QSpacerItem(16,16,QSizePolicy.Minimum,QSizePolicy.Minimum)
-        layout32.addItem(spacer1_2_2)
-        groupBox4Layout.addLayout(layout32)
+        groupBox4Layout.addItem(spacer1_2_2)
         pyOnePop_StatsViewLayout.addWidget(self.groupBox4)
 
         self.languageChange()
@@ -400,25 +395,25 @@
         self.textLabel18.setText(self.__tr("equals"))
         self.m_num_equals.setText(self.__tr("-"))
         self.groupBox5.setTitle(self.__tr("Statistics"))
-        self.m_dom_merit.setText(self.__tr("0000"))
-        self.m_avg_merit.setText(self.__tr("0000"))
-        self.textLabel14_3_3_2.setText(self.__tr("Dom. Merit:"))
+        self.m_dom_fitness.setText(self.__tr("0000"))
+        self.m_avg_fitness.setText(self.__tr("0000"))
+        self.textLabel14_3_3_2.setText(self.__tr("Dominant Org. Fitness:"))
         self.m_num_orgs.setText(self.__tr("0000"))
-        self.textLabel14_3_3.setText(self.__tr("Avg. Merit:"))
-        self.textLabel14_3_3_2_2_2.setText(self.__tr("Avg. Gest:"))
+        self.textLabel14_3_3.setText(self.__tr("Avg. Fitness:"))
+        self.textLabel14_3_3_2_2_2.setText(self.__tr("Avg. Gestation (instructions):"))
         self.m_avg_gest.setText(self.__tr("0000"))
-        self.textLabel14_3_3_2_2.setText(self.__tr("Num. Orgs:"))
-        self.groupBox4.setTitle(self.__tr("Org Report"))
-        self.textLabel14_3_3_3.setText(self.__tr("Name:"))
+        self.textLabel14_3_3_2_2.setText(self.__tr("Population Size:"))
+        self.groupBox4.setTitle(self.__tr("Org. Clicked on  Report"))
         self.m_org_name.setText(self.__tr("-"))
-        self.textLabel14_3_3_2_3.setText(self.__tr("Tasks:"))
+        self.textLabel14_3_3_2_2_2_2.setText(self.__tr("Gestation (instructions):"))
+        self.textLabel14_3_3_3.setText(self.__tr("Name:"))
         self.textLabel14_3_3_3_3_2.setText(self.__tr("-"))
-        self.textLabel14_3_3_2_2_3.setText(self.__tr("Fitness:"))
+        self.m_org_age.setText(self.__tr("-"))
         self.m_org_fitness.setText(self.__tr("-"))
-        self.textLabel14_3_3_2_2_2_2.setText(self.__tr("Gestation:"))
+        self.textLabel14_3_3_2_3.setText(self.__tr("Tasks:"))
+        self.textLabel1.setText(self.__tr("Age (updates):"))
+        self.textLabel14_3_3_2_2_3.setText(self.__tr("Fitness:"))
         self.m_org_gestation_time.setText(self.__tr("-"))
-        self.textLabel1.setText(self.__tr("Age:"))
-        self.m_org_age.setText(self.__tr("-"))
 
 
     def __tr(self,s,c = None):

Modified: trunk/source/python/AvidaGui2/pyOnePop_StatsView.ui
===================================================================
--- trunk/source/python/AvidaGui2/pyOnePop_StatsView.ui	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pyOnePop_StatsView.ui	2005-04-01 17:50:41 UTC (rev 98)
@@ -498,7 +498,7 @@
                         </property>
                         <widget class="QLabel" row="1" column="1">
                             <property name="name">
-                                <cstring>m_dom_merit</cstring>
+                                <cstring>m_dom_fitness</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
@@ -519,7 +519,7 @@
                         </widget>
                         <widget class="QLabel" row="0" column="1">
                             <property name="name">
-                                <cstring>m_avg_merit</cstring>
+                                <cstring>m_avg_fitness</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
@@ -562,7 +562,7 @@
                                 </font>
                             </property>
                             <property name="text">
-                                <string>Dom. Merit:</string>
+                                <string>Dominant Org. Fitness:</string>
                             </property>
                         </widget>
                         <widget class="QLabel" row="2" column="1">
@@ -610,7 +610,7 @@
                                 </font>
                             </property>
                             <property name="text">
-                                <string>Avg. Merit:</string>
+                                <string>Avg. Fitness:</string>
                             </property>
                         </widget>
                         <widget class="QLabel" row="3" column="0">
@@ -637,7 +637,7 @@
                                 </font>
                             </property>
                             <property name="text">
-                                <string>Avg. Gest:</string>
+                                <string>Avg. Gestation (instructions):</string>
                             </property>
                         </widget>
                         <widget class="QLabel" row="3" column="1">
@@ -685,7 +685,7 @@
                                 </font>
                             </property>
                             <property name="text">
-                                <string>Num. Orgs:</string>
+                                <string>Population Size:</string>
                             </property>
                         </widget>
                     </grid>
@@ -710,7 +710,7 @@
                 </font>
             </property>
             <property name="title">
-                <string>Org Report</string>
+                <string>Org. Clicked on  Report</string>
             </property>
             <vbox>
                 <property name="name">
@@ -718,299 +718,249 @@
                 </property>
                 <widget class="QLayoutWidget">
                     <property name="name">
-                        <cstring>layout32</cstring>
+                        <cstring>layout80</cstring>
                     </property>
-                    <vbox>
+                    <grid>
                         <property name="name">
                             <cstring>unnamed</cstring>
                         </property>
-                        <widget class="QLayoutWidget">
+                        <widget class="QLabel" row="0" column="1">
                             <property name="name">
-                                <cstring>layout26</cstring>
+                                <cstring>m_org_name</cstring>
                             </property>
-                            <hbox>
-                                <property name="name">
-                                    <cstring>unnamed</cstring>
-                                </property>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>textLabel14_3_3_3</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="maximumSize">
-                                        <size>
-                                            <width>32767</width>
-                                            <height>40</height>
-                                        </size>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>Name:</string>
-                                    </property>
-                                </widget>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>m_org_name</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>-</string>
-                                    </property>
-                                </widget>
-                            </hbox>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>-</string>
+                            </property>
                         </widget>
-                        <widget class="QLayoutWidget">
+                        <widget class="QLabel" row="2" column="0">
                             <property name="name">
-                                <cstring>layout27</cstring>
+                                <cstring>textLabel14_3_3_2_2_2_2</cstring>
                             </property>
-                            <hbox>
-                                <property name="name">
-                                    <cstring>unnamed</cstring>
-                                </property>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>textLabel14_3_3_2_3</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="maximumSize">
-                                        <size>
-                                            <width>32767</width>
-                                            <height>40</height>
-                                        </size>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>Tasks:</string>
-                                    </property>
-                                </widget>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>textLabel14_3_3_3_3_2</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>-</string>
-                                    </property>
-                                </widget>
-                            </hbox>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="maximumSize">
+                                <size>
+                                    <width>32767</width>
+                                    <height>40</height>
+                                </size>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Gestation (instructions):</string>
+                            </property>
                         </widget>
-                        <widget class="QLayoutWidget">
+                        <widget class="QLabel" row="0" column="0">
                             <property name="name">
-                                <cstring>layout29</cstring>
+                                <cstring>textLabel14_3_3_3</cstring>
                             </property>
-                            <hbox>
-                                <property name="name">
-                                    <cstring>unnamed</cstring>
-                                </property>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>textLabel14_3_3_2_2_3</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="maximumSize">
-                                        <size>
-                                            <width>32767</width>
-                                            <height>40</height>
-                                        </size>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>Fitness:</string>
-                                    </property>
-                                </widget>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>m_org_fitness</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>-</string>
-                                    </property>
-                                </widget>
-                            </hbox>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="maximumSize">
+                                <size>
+                                    <width>32767</width>
+                                    <height>40</height>
+                                </size>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Name:</string>
+                            </property>
                         </widget>
-                        <widget class="QLayoutWidget">
+                        <widget class="QLabel" row="4" column="1">
                             <property name="name">
-                                <cstring>layout30</cstring>
+                                <cstring>textLabel14_3_3_3_3_2</cstring>
                             </property>
-                            <hbox>
-                                <property name="name">
-                                    <cstring>unnamed</cstring>
-                                </property>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>textLabel14_3_3_2_2_2_2</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="maximumSize">
-                                        <size>
-                                            <width>32767</width>
-                                            <height>40</height>
-                                        </size>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>Gestation:</string>
-                                    </property>
-                                </widget>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>m_org_gestation_time</cstring>
-                                    </property>
-                                    <property name="sizePolicy">
-                                        <sizepolicy>
-                                            <hsizetype>5</hsizetype>
-                                            <vsizetype>5</vsizetype>
-                                            <horstretch>0</horstretch>
-                                            <verstretch>0</verstretch>
-                                        </sizepolicy>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>-</string>
-                                    </property>
-                                </widget>
-                            </hbox>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>-</string>
+                            </property>
                         </widget>
-                        <widget class="QLayoutWidget">
+                        <widget class="QLabel" row="3" column="1">
                             <property name="name">
-                                <cstring>layout31</cstring>
+                                <cstring>m_org_age</cstring>
                             </property>
-                            <hbox>
-                                <property name="name">
-                                    <cstring>unnamed</cstring>
-                                </property>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>textLabel1</cstring>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>Age:</string>
-                                    </property>
-                                </widget>
-                                <widget class="QLabel">
-                                    <property name="name">
-                                        <cstring>m_org_age</cstring>
-                                    </property>
-                                    <property name="font">
-                                        <font>
-                                            <pointsize>10</pointsize>
-                                        </font>
-                                    </property>
-                                    <property name="text">
-                                        <string>-</string>
-                                    </property>
-                                </widget>
-                            </hbox>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>-</string>
+                            </property>
                         </widget>
-                        <spacer>
+                        <widget class="QLabel" row="1" column="1">
                             <property name="name">
-                                <cstring>spacer1_2_2</cstring>
+                                <cstring>m_org_fitness</cstring>
                             </property>
-                            <property name="orientation">
-                                <enum>Vertical</enum>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
                             </property>
-                            <property name="sizeType">
-                                <enum>Minimum</enum>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
                             </property>
-                            <property name="sizeHint">
+                            <property name="text">
+                                <string>-</string>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="4" column="0">
+                            <property name="name">
+                                <cstring>textLabel14_3_3_2_3</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="maximumSize">
                                 <size>
-                                    <width>16</width>
-                                    <height>16</height>
+                                    <width>32767</width>
+                                    <height>40</height>
                                 </size>
                             </property>
-                        </spacer>
-                    </vbox>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Tasks:</string>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="3" column="0">
+                            <property name="name">
+                                <cstring>textLabel1</cstring>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Age (updates):</string>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="1" column="0">
+                            <property name="name">
+                                <cstring>textLabel14_3_3_2_2_3</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="maximumSize">
+                                <size>
+                                    <width>32767</width>
+                                    <height>40</height>
+                                </size>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Fitness:</string>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="2" column="1">
+                            <property name="name">
+                                <cstring>m_org_gestation_time</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>5</hsizetype>
+                                    <vsizetype>5</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                            <property name="font">
+                                <font>
+                                    <pointsize>10</pointsize>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>-</string>
+                            </property>
+                        </widget>
+                    </grid>
                 </widget>
+                <spacer>
+                    <property name="name">
+                        <cstring>spacer1_2_2</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Vertical</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Minimum</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>16</width>
+                            <height>16</height>
+                        </size>
+                    </property>
+                </spacer>
             </vbox>
         </widget>
     </hbox>

Modified: trunk/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyPetriDishCtrl.py	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pyPetriDishCtrl.py	2005-04-01 17:50:41 UTC (rev 98)
@@ -91,8 +91,8 @@
         self.m_avida.m_avida_thread_mdtr, PYSIGNAL("AvidaUpdatedSig"),
         self.avidaUpdatedSlot)
 
-    self.m_map_cell_w = 5
-    self.m_map_cell_h = 5
+    self.m_map_cell_w = 10
+    self.m_map_cell_h = 10
     world_w = cConfig.GetWorldX()
     world_h = cConfig.GetWorldY()
 
@@ -123,8 +123,8 @@
   def mousePressEvent(self,e):
     if e.button() != Qt.LeftButton:
       return
-    print "mouse pressed"
 
+
     #if the run has not started yet, do nothing
     if self.m_avida == None:
       return
@@ -132,10 +132,10 @@
     world_w = cConfig.GetWorldX()
     world_h = cConfig.GetWorldY()
 
-    clicked_map_cell_w = round(float(e.x()-3)/self.m_map_cell_w)				 
-    clicked_map_cell_h = round(float(e.y()-3)/self.m_map_cell_h)
+    clicked_map_cell_w = round(float(e.x())/self.m_map_cell_w)				 
+    clicked_map_cell_h = round(float(e.y())/self.m_map_cell_h)
 
-    print "clicked_map_cell_w is %f, clicked_map_cell_h is %f" %(clicked_map_cell_w,clicked_map_cell_h)
+#    print "clicked_map_cell_w is %f, clicked_map_cell_h is %f" %(clicked_map_cell_w,clicked_map_cell_h)
 
 
    
@@ -144,23 +144,26 @@
       return
     
     
-    #get the cell number in avida that corresponds to this coordinate
-    world_w_mid = world_w/2
-    world_h_mid = world_h/2
-    bottom_left_cell = ((((world_h+1)-world_w_mid)*world_w) - world_w_mid)
+    #get the cell number in avida that corresponds to this coordinate under the system where the 0th cell is in the middle
+    #this code is obsolete if the 0th cell is in the top right corner
+#    world_w_mid = world_w/2
+#    world_h_mid = world_h/2
+#    bottom_left_cell = ((((world_h+1)-world_w_mid)*world_w) - world_w_mid)
 
-    if clicked_map_cell_h == world_h_mid:   #if it is on the y midpoint line that gets split...
-      if clicked_map_cell_w >= world_w_mid: #and it is after the origin (first avida cell)
-        clickedCellNum = clicked_map_cell_w - world_w_mid
-      else:
-        clickedCellNum = ((world_h_mid-1)*world_w)+ bottom_left_cell + clicked_map_cell_w
-    elif clicked_map_cell_h > world_h_mid:  #if above the split
-      print "here"
-      clickedCellNum = ( (clicked_map_cell_h - (world_h_mid + 1))*world_w ) + world_h_mid + clicked_map_cell_w
-    elif clicked_map_cell_h < world_h_mid:  #if below the spilt
-      clickedCellNum = ( bottom_left_cell + ( ((clicked_map_cell_h - 1)* world_w) + clicked_map_cell_w) )
+#    if clicked_map_cell_h == world_h_mid:   #if it is on the y midpoint line that gets split...
+#      if clicked_map_cell_w >= world_w_mid: #and it is after the origin (first avida cell)
+#        clickedCellNum = clicked_map_cell_w - world_w_mid
+#      else:
+#        clickedCellNum = ((world_h_mid-1)*world_w)+ bottom_left_cell + clicked_map_cell_w
+#    elif clicked_map_cell_h > world_h_mid:  #if above the split
+#      clickedCellNum = ( (clicked_map_cell_h - (world_h_mid + 1))*world_w ) + world_h_mid + clicked_map_cell_w
+#    elif clicked_map_cell_h < world_h_mid:  #if below the spilt
+#      clickedCellNum = ( bottom_left_cell + ( ((clicked_map_cell_h - 1)* world_w) + clicked_map_cell_w) )
 
 
+    clickedCellNum = (((clicked_map_cell_h-1)*world_h) + clicked_map_cell_w-1)
+
+
     clickedCell = self.m_avida.m_population.GetCell(int(clickedCellNum))
 
     #broadcast that an organism was clicked on

Modified: trunk/source/python/AvidaGui2/pySessionDumbViewBase.py
===================================================================
--- trunk/source/python/AvidaGui2/pySessionDumbViewBase.py	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pySessionDumbViewBase.py	2005-04-01 17:50:41 UTC (rev 98)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 
-# Form implementation generated from reading ui file 'pySessionDumbViewBase.ui'
+# Form implementation generated from reading ui file './pySessionDumbViewBase.ui'
 #
-# Created: Thu Mar 31 04:19:24 2005
+# Created: Fri Apr 1 00:21:38 2005
 #      by: The PyQt User Interface Compiler (pyuic) 3.13
 #
 # WARNING! All changes made in this file will be lost!

Modified: trunk/source/python/AvidaGui2/pyTest.py
===================================================================
--- trunk/source/python/AvidaGui2/pyTest.py	2005-03-31 09:46:14 UTC (rev 97)
+++ trunk/source/python/AvidaGui2/pyTest.py	2005-04-01 17:50:41 UTC (rev 98)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 
-# Form implementation generated from reading ui file 'pyTest.ui'
+# Form implementation generated from reading ui file './pyTest.ui'
 #
-# Created: Thu Mar 31 04:19:24 2005
+# Created: Fri Apr 1 00:21:40 2005
 #      by: The PyQt User Interface Compiler (pyuic) 3.13
 #
 # WARNING! All changes made in this file will be lost!




More information about the Avida-cvs mailing list