[Bio] / PyGUI / Catalogpanel.py Repository:
ViewVC logotype

Annotation of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (view) (download) (as text)

1 : hwang 1.1 from wxPython.wx import *
2 :     from FaST.BssFactory import BssFactory
3 :     from FaST.RecoElem import RecoElem
4 :     from RecoElempanel import RecoElemWindow
5 :    
6 :     class CatalogWindow:
7 :     def __init__(self, parent):
8 :     self.parent = parent
9 :     self.to_re = parent.re
10 : efrank 1.2 self.selected = None #remember last selected catalog entry
11 :     #..is used when LOAD button is hit.
12 :     button1= self.parent.OK_button
13 :     EVT_BUTTON(self.parent, self.parent.loadbtn.GetId(),
14 :     self.onLoadBtnPress)
15 : hwang 1.1
16 : efrank 1.2 return
17 : hwang 1.1
18 :     def InitLsCat(self):
19 :     b=BssFactory()
20 :     cpanel_list = b.getLsCat()
21 :    
22 : hwang 1.3 ## for x in cpanel_list:
23 :     ## self.parent.catalog_listbox.Append(x[0], x[1])
24 : hwang 1.1
25 : hwang 1.3 ## EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)
26 :     #return
27 :    
28 :     self.parent.rootId = self.parent.catalog_tree.AddRoot("catalog item")
29 :    
30 : hwang 1.1
31 :     def onLeftClick(self,event):
32 :     pt=self.parent.catalog_listbox.GetSelection()
33 : efrank 1.2 self.selected =int (self.parent.catalog_listbox.GetClientData(pt))
34 :     return
35 : hwang 1.1
36 : efrank 1.2
37 :     def onLoadBtnPress(self, event):
38 :     wxBeginBusyCursor()
39 : hwang 1.1 b=BssFactory()
40 : efrank 1.2 top= b.getRecoElemById( self.selected )
41 : hwang 1.1 self.to_re.AddRecoElemTree(self.parent.rootId, top)
42 : efrank 1.2 wxEndBusyCursor()
43 :     return
44 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3