Version: 8.3.0
gui.catalog.CatalogTool Class Reference
Inheritance diagram for gui.catalog.CatalogTool:
Collaboration diagram for gui.catalog.CatalogTool:

Public Member Functions

def __init__
 
def createWidgets
 
def initActions
 
def initMenus
 
def importFromSession
 
def importFromProc
 
def register
 
def initToolbar
 
def initStatusbar
 

Public Attributes

 appli
 
 tabWidget
 
 actions
 
 impSessionAct
 
 impProcAct
 
 importMenu
 
 toolbars
 
 SBfile
 

Detailed Description

    CatalogTool()
    Main window of Catalog Tool

Definition at line 25 of file catalog.py.

Constructor & Destructor Documentation

def gui.catalog.CatalogTool.__init__ (   self,
  parent = None 
)

Definition at line 30 of file catalog.py.

30 
31  def __init__(self,parent=None):
32  QMainWindow.__init__(self,parent)
33  self.appli=parent
34  self.createWidgets()
35  self.initActions()
36  self.initMenus()
37  self.initToolbar()
38  self.initStatusbar()
39  cata=pilot.getRuntime().getBuiltinCatalog()
40  self.register(cata,"Builtin Catalog")

Member Function Documentation

def gui.catalog.CatalogTool.createWidgets (   self)

Definition at line 41 of file catalog.py.

41 
42  def createWidgets(self):
43  self.tabWidget = QTabWidget(self)
44  #self.currentPanel=None
45  #self.connect(self.tabWidget, SIGNAL('currentChanged(QWidget *)'),self.handlePanelChanged)
46  self.setCentralWidget(self.tabWidget)
47  self.resize(800,600)
def gui.catalog.CatalogTool.importFromProc (   self)

Definition at line 70 of file catalog.py.

References gui.catalog.CatalogTool.register().

70 
71  def importFromProc(self):
72  fn = QFileDialog.getOpenFileName(QString.null,QString.null,self)
73  if fn.isEmpty():
74  self.statusBar().message('Loading aborted',2000)
75  return
76  filename = str(fn)
77  cata=pilot.getRuntime().loadCatalog("proc",filename)
78  print cata
79  print cata._nodeMap
80  for name,node in cata._nodeMap.items():
81  print name,node
82  self.register(cata,filename)
def gui.catalog.CatalogTool.importFromSession (   self)

Definition at line 66 of file catalog.py.

References gui.browser.Browser.appli, gui.catalog.CatalogTool.appli, and gui.browser_session.MainBrowser.appli.

66 
67  def importFromSession(self):
68  browser_session.MainBrowser(self,self.appli).show()
69  return
def gui.catalog.CatalogTool.initActions (   self)

Definition at line 48 of file catalog.py.

48 
49  def initActions(self):
50  self.actions = []
51  self.impSessionAct=QAction('Import from session...',0,self)
52  self.impSessionAct.connect(self.impSessionAct,SIGNAL('activated()'), self.importFromSession)
53  self.actions.append(self.impSessionAct)
54  self.impProcAct=QAction('Import from proc...',0,self)
55  self.impProcAct.connect(self.impProcAct,SIGNAL('activated()'), self.importFromProc)
56  self.actions.append(self.impProcAct)
def gui.catalog.CatalogTool.initMenus (   self)

Definition at line 57 of file catalog.py.

57 
58  def initMenus(self):
59  menubar = self.menuBar()
60 
61  #menu import
62  self.importMenu=QPopupMenu(self)
63  self.impSessionAct.addTo(self.importMenu)
64  self.impProcAct.addTo(self.importMenu)
65  menubar.insertItem('&Import',self.importMenu)
def gui.catalog.CatalogTool.initStatusbar (   self)

Definition at line 96 of file catalog.py.

96 
97  def initStatusbar(self):
98  sb = self.statusBar()
99  self.SBfile=QLabel(sb)
100  sb.addWidget(self.SBfile)
101  QWhatsThis.add(self.SBfile, """<p>Message""")
102  self.SBfile.setText("")
103 
def gui.catalog.CatalogTool.initToolbar (   self)

Definition at line 90 of file catalog.py.

90 
91  def initToolbar(self):
92  #tb = QToolBar(self)
93  #self.importAct.addTo(tb)
94  self.toolbars={}
95  #self.toolbars['Import']=tb
def gui.catalog.CatalogTool.register (   self,
  cata,
  name 
)
Add a catalog in the catalog tool list

Definition at line 83 of file catalog.py.

References gui.browser.Browser.appli, gui.catalog.CatalogTool.appli, and gui.browser_session.MainBrowser.appli.

Referenced by gui.catalog.CatalogTool.importFromProc().

83 
84  def register(self,cata,name):
85  """Add a catalog in the catalog tool list"""
86  panel=browser_catalog.Browser(self,appli=self.appli)
87  panel.setCata(cata)
88  self.tabWidget.addTab( panel,name)
89  self.tabWidget.showPage(panel)

Member Data Documentation

gui.catalog.CatalogTool.actions

Definition at line 49 of file catalog.py.

gui.catalog.CatalogTool.appli

Definition at line 32 of file catalog.py.

Referenced by gui.catalog.CatalogTool.importFromSession(), and gui.catalog.CatalogTool.register().

gui.catalog.CatalogTool.importMenu

Definition at line 61 of file catalog.py.

gui.catalog.CatalogTool.impProcAct

Definition at line 53 of file catalog.py.

gui.catalog.CatalogTool.impSessionAct

Definition at line 50 of file catalog.py.

gui.catalog.CatalogTool.SBfile

Definition at line 98 of file catalog.py.

gui.catalog.CatalogTool.tabWidget

Definition at line 42 of file catalog.py.

gui.catalog.CatalogTool.toolbars

Definition at line 93 of file catalog.py.


The documentation for this class was generated from the following file: