[Avida-SVN] r1659 - branches/developers/avida-edward/source/python/AvidaGui2

kaben at myxo.css.msu.edu kaben at myxo.css.msu.edu
Fri Jun 8 06:33:51 PDT 2007


Author: kaben
Date: 2007-06-08 09:33:51 -0400 (Fri, 08 Jun 2007)
New Revision: 1659

Modified:
   branches/developers/avida-edward/source/python/AvidaGui2/
   branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyNavBarCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py
Log:
 r1669 at clearly:  kaben | 2007-06-08 09:34:15 -0400
 Limited drag-and-drop of organism from freezer to navigation bar.



Property changes on: branches/developers/avida-edward/source/python/AvidaGui2
___________________________________________________________________
Name: svk:merge
   - ef7795d3-e11b-4b79-8bcc-31c36a5bb0b4:/local/branches/developers/avida-edward/source/python/AvidaGui2:1668
   + ef7795d3-e11b-4b79-8bcc-31c36a5bb0b4:/local/branches/developers/avida-edward/source/python/AvidaGui2:1669

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2007-06-08 13:33:49 UTC (rev 1658)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py	2007-06-08 13:33:51 UTC (rev 1659)
@@ -88,6 +88,12 @@
     self.connect(
       self.m_nav_bar_ctrl.m_list_view, SIGNAL("clicked(QListViewItem *)"), 
       self.navBarItemClickedSlot)
+
+    # @kgn : desperate hacks to get drag & drop working.
+    self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("raisePopViewSig"), self.raisePopViewSlot)
+    self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("raiseOrgViewSig"), self.raiseOrgViewSlot)
+    self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("raiseAnaViewSig"), self.raiseAnaViewSlot)
+
     # self.connect(
     #   self.fileOpenFreezerAction,SIGNAL("activated()"),self.freezerOpenSlot)
     self.connect(
@@ -184,6 +190,14 @@
         controller.aboutToBeRaised()
         self.m_widget_stack.raiseWidget(controller)
 
+  # @kgn : desperate hacks to get drag & drop working.
+  def raisePopViewSlot(self):
+    self.navBarItemClickedSlot(self.m_nav_bar_ctrl.m_one_population_cli)
+  def raiseOrgViewSlot(self):
+    self.navBarItemClickedSlot(self.m_nav_bar_ctrl.m_one_organism_cli)
+  def raiseAnaViewSlot(self):
+    self.navBarItemClickedSlot(self.m_nav_bar_ctrl.m_one_analyze_cli)
+
   def close(self, also_delete = False):
     self.emit(PYSIGNAL("quitAvidaPhaseISig"), ())
     return False

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyNavBarCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyNavBarCtrl.py	2007-06-08 13:33:49 UTC (rev 1658)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyNavBarCtrl.py	2007-06-08 13:33:51 UTC (rev 1659)
@@ -53,6 +53,8 @@
         descr("that was a populated dish dragged from the freezer")
       elif dropped_item_name[-9:] == '.organism':
         descr("that was an organism dragged from the freezer")
+        self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("raiseOrgViewSig"),())
+        self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("parseOrganismFileSig"), (str(dropped_item_name[1:]),))
       else:
         pass
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py	2007-06-08 13:33:49 UTC (rev 1658)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOrganismScopeCtrl.py	2007-06-08 13:33:51 UTC (rev 1659)
@@ -82,6 +82,10 @@
     #self.connect(self.m_session_mdl.m_session_mdtr, PYSIGNAL("ScopeConfig_HardwareIndicatorSBValueChangedSig"),
     #  self.HardwareIndicatorSBValueChangedSlot)
 
+    self.connect(
+      self.m_session_mdl.m_session_mdtr, PYSIGNAL("parseOrganismFileSig"),
+      self.parseOrganismFileSlot)
+
   def jmcTestOrgSlot(self, clicked_cell_item = None):
     descr("no way this org slot works++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
 
@@ -118,12 +122,15 @@
         else:
           if freezer_item_name.endswith('.organism'):
             e.accept()
-            #self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("setDebugOrganismFileSig"), (freezer_item_name,))
-            self.setDebugOrganismFile(freezer_item_name)
-            self.analyzeLoadedOrganism()
+            self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("parseOrganismFileSig"), (freezer_item_name,))
           else:
             info("Only organisms can be dragged here")
 
+
+  def parseOrganismFileSlot( self, freezer_item_name ):
+    self.setDebugOrganismFile(freezer_item_name)
+    self.analyzeLoadedOrganism()
+
 #  def jmcTest(self,avida):
 #    descr("made it to jmcTest")
 




More information about the Avida-cvs mailing list