Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

RunControlMainGUIImpl.py

00001 #!/usr/local/bin/python
00002 #
00003 #                               Copyright 2002
00004 #                                     by
00005 #                        The Board of Trustees of the
00006 #                     Leland Stanford Junior University.
00007 #                            All rights reserved.
00008 #
00009 
00010 __facility__ = "Online"
00011 __abstract__ = "GLAST LAT GUI for Online Run Control and Systems Main Window"
00012 __author__   = """A. Kavelaars <AliciaK@SLAC.Stanford.edu>
00013                                SLAC - GLAST LAT I&T/Online"""
00014 __date__     = ("$Date: 2005/05/11 02:14:59 $").split(' ')[1]
00015 __version__  = "$Revision: 2.19 $"
00016 __release__  = "$Name: R04-12-00 $"
00017 __credits__  = "SLAC"
00018 
00019 import LATTE.copyright_SLAC
00020 
00021 
00022 import sys
00023 import logging            as log
00024 from qt                   import *
00025 
00026 from RunControlMainGUI    import RunControlMainGUI
00027 from rcStatusMonitor      import *
00028 from rcCommentPanel       import *
00029 from rcPythonShell        import *
00030 from rcParamVerifier      import rcParamVerifier
00031 
00032 import LATTE.client.gLog as gLog
00033 
00034 class RunControlMainGUIImpl(RunControlMainGUI):
00035 
00036   class ListBoxToolTip(QToolTip):
00037     def __init__(self, listbox):
00038       QToolTip.__init__(self, listbox.viewport())
00039       self.__listbox = listbox
00040 
00041     def maybeTip(self, pos):
00042       item = self.__listbox.itemAt(pos)
00043       tipString = item.text()
00044       cr = self.__listbox.itemRect(item)
00045       cr.moveTopLeft(self.__listbox.contentsToViewport(cr.topLeft()))
00046       QToolTip(self).tip(cr, tipString)
00047 
00048   class DockableTab(QDockWindow):
00049     def __init__(self, parent, name, panel, tabPage, flags = 0):
00050       QDockWindow.__init__(self, parent, name, flags)
00051       self.__parent = parent
00052       self.__panel = panel
00053       self.__tabPage = tabPage
00054       self.__name = name
00055       self.setCaption(name)
00056       self.connect(self,SIGNAL("visibilityChanged(bool)"), self.visibilityChanged)
00057 
00058     def visibilityChanged(self, visible):
00059       if not visible:
00060         self.__parent.showPage(self.__tabPage)
00061         self.__panel.reparent(self.__tabPage, 0, QPoint(0,0), 1)
00062         self.__tabPage.layout().addWidget(self.__panel,0,1)
00063         self.disconnect(self,SIGNAL("visibilityChanged(bool)"), self.visibilityChanged)
00064 
00065   def __init__(self, common, parent = None, name = None, fl = 0):
00066     RunControlMainGUI.__init__(self, parent, name, fl)
00067 
00068     self.connect(self.AppOpenButton,SIGNAL("clicked()"),self.loadScript)
00069     self.connect(self.OpenAppl,SIGNAL("activated(const QString &)"),self.initApp)
00070     self.OpenApplTip = RunControlMainGUIImpl.ListBoxToolTip(self.OpenAppl.listBox())
00071 
00072     self.connect(self.ResetButton,SIGNAL("clicked()"),self.ResetClicked)
00073     self.connect(self.StopButton,SIGNAL("clicked()"),self.StopClicked)
00074     self.connect(self.RunButton,SIGNAL("clicked()"),self.RunClicked)
00075     self.connect(self.PauseButton,SIGNAL("clicked()"),self.PauseClicked)
00076 
00077     self.connect(self.fileOpen_ApplicationAction,SIGNAL("activated()"),self.loadScript)
00078     self.connect(self.fileSelect_SchemaAction,SIGNAL("activated()"),self.loadSchema)
00079     self.connect(self.fileConnectAction,SIGNAL("activated()"),self.connectClicked)
00080     self.connect(self.fileExitAction,SIGNAL("activated()"),self.fileExit)
00081     self.connect(self.fileLogoutAction,SIGNAL("activated()"),self.fileLogout)
00082     self.connect(self.controlResetAction,SIGNAL("activated()"),self.ResetClicked)
00083     self.connect(self.controlStopAction,SIGNAL("activated()"),self.StopClicked)
00084     self.connect(self.controlRunAction,SIGNAL("activated()"),self.RunClicked)
00085     self.connect(self.controlPauseAction,SIGNAL("activated()"),self.PauseClicked)
00086     self.connect(self.editPreferencesAction,SIGNAL("activated()"),self.PreferencesActivated)
00087 
00088     self.connect(self.helpVerifyAction,SIGNAL("activated()"),self.verifySoftware)
00089     self.connect(self.helpELogAction,SIGNAL("activated()"),self.elogWebsite)
00090     self.connect(self.helpAboutAction,SIGNAL("activated()"),self.aboutRunControl)
00091     self.connect(self.viewStatusPanel,SIGNAL("activated()"),self.showHideStatusPanel)
00092     self.connect(self.viewComments,SIGNAL("activated()"),self.showHideComments)
00093     #self.connect(self.viewRunCond,SIGNAL("activated()"),self.showHideRunCond)
00094     self.connect(self.viewPythonShell,SIGNAL("activated()"),self.showHidePythonShell)
00095     self.connect(self.cmbOperator,SIGNAL("activated(const QString&)"),self.setOperator)
00096     self.connect(self.comboParticleType, SIGNAL("activated(const QString&)"), self.setParticleType)
00097     self.connect(self.comboOrientation, SIGNAL("activated(const QString&)"), self.setOrientation)
00098     self.connect(self.RunControlTab, SIGNAL("currentChanged(QWidget*)"), self.activateTab)
00099 
00100 
00101     self.__dwStatusPanel = QDockWindow()
00102     self.__dwStatusPanel.setResizeEnabled(1)
00103     self.__dwStatusPanel.setCloseMode(QDockWindow.Always)
00104     self.__statusPanel = rcStatusPanel(self.__dwStatusPanel)
00105     self.__dwStatusPanel.setWidget(self.__statusPanel)
00106     self.__dwStatusPanel.setCaption('Status Panel')
00107     self.statusView = self.__statusPanel.statusView
00108     self.statusView.setSorting(-1)
00109     self.statusView.setColumnWidth(1, 200)
00110     self.setDockEnabled(self.__dwStatusPanel, Qt.DockTop, 0)
00111     self.setDockEnabled(self.__dwStatusPanel, Qt.DockBottom, 0)
00112     self.setDockEnabled(self.__dwStatusPanel, Qt.DockLeft, 0)
00113     self.addDockWindow(self.__dwStatusPanel, Qt.DockRight)
00114     self.__dwStatusPanel.setFixedExtentWidth(321)
00115     #self.__dwStatusPanel.setFixedExtentHeight(250)
00116     self.connect(self.__dwStatusPanel,SIGNAL("visibilityChanged(bool)"),self.statusPanelVisChanged)
00117 
00118     self.__dwComments = QDockWindow()
00119     self.__dwComments.setResizeEnabled(1)
00120     self.__dwComments.setCloseMode(QDockWindow.Always)
00121     self.__comments = rcCommentPanel(self.__dwComments)
00122     self.__dwComments.setWidget(self.__comments)
00123     self.__dwComments.setCaption('Comments')
00124     self.__teComments = self.__comments.getWidget()
00125     self.setDockEnabled(self.__dwComments, Qt.DockTop, 0)
00126     self.setDockEnabled(self.__dwComments, Qt.DockBottom, 1)
00127     self.setDockEnabled(self.__dwComments, Qt.DockLeft, 0)
00128     self.addDockWindow(self.__dwComments, Qt.DockBottom)
00129     self.__dwComments.setFixedExtentWidth(0)
00130     self.__dwComments.setFixedExtentHeight(50)
00131     self.connect(self.__dwComments,SIGNAL("visibilityChanged(bool)"),self.viewComments, SLOT("setOn(bool)"))
00132     self.__dwComments.hide()
00133 
00134     #self.__dwRunCond = QDockWindow()
00135     #self.__dwRunCond.setResizeEnabled(1)
00136     #self.__dwRunCond.setVerticallyStretchable(0)
00137     #self.__dwRunCond.setCloseMode(QDockWindow.Always)
00138     #self.__runCond = rcRunConditions(self.__dwRunCond)
00139     #self.__dwRunCond.setWidget(self.__runCond)
00140     #self.__dwRunCond.setCaption('Run Conditions')
00141     #self.setDockEnabled(self.__dwRunCond, Qt.DockTop, 0)
00142     #self.setDockEnabled(self.__dwRunCond, Qt.DockBottom, 1)
00143     #self.setDockEnabled(self.__dwRunCond, Qt.DockLeft, 0)
00144     #self.setDockEnabled(self.__dwRunCond, Qt.DockRight, 1)
00145     #self.addDockWindow(self.__dwRunCond, Qt.DockRight)
00146     #self.__dwRunCond.setFixedExtentWidth(0)
00147     #self.__dwRunCond.setFixedExtentHeight(0)
00148     #self.connect(self.__dwRunCond,SIGNAL("visibilityChanged(bool)"),self.viewRunCond, SLOT("setOn(bool)"))
00149     #self.connect(self.__runCond.comboParticleType, SIGNAL("activated(const QString&)"), self.setParticleType)
00150     #self.connect(self.__runCond.comboInstrumentType, SIGNAL("activated(const QString&)"), self.setInstrumentType)
00151     #self.connect(self.__runCond.comboOrientation, SIGNAL("activated(const QString&)"), self.setOrientation)
00152     #self.connect(self.__runCond.comboPhase, SIGNAL("activated(const QString&)"), self.setPhase)
00153 
00154     self.__dwPythonShell = QDockWindow()
00155     self.__dwPythonShell.setResizeEnabled(1)
00156     self.__dwPythonShell.setVerticallyStretchable(0)
00157     self.__dwPythonShell.setCloseMode(QDockWindow.Always)
00158     self.__pythonShell = rcPythonShell(self.__dwPythonShell)
00159     self.__dwPythonShell.setWidget(self.__pythonShell)
00160     self.__dwPythonShell.setCaption('Python Shell')
00161     self.__tePythonShell = self.__pythonShell.getWidget()
00162     self.setDockEnabled(self.__dwPythonShell, Qt.DockTop, 0)
00163     self.setDockEnabled(self.__dwPythonShell, Qt.DockBottom, 1)
00164     self.setDockEnabled(self.__dwPythonShell, Qt.DockLeft, 0)
00165     self.setDockEnabled(self.__dwPythonShell, Qt.DockRight, 1)
00166     self.addDockWindow(self.__dwPythonShell, Qt.DockRight)
00167     self.__dwPythonShell.undock()
00168     #self.__dwPythonShell.setFixedExtentWidth(0)
00169     self.__dwPythonShell.setFixedExtentHeight(50)
00170     self.connect(self.__dwPythonShell,SIGNAL("visibilityChanged(bool)"),self.viewPythonShell, SLOT("setOn(bool)"))
00171     self.hidePythonShell()
00172 
00173     self.__common = common
00174     self.__prefs = common.prefMan().preferences()
00175 
00176     if self.__prefs.has_key('particle type'):
00177       for (item, val) in self.__prefs['particle type'].items():
00178         self.comboParticleType.insertItem(item)
00179       if self.common().options().securedir is None:
00180         self.comboParticleType.insertItem('NOT-DEFINED')
00181       if self.__prefs.has_key('lastparticletype'):
00182         self.comboParticleType.setCurrentText(self.__prefs['lastparticletype'])
00183       else:
00184         self.__prefs["lastparticletype"]= str(self.comboParticleType.currentText())
00185 
00186     #if self.__prefs.has_key('instrument type'):
00187     #  list = self.__prefs['instrument type'].keys()
00188     #  list.sort()
00189     #  for item in list:
00190     #    self.__runCond.comboInstrumentType.insertItem(item)
00191     #  self.__prefs["sel_instrument_type"] = str(self.__runCond.comboInstrumentType.currentText())
00192 
00193     if self.__prefs.has_key('orientation'):
00194       keyList = self.__prefs['orientation'].keys()
00195       keyList.sort()
00196       for item in keyList:
00197         self.comboOrientation.insertItem(item)
00198       if self.common().options().securedir is None:
00199         self.comboOrientation.insertItem('NOT-DEFINED')
00200       if self.__prefs.has_key('lastorientation'):
00201         self.comboOrientation.setCurrentText(self.__prefs['lastorientation'])
00202       else:
00203         self.__prefs["lastorientation"] = str(self.comboOrientation.currentText())
00204 
00205     #if self.__prefs.has_key('phase'):
00206     #  list = self.__prefs['phase'].keys()
00207     #  list.sort()
00208     #  for item in list:
00209     #    self.__runCond.comboPhase.insertItem(item)
00210     #  self.__prefs["sel_phase"] = str(self.__runCond.comboPhase.currentText())
00211 
00212 
00213     self.__currentAppDir = self.__prefs['appdir']
00214     self.__currentApp    = ""
00215     self.__currentSchemaDir = self.__prefs['reposdir']
00216     self.__currentSchema = ""
00217     self.__statMon = rcStatusMonitor(1000, self)
00218     self.__statMon.addWatchItem('Operator', self.getOperator)
00219     self.__statMon.addWatchItem('Operator Id', self.__prefs, 'userid')
00220     #self.__statMon.addWatchItem('FITS Enabled', self.__prefs, 'fitsnbl', alarmExpr='==0')
00221     #self.__statMon.addWatchItem('FITS Compressed', self.__prefs, 'fitscompress')
00222     self.__statMon.addWatchItem('Data Dir', self.__prefs, 'datadir')
00223     self.__statMon.addWatchItem('Log Dir', self.__prefs, 'logdir')
00224     self.__statMon.addWatchItem('App Dir', self.__prefs, 'appdir')
00225     self.__statMon.addWatchItem('Repos Dir', self.__prefs, 'reposdir')
00226     self.__statMon.addWatchItem('Report Dir', self.__prefs, 'reportdir')
00227     #self.__statMon.addWatchItem('FITS Dir', self.__prefs, 'fitsdir')
00228     self.__statMon.addWatchItem('Export Dir', self.__prefs, 'exportdir')
00229     self.__statMon.addWatchItem('Snapshot Dir', self.__prefs, 'snapshotdir')
00230     self.__statMon.addWatchItem('Message Log Enabled', self.__prefs, 'lognbl')
00231     self.__statMon.addWatchItem('Message Log Level', self.__prefs, 'loglevel')
00232     self.__statMon.addWatchItem('Message Log File', self.__prefs, 'logfilename')
00233     self.__statMon.addWatchItem('Archive On', self.__prefs, 'datasave',alarmExpr='==0')
00234     self.__statMon.addWatchItem('Export On', self.__prefs, 'dataexport',alarmExpr='==0')
00235     self.__statMon.addWatchItem('Snapshots On', self.__prefs, 'snapnbl', alarmExpr='==0')
00236     self.__statMon.addWatchItem('Schema Config File', self.getSchemaConfigFile)
00237 
00238     self.__paramVerifier = rcParamVerifier(self.common(), self)
00239 
00240     self.refreshUsers()
00241 
00242     self.__panels = {}
00243 
00244     self.RunControlTab.mouseDoubleClickEvent = self.mouseDblClick
00245 
00246     for i in range(self.RunControlTab.count()):
00247       tabPage = self.RunControlTab.page(i)
00248       label = str(self.RunControlTab.tabLabel(tabPage))
00249       if   label == 'Global':
00250         try:
00251           import GlobalPanelImpl
00252         except:
00253           gLog.logException()
00254         else:
00255           GlobalPanelLayout = QGridLayout(tabPage,1,1,0,6,"GlobalPanelLayout")
00256           panel = GlobalPanelImpl.GlobalPanelImpl(self, self.common(), tabPage)
00257           self.__panels[label] = panel
00258           GlobalPanelLayout.addWidget(panel,0,1)
00259       elif label == 'Power':
00260         try:
00261           import PowerPanelImpl
00262         except:
00263           gLog.logException()
00264         else:
00265           PowerPanelLayout = QGridLayout(tabPage,1,1,0,6,"PowerPanelLayout")
00266           panel = PowerPanelImpl.PowerPanelImpl(self, self.common(), tabPage)
00267           self.__panels[label] = panel
00268           PowerPanelLayout.addWidget(panel,0,1)
00269       elif label == 'ACD':
00270         try:
00271           import AcdPanelImpl
00272         except ImportError:
00273           pass
00274         except:
00275           gLog.logException()
00276           log.warning("*** Unable to load ACD sub-system panel...bypassing ***")
00277         else:
00278           AcdPanelLayout = QGridLayout(tabPage,1,1,0,6,"AcdPanelLayout")
00279           panel = AcdPanelImpl.AcdPanelImpl(self, self.common(), tabPage)
00280           self.__panels[label] = panel
00281           AcdPanelLayout.addWidget(panel,0,1)
00282       elif label == 'CAL':
00283         try:
00284           import CalPanelImpl
00285         except ImportError:
00286           pass
00287         except:
00288           gLog.logException()
00289           log.warning("*** Unable to load CAL sub-system panel...bypassing ***")
00290         else:
00291           CalPanelLayout = QGridLayout(tabPage,1,1,0,6,"CalPanelLayout")
00292           panel = CalPanelImpl.CalPanelImpl(self, self.common(), tabPage)
00293           self.__panels[label] = panel
00294           CalPanelLayout.addWidget(panel,0,1)
00295       elif label == 'TKR':
00296         try:
00297           import TkrPanelImpl
00298         except ImportError:
00299           pass
00300         except:
00301           gLog.logException()
00302           log.warning("*** Unable to load TKR sub-system panel...bypassing ***")
00303         else:
00304           TkrPanelLayout = QGridLayout(tabPage,1,1,0,6,"TkrPanelLayout")
00305           panel = TkrPanelImpl.TkrPanelImpl(self, self.common(), tabPage)
00306           self.__panels[label] = panel
00307           TkrPanelLayout.addWidget(panel,0,1)
00308 
00309   def refreshUsers(self, operator=None):
00310     self.cmbOperator.clear()
00311     userList = self.__prefs['users'].getIdNameDict().values()
00312     userList.sort()
00313     for userName in userList:
00314       self.cmbOperator.insertItem(userName)
00315     if self.common().options().securedir is None:
00316       self.cmbOperator.insertItem('NOT-DEFINED')
00317 
00318     if operator is not None:
00319       self.cmbOperator.setCurrentText(operator.getName())
00320 
00321   def mouseDblClick(self, event):
00322     tabPage = self.RunControlTab.currentPage()
00323     label = str(self.RunControlTab.tabLabel(tabPage))
00324     if label in self.__panels:
00325       panel = self.__panels[label]
00326       dwPanel = self.DockableTab(self.RunControlTab, label, panel, tabPage)
00327       dwPanel.setResizeEnabled(1)
00328       dwPanel.setVerticallyStretchable(0)
00329       dwPanel.setCloseMode(QDockWindow.Always)
00330       panel.reparent(dwPanel, 0, QPoint(0, 0), 1)
00331       dwPanel.setWidget(panel)
00332       dwPanel.undock()
00333       dwPanel.show()
00334 
00335   def activateTab(self, tabPage):
00336     label = str(self.RunControlTab.tabLabel(tabPage))
00337     if label in self.__panels:
00338       panel = self.__panels[label]
00339       if "activate" in dir(panel):
00340         panel.activate()
00341 
00342   def panels(self):
00343     return self.__panels
00344 
00345   def common(self):
00346     return self.__common
00347 
00348   def preferences(self):
00349     return self.__prefs
00350 
00351   def statusMonitor(self):
00352     return self.__statMon
00353 
00354   def parameterVerifier(self):
00355     return self.__paramVerifier
00356 
00357   def getSchemaConfigFile(self):
00358     dbn = self.common().getDBN()
00359     if dbn.has_key('_LATSchemaFile'):
00360       return dbn['_LATSchemaFile']
00361 
00362   def getOperator(self):
00363     return self.__prefs['operator']
00364 
00365   def getCommentWidget(self):
00366     return self.__comments.getWidget()
00367 
00368   def getPythonShellWidget(self):
00369     return self.__pythonShell.getWidget()
00370 
00371   def statusPanelVisChanged(self, visible):
00372     self.viewStatusPanel.setOn(visible)
00373     if visible:
00374       self.__statMon.startWatch()
00375     else:
00376       self.__statMon.stopWatch()
00377 
00378   def showHideStatusPanel(self):
00379     if self.viewStatusPanel.isOn():
00380       self.__dwStatusPanel.show()
00381     else:
00382       self.__dwStatusPanel.hide()
00383 
00384   def showHideComments(self):
00385     if self.viewComments.isOn():
00386       self.__dwComments.show()
00387     else:
00388       self.__dwComments.hide()
00389 
00390   def showComments(self):
00391     self.__dwComments.show()
00392 
00393   def hideComments(self):
00394     self.__dwComments.hide()
00395 
00396   #def showHideRunCond(self):
00397   #  if self.viewRunCond.isOn():
00398   #    self.__dwRunCond.show()
00399   #  else:
00400   #    self.__dwRunCond.hide()
00401 
00402   def showHidePythonShell(self):
00403     pass
00404 
00405   def showPythonShell(self):
00406     self.__dwPythonShell.show()
00407     self.__tePythonShell.setFocus()
00408 
00409   def hidePythonShell(self):
00410     self.__dwPythonShell.hide()
00411 
00412   def isPythonShellHidden(self):
00413     return not self.viewPythonShell.isOn()
00414 
00415   def PreferencesActivated(self):
00416     prefGUI = self.__common.prefGUI()
00417     prefGUI.loadConfig()
00418     status = prefGUI.exec_loop()
00419     if status == prefGUI.Accepted:
00420       prefs = self.__common.prefMan().preferences()
00421       self.__common.EBFdistribution()
00422       self.__common.startLogger(startup=False)
00423       operator = prefs["operatorobj"]
00424       self.refreshUsers(operator)
00425       if self.__currentAppDir != prefs['appdir']:
00426         self.__currentAppDir = prefs['appdir']
00427         self.__currentApp = ""
00428       if self.__currentSchemaDir != prefs['reposdir']:
00429         self.__currentSchemaDir = prefs['reposdir']
00430         self.__currentSchema = ""
00431 
00432   def ResetClicked(self):
00433     pass
00434 
00435   def StopClicked(self):
00436     pass
00437 
00438   def RunClicked(self):
00439     pass
00440 
00441   def PauseClicked(self):
00442     pass
00443 
00444   def loadScript(self):
00445     currentApp = os.path.join(self.__currentAppDir, self.__currentApp)
00446     rcAppSel = rcFileSelector(currentApp, "(*.py)", self, "Select an application")
00447     applName = rcAppSel.getValue()
00448     # Allow the C++ object to be deleted
00449     rcAppSel.deleteLater()
00450     if applName is None: return
00451     self.__currentAppDir, self.__currentApp = os.path.split(applName)
00452     self.OpenAppl.clearEdit()
00453     self.OpenAppl.setCurrentText(applName)
00454     self.initApp()
00455 
00456   def loadSchema(self):
00457     currentSchema = os.path.join(self.__currentSchemaDir, self.__currentSchema)
00458     rcSchemaSel = rcFileSelector(currentSchema, "(*.xml)", self, "Select a schema")
00459     schemaName = rcSchemaSel.getValue()
00460     # Allow the C++ object to be deleted
00461     rcSchemaSel.deleteLater()
00462     if schemaName is None: return
00463     self.__currentSchemaDir, self.__currentSchema = os.path.split(schemaName)
00464     self.__common.readSchema(schemaName)
00465     if self.getApp() is not None:
00466       self.getApp().lat  = self.__common.getLAT()
00467       self.getApp().xbrd = self.__common.getXBRD()
00468     self.ResetClicked()
00469     self.schemaChanged()
00470     self.__panels['Power'].activate()
00471     self.__panels['Global'].checkFabricEnable(self.__common.getLAT().existsGEM())
00472 
00473   def schemaChanged(self):
00474     pass
00475 
00476   def getApp(self):
00477     # Overridden in RunControlMain
00478     return None
00479 
00480   def fileExit(self):
00481     # Write the modified preferences to the cfg file
00482     self.close()
00483 
00484   def connectClicked(self):
00485     log.warning("RunControlMainGUIImpl.connectClicked(): Not implemented yet")
00486 
00487   def fileLogout(self):
00488     log.warning("RunControlMainGUIImpl.fileLogout(): Not implemented yet")
00489 
00490   def closeEvent(self, e):
00491     e.accept()
00492 
00493   def filePrint(self):
00494     log.warning("RunControlMainGUIImpl.filePrint(): Not implemented yet")
00495 
00496   def setOperator(self, operator):
00497     pass
00498 
00499   def setParticleType(self, particleType):
00500     pass
00501 
00502   def setInstrumentType(self, instrumentType):
00503     pass
00504 
00505   def setOrientation(self, orientation):
00506     pass
00507 
00508   def setPhase(self, phase):
00509     pass
00510 
00511   def verifySoftware(self):
00512     pass
00513 
00514   def elogWebsite(self):
00515     pass
00516 
00517   def aboutRunControl(self):
00518     pass
00519 
00520 class rcFileSelector(QFileDialog):
00521   def __init__(self, startwith, filter, parent, name):
00522     QFileDialog.__init__(self, parent, name, 0)
00523     self.setMode(QFileDialog.ExistingFile)
00524     self.setFilter(filter)
00525     self.setDir(os.path.dirname(startwith))
00526     self.setCaption(name)
00527     self.setViewMode( QFileDialog.Detail)
00528     self.setSelection(startwith)
00529 
00530   def getValue(self):
00531     if self.exec_loop() == QDialog.Accepted:
00532       return str(self.selectedFile())
00533     else:
00534       return None

Generated on Fri Jul 21 13:26:32 2006 for LATTE R04-12-00 by doxygen 1.4.3