def __init__(self, sr): """Display exposure status and a few user input widgets. """ # if True, run in debug-only mode (which doesn't DO anything, it just pretends) sr.debug = False self.expModel = ExposeModel.getModel(InstName) self.spicamModel = TUI.Inst.SPIcam.SPIcamModel.getModel() self.tccModel = TUI.TCC.TCCModel.getModel() self.sr = sr row = 0 expStatusWdg = ExposeStatusWdg( master=sr.master, instName=InstName, helpURL=HelpURL, ) expStatusWdg.grid(row=row, column=0, columnspan=3, sticky="w") row += 1 self.expWdg = ExposeInputWdg( master=sr.master, instName=InstName, expTypes="object", helpURL=HelpURL, ) self.expWdg.grid(row=row, column=0, columnspan=3, sticky="w") row += 1 wdgFrame = Tkinter.Frame(sr.master) gr = RO.Wdg.Gridder(wdgFrame, sticky="w") self.filterWdg = RO.Wdg.OptionMenu( master=self.expWdg, items=[], helpText="filter", helpURL=HelpURL, defMenu="Current", autoIsCurrent=True, ) self.expWdg.gridder.gridWdg("Filter", self.filterWdg, sticky="w", colSpan=3) self.spicamModel.filterNames.addCallback(self.filterWdg.setItems) self.spicamModel.filterName.addIndexedCallback( self.filterWdg.setDefault, 0)
def __init__(self, sr): """Display exposure status and a few user input widgets. """ # if True, run in debug-only mode (which doesn't DO anything, it just pretends) sr.debug = False expStatusWdg = ExposeStatusWdg( master = sr.master, instName = "DIS", ) expStatusWdg.grid(row=0, column=0, sticky="w") wdgFrame = Tkinter.Frame(sr.master) gr = RO.Wdg.Gridder(wdgFrame) self.expModel = ExposeModel.getModel("DIS") timeUnitsVar = Tkinter.StringVar() self.timeWdg = RO.Wdg.DMSEntry ( master = wdgFrame, minValue = self.expModel.instInfo.minExpTime, maxValue = self.expModel.instInfo.maxExpTime, isRelative = True, isHours = True, unitsVar = timeUnitsVar, width = 10, helpText = "Exposure time", ) gr.gridWdg("Time", self.timeWdg, timeUnitsVar) self.numExpWdg = RO.Wdg.IntEntry( master = wdgFrame, defValue = 1, minValue = 1, maxValue = 999, helpText = "Number of exposures in the sequence", ) gr.gridWdg("#Exp", self.numExpWdg) wdgFrame.grid(row=1, column=0, sticky="w")
def __init__(self, sr): """Display exposure status and a few user input widgets. """ # if True, run in debug-only mode (which doesn't DO anything, it just pretends) sr.debug = False self.expModel = ExposeModel.getModel(InstName) self.spicamModel = TUI.Inst.SPIcam.SPIcamModel.getModel() self.tccModel = TUI.TCC.TCCModel.getModel() self.sr = sr row = 0 expStatusWdg = ExposeStatusWdg( master = sr.master, instName = InstName, helpURL = HelpURL, ) expStatusWdg.grid(row=row, column=0, columnspan=3, sticky="w") row += 1 self.expWdg = ExposeInputWdg( master = sr.master, instName = InstName, expTypes = "object", helpURL = HelpURL, ) self.expWdg.grid(row=row, column=0, columnspan=3, sticky="w") row += 1 self.filterWdg = RO.Wdg.OptionMenu( master = self.expWdg, items = [], helpText = "filter", helpURL = HelpURL, defMenu = "Current", autoIsCurrent = True, ) self.expWdg.gridder.gridWdg("Filter", self.filterWdg, sticky="w", colSpan=3) self.spicamModel.filterNames.addCallback(self.filterWdg.setItems) self.spicamModel.filterName.addIndexedCallback(self.filterWdg.setDefault, 0)
def __init__(self, sr): """Display exposure status and a few user input widgets. """ # if True, run in debug-only mode (which doesn't DO anything, it just pretends) sr.debug = False expStatusWdg = ExposeStatusWdg( master=sr.master, instName="DIS", ) expStatusWdg.grid(row=0, column=0, sticky="w") wdgFrame = Tkinter.Frame(sr.master) gr = RO.Wdg.Gridder(wdgFrame) self.expModel = ExposeModel.getModel("DIS") timeUnitsVar = Tkinter.StringVar() self.timeWdg = RO.Wdg.DMSEntry( master=wdgFrame, minValue=self.expModel.instInfo.minExpTime, maxValue=self.expModel.instInfo.maxExpTime, isRelative=True, isHours=True, unitsVar=timeUnitsVar, width=10, helpText="Exposure time", ) gr.gridWdg("Time", self.timeWdg, timeUnitsVar) self.numExpWdg = RO.Wdg.IntEntry( master=wdgFrame, defValue=1, minValue=1, maxValue=999, helpText="Number of exposures in the sequence", ) gr.gridWdg("#Exp", self.numExpWdg) wdgFrame.grid(row=1, column=0, sticky="w")