ScriptEngineMain Class Reference

Class for providing a script engine framework. More...

List of all members.

Public Member Functions

def __init__
 ScriptEngineMain constructor.
def connectClicked
def applyPermissions
 Apply the permissions for the current operator.
def setEnabledTabPage
 Find the tabPage belonging to panel identified by panelLabel.
def setOperator
 Set the current operator.
def setParticleType
 Set the particle type.
def setOrientation
 Set the orientation.
def getName
 Retrieve the name of the main script engine class.
def __statusMsg
 Update the status bar with the message msg.
def __shutdown
 Clean up and shut down the various threads.
def initApp
 Method usually invoked by the GUI to load a new application.
def loadApp
 Method that can be invoked from code to load a new application.
def loadModule
 Method that can be invoked from code to load a new module.
def __initAppCommon
 Initialize the GUI based on the loaded application.
def __updateRunConditions
 Set the run conditions to the NOT-DEFINED value.
def __updateAppListBox
 Update the application combo box with the loaded application.appName Full path for the application.
def __startApp
 Load and instantiate the application.
def __startModule
 Clear previous app, force garbage collection and setup the GUI.
def __clearPreviousApp
 Delete the previous app and force garbage collection.
def __setupApp
 Setup the GUI for the loaded app.
def __updateGUI
 Method for updating the GUI.
def updateState
 Update the GUI to reflect the state of the current application.
def RunClicked
 Slot for the run button.
def __run
 Start the execution of the application.
def __resume
 Resume the paused script.
def ResetClicked
 Slot for the reset button.
def __reset
 Reset the script.
def StopClicked
 Slot for the stop button.
def __abort
 Abort the running script.
def PauseClicked
 Slot for the pause button.
def __pause
 Pause the running script (if supported).
def doRun
 Emit a Run button click under program control.
def doReset
 Emit a Reset button click under program control.
def doEmit
 Emit a signal, possibly from a subthread.
def normalCursor
 Set the mouse cursor to normal.
def waitCursor
 Set the mouse cursor to hourglass.
def getEndRunComments
 Retrieve the end run comments widget.
def handleComments
 Based on the current state hide or show the comment panel.
def showHidePythonShell
 Toggle the Python shell window.
def verifySoftware
 Perform software verification.
def elogWebsite
 Launch the E-Logbook web site.
def warnFreeSpace
 Display a low disk space warning.
def warnDirectoryExist
 Warn if a directory does not exist.
def aboutScriptEngine
 The About dialog box for the Script Engine.
def fileLogout
 Log the current user off.
def closeEvent
 Trap the close event of the main GUI.
def login
 Login to the script engine.
def isGUIthread
 Returns True if this method is being called from the GUI thread.
def customEvent
 Post an event to the GUI thread.
def createGUI
 Method used for instantiating a GUI from a non-GUI subthread.
def execGUImethodNR
 Method used for executing a GUI function from a non-GUI thread.
def getEndRunDlg
 Retrieve reference to the End Run Dialog.


Detailed Description

Class for providing a script engine framework.

Definition at line 72 of file ScriptEngineMain.py.


Member Function Documentation

def __abort   self  ) 
 

Abort the running script.

Definition at line 494 of file ScriptEngineMain.py.

def __clearPreviousApp   self  ) 
 

Delete the previous app and force garbage collection.

Definition at line 370 of file ScriptEngineMain.py.

def __init__   self,
  common,
  parent = None,
  name = "RunControl",
  fl = 0
 

ScriptEngineMain constructor.

Parameters:
common ScriptEngineCommon instance
parent Parent GUI
name GUI name
fl GUI flags

Definition at line 75 of file ScriptEngineMain.py.

def __initAppCommon   self,
  app,
  appName,
  filename
 

Initialize the GUI based on the loaded application.

Parameters:
app Application module object
appName Application name
filename Filename for the loaded application module
Returns:
Application loaded message

Definition at line 297 of file ScriptEngineMain.py.

def __pause   self  ) 
 

Pause the running script (if supported).

Definition at line 510 of file ScriptEngineMain.py.

def __reset   self  ) 
 

Reset the script.

Definition at line 478 of file ScriptEngineMain.py.

def __resume   self  ) 
 

Resume the paused script.

Definition at line 463 of file ScriptEngineMain.py.

def __run   self  ) 
 

Start the execution of the application.

Definition at line 456 of file ScriptEngineMain.py.

def __setupApp   self,
  app,
  appName,
  filename
 

Setup the GUI for the loaded app.

Parameters:
app Application object
appName Full path for the application Python source
filename Name of the file that the module is loaded from

Definition at line 380 of file ScriptEngineMain.py.

def __shutdown   self  ) 
 

Clean up and shut down the various threads.

Definition at line 229 of file ScriptEngineMain.py.

def __startApp   self,
  appName
 

Load and instantiate the application.

Parameters:
appName Full path for the application.

Definition at line 340 of file ScriptEngineMain.py.

def __startModule   self,
  module
 

Clear previous app, force garbage collection and setup the GUI.

Parameters:
module Module object for the loaded application.

Definition at line 360 of file ScriptEngineMain.py.

def __statusMsg   self,
  msg,
  tmo
 

Update the status bar with the message msg.

Parameters:
msg Message
tmo Display duration

Definition at line 221 of file ScriptEngineMain.py.

def __updateAppListBox   self,
  appName
 

Update the application combo box with the loaded application.appName Full path for the application.

Definition at line 332 of file ScriptEngineMain.py.

def __updateGUI   self,
  enabled
 

Method for updating the GUI.

Parameters:
enabled Run conditions enabled/disabled flag.

Definition at line 404 of file ScriptEngineMain.py.

def __updateRunConditions   self,
  undef
 

Set the run conditions to the NOT-DEFINED value.

Parameters:
undef Undefined value string

Definition at line 316 of file ScriptEngineMain.py.

def aboutScriptEngine   self  ) 
 

The About dialog box for the Script Engine.

Displays version information for Hippo, Qt, PyQt, SIP and subsystem releases.

Definition at line 683 of file ScriptEngineMain.py.

def applyPermissions   self,
  operator
 

Apply the permissions for the current operator.

Parameters:
operator rcUser instance

Definition at line 134 of file ScriptEngineMain.py.

def closeEvent   self,
  e
 

Trap the close event of the main GUI.

In secure mode, only administrators can close the main GUI while logged in. Other users need to logout first in order to exit the Script Engine.

Parameters:
e A QEvent object.

Definition at line 722 of file ScriptEngineMain.py.

def connectClicked   self  ) 
 

Definition at line 128 of file ScriptEngineMain.py.

def createGUI   self,
  obj,
  args,
  kwargs
 

Method used for instantiating a GUI from a non-GUI subthread.

Parameters:
obj Class of the object that is being created
args Positional arguments to the constructor of the object
kwargs Keyword arguments to the constructor of the object
Returns:
Object instance

Definition at line 789 of file ScriptEngineMain.py.

def customEvent   self,
  e
 

Post an event to the GUI thread.

This method overrides the QObject base class's. There is generally no reason to call this method directly. It is called by the Qt infrastructure whenever the custom event is posted, e.g. by the following three methods of this class: createGUI, execGUImethodNR and execGUImethod.

Parameters:
e A QEvent object

Definition at line 777 of file ScriptEngineMain.py.

def doEmit   self,
  obj,
  signal = SIGNAL("clicked()"),
  args = ()
 

Emit a signal, possibly from a subthread.

By default the signal is 'clicked()' with no arguments.

Parameters:
obj GUI widget that will receive the signal
signal Signal
args Arguments to the slot method

Definition at line 532 of file ScriptEngineMain.py.

def doReset   self  ) 
 

Emit a Reset button click under program control.

Can be done from a subthread.

Definition at line 525 of file ScriptEngineMain.py.

def doRun   self  ) 
 

Emit a Run button click under program control.

Can be done from a subthread.

Definition at line 518 of file ScriptEngineMain.py.

def elogWebsite   self  ) 
 

Launch the E-Logbook web site.

Definition at line 648 of file ScriptEngineMain.py.

def execGUImethodNR   self,
  func,
  args,
  kwargs
 

Method used for executing a GUI function from a non-GUI thread.

Use this method when no (useful) response is expected or when waiting for one could cause a deadlock. Any response from the function is lost.

Parameters:
func The method whose execution in the GUI thread is being requested
args Positional arguments to the constructor of the object
kwargs Keyword arguments to the constructor of the object
Returns:
None

Definition at line 801 of file ScriptEngineMain.py.

def fileLogout   self  ) 
 

Log the current user off.

Definition at line 714 of file ScriptEngineMain.py.

def getEndRunComments   self  ) 
 

Retrieve the end run comments widget.

Returns:
rcCommentPanel instance

Definition at line 558 of file ScriptEngineMain.py.

def getEndRunDlg   self  ) 
 

Retrieve reference to the End Run Dialog.

Returns:
rcEndRunDlgImpl instance

Definition at line 818 of file ScriptEngineMain.py.

def getName   self  ) 
 

Retrieve the name of the main script engine class.

Returns:
Main script engine class name

Definition at line 214 of file ScriptEngineMain.py.

def handleComments   self,
  currentState
 

Based on the current state hide or show the comment panel.

Parameters:
currentState Script run state.

Definition at line 565 of file ScriptEngineMain.py.

def initApp   self  ) 
 

Method usually invoked by the GUI to load a new application.

Definition at line 263 of file ScriptEngineMain.py.

def isGUIthread   self  ) 
 

Returns True if this method is being called from the GUI thread.

Returns:
Boolean indicating whether the current thread is the GUI thread.

Definition at line 770 of file ScriptEngineMain.py.

def loadApp   self,
  applName
 

Method that can be invoked from code to load a new application.

Parameters:
applName Name of an application to load

Definition at line 271 of file ScriptEngineMain.py.

def loadModule   self,
  module
 

Method that can be invoked from code to load a new module.

Parameters:
module Pointer to module to load

Definition at line 290 of file ScriptEngineMain.py.

def login   self  ) 
 

Login to the script engine.

Definition at line 736 of file ScriptEngineMain.py.

def normalCursor   self  ) 
 

Set the mouse cursor to normal.

Definition at line 546 of file ScriptEngineMain.py.

def PauseClicked   self  ) 
 

Slot for the pause button.

Definition at line 501 of file ScriptEngineMain.py.

def ResetClicked   self  ) 
 

Slot for the reset button.

Definition at line 469 of file ScriptEngineMain.py.

def RunClicked   self  ) 
 

Slot for the run button.

Definition at line 444 of file ScriptEngineMain.py.

def setEnabledTabPage   self,
  panelLabel,
  enable
 

Find the tabPage belonging to panel identified by panelLabel.

Parameters:
panelLabel Panel label
enable Enable/disable flag

Definition at line 180 of file ScriptEngineMain.py.

def setOperator   self,
  operator
 

Set the current operator.

Parameters:
operator rcUser instance

Definition at line 192 of file ScriptEngineMain.py.

def setOrientation   self,
  orientation
 

Set the orientation.

Parameters:
orientation Orientation

Definition at line 207 of file ScriptEngineMain.py.

def setParticleType   self,
  particleType
 

Set the particle type.

Parameters:
particleType Particle type

Definition at line 200 of file ScriptEngineMain.py.

def showHidePythonShell   self  ) 
 

Toggle the Python shell window.

Definition at line 589 of file ScriptEngineMain.py.

def StopClicked   self  ) 
 

Slot for the stop button.

Definition at line 485 of file ScriptEngineMain.py.

def updateState   self,
  state
 

Update the GUI to reflect the state of the current application.

Parameters:
state State string from the application's FSM

Definition at line 437 of file ScriptEngineMain.py.

def verifySoftware   self  ) 
 

Perform software verification.

Definition at line 600 of file ScriptEngineMain.py.

def waitCursor   self  ) 
 

Set the mouse cursor to hourglass.

Definition at line 552 of file ScriptEngineMain.py.

def warnDirectoryExist   self,
  directory
 

Warn if a directory does not exist.

Parameters:
directory Non-existant directory.

Definition at line 669 of file ScriptEngineMain.py.

def warnFreeSpace   self,
  warn_level
 

Display a low disk space warning.

Parameters:
warn_level Disk space in bytes.

Definition at line 654 of file ScriptEngineMain.py.


The documentation for this class was generated from the following file:
Generated on Thu Apr 27 20:53:35 2006 for LICOS L02-01-00 by doxygen 1.4.6-NO