Class ITSession
ITSession object is responsible for coordinating tasks in the IToolA.
| Summary | |
|---|---|
| object |
ITSession()
Create an ITSession object.
|
|
createSlitFitWindow(id, title="", newWindow=False)
Create a new/open slit fitting window. |
|
createSlitSelectWindow(id)
Create a new/open slit selection window with data of id. |
| boolean |
isFitWindowOpen(id)
The status of the window with id. |
| - |
registerEvent(event, callbackDef)
Register an event handler for event. |
| Detail |
|---|
Session()
ITSession object.
Note! Usually ITManager is responsible for creating a session object.
ITSession.createSlitFitWindow(id, title = "", newWindow=False)
id - string - ID for the window.
title - string - Title for the window.
newWindow - boolean - Force a new window.
ITSlitFitWindow - Window object.
itm = ITManager()
session = itm.getSession()
slitName = session.getSlitName(slitId)
fitWin,newWindow = session.createSlitFitWindow(str(slitId), slitName, False )
ITSession.createSlitSelectWindow(id)
id - string - ID for the window.
ITSlitSelectWindow - Window object.
itm = ITManager()
session = itm.getSession()
selectWin = session.createSlitSelectWindow('ids')
selectWin.show()
ITSession.isFitWindowOpen(id)
id - string - ID of the window.
ITSession.registerEvent(event, callbackDef)
event - numeric - Event.
callbackDef - function - Callback function for the event.
itm = ITManager() ... session = itm.getSession()
session.registerEvent(ITEvent.EVENT_SELECTWIN_SLITSELECTED,slitSelectedFunc) ... def slitSelectedFunc(self, slitId): # This is an event handler