def _init_ctrls(self): self.AddNewElement(self._protocol_pan()) clp = afp.collapsingPane(self, caption='Z stepping ...') clp.AddNewElement(seqdialog.seqPanel(clp, self.scope, mode='sequence')) self.AddNewElement(clp) self.seq_pan = clp self.AddNewElement(self._spool_to_pan()) ### Compression etc clp = afp.collapsingPane(self, caption='Compression and quantization ...') clp.AddNewElement(self._comp_pan(clp)) self.AddNewElement(clp) #analysis settings clp = afp.collapsingPane(self, caption='Real time analysis ...') self.scope.analysisSettings = AnalysisSettingsUI.AnalysisSettings( ) #Move me??? clp.AddNewElement( AnalysisSettingsUI.AnalysisSettingsPanel( clp, self.scope.analysisSettings, self.scope.analysisSettings.onMetadataChanged)) clp.AddNewElement( AnalysisSettingsUI.AnalysisDetailsPanel( clp, self.scope.analysisSettings, self.scope.analysisSettings.onMetadataChanged)) self.AddNewElement(clp) self.AddNewElement(self._spool_pan())
def __init__(self, parent_panel, **kwargs): DockedPanel.__init__(self, parent_panel, **kwargs) self.snapshots = list() self.next_view_id = 0 self.AddNewElement(self._anim_pan()) clp = afp.collapsingPane(self, caption='Settings ...') clp.AddNewElement(self._settings_pan(clp)) self.AddNewElement(clp)
def createGUI(self, parent, mdh, syncMdh=False, mdhChangedSignal=None): import wx from PYME.ui import manualFoldPanel as afp clp = afp.collapsingPane(parent, caption=self.name, folded=self.folded) cp = wx.Panel(clp, -1) vsizer = wx.BoxSizer(wx.VERTICAL) for item in self.items: it = item.createGUI(cp, mdh, syncMdh, mdhChangedSignal) vsizer.Add(it, 0, wx.RIGHT | wx.EXPAND, 5) cp.SetSizer(vsizer) clp.AddNewElement(cp) return clp
def _createCollapsingPane(self): clp = afp.collapsingPane( self, caption='Advanced ...') #|wx.CP_NO_TLW_RESIZE) #clp = wx.CollapsiblePane(self, label='Advanced ...', style = wx.CP_DEFAULT_STYLE)#|wx.CP_NO_TLW_RESIZE) #clp.Expand() #cp = clp.GetPane() cp = wx.Panel(clp, -1) #cp = clp = wx.Panel(self, -1) vsizer = wx.BoxSizer(wx.VERTICAL) sbAqMode = wx.StaticBoxSizer(wx.StaticBox(cp, -1, 'Acquisition Mode'), wx.HORIZONTAL) self.rbSingleShot = wx.RadioButton(cp, -1, 'Single Shot') self.rbSingleShot.SetValue(False) #self.rbSingleShot.SetToolTipString('Allows multiple channels with different integration times and good shutter synchronisation') self.rbSingleShot.Bind(wx.EVT_RADIOBUTTON, self.OnRbSingleShotRadiobutton) sbAqMode.Add(self.rbSingleShot, 1, wx.EXPAND, 0) self.rbContin = wx.RadioButton(cp, -1, 'Continuous') self.rbContin.SetValue(True) #self.rbContin.SetToolTipString('Allows fastest speeds, albeit without good syncronisation (fixable) or integration time flexibility') self.rbContin.Bind(wx.EVT_RADIOBUTTON, self.OnRbContinRadiobutton) sbAqMode.Add(self.rbContin, 1, wx.EXPAND, 0) vsizer.Add(sbAqMode, 0, wx.EXPAND | wx.TOP, 5) #self.bUpdateInt = wx.Button(id=wxID_ANDORFRAMEBUPDATEINT, # label='Update Integration Time', name='bUpdateInt', # parent=self, pos=wx.Point(104, 147), size=wx.Size(128, 23), # style=0) #self.bUpdateInt.Enable(False) #self.bUpdateInt.Bind(wx.EVT_BUTTON, self.OnBUpdateIntButton, # id=wxID_ANDORFRAMEBUPDATEINT) sbReadout = wx.StaticBoxSizer(wx.StaticBox(cp, -1, 'Readout Settings'), wx.VERTICAL) hsizer = wx.BoxSizer(wx.HORIZONTAL) hsizer.Add(wx.StaticText(cp, -1, 'Horizontal Clock:'), 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) self.chHorizClock = wx.Choice(cp, -1, choices=[]) self.chHorizClock.Bind(wx.EVT_CHOICE, self.OnChHorizClockChoice) hsizer.Add(self.chHorizClock, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) hsizer.Add(wx.StaticText(cp, -1, 'MHz'), 0, wx.ALIGN_CENTER_VERTICAL, 0) sbReadout.Add(hsizer, 0, 0, 0) hsizer = wx.BoxSizer(wx.HORIZONTAL) hsizer.Add(wx.StaticText(cp, -1, 'Vertical Clock:'), 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) self.chVertClock = wx.Choice(cp, -1, choices=[]) self.chVertClock.Bind(wx.EVT_CHOICE, self.OnChVertClockChoice) hsizer.Add(self.chVertClock, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) hsizer.Add(wx.StaticText(cp, -1, u'\u03BCs'), 0, wx.ALIGN_CENTER_VERTICAL, 0) sbReadout.Add(hsizer, 0, 0, 0) hsizer = wx.BoxSizer(wx.HORIZONTAL) self.cbFrameTransfer = wx.ToggleButton(cp, -1, u'Frame Transfer') self.cbFrameTransfer.SetValue(True) self.cbFrameTransfer.Bind(wx.EVT_TOGGLEBUTTON, self.OnCbFrameTransferCheckbox) hsizer.Add(self.cbFrameTransfer, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) self.cbBaselineClamp = wx.ToggleButton(cp, -1, u'Baseline Clamp') self.cbBaselineClamp.SetValue(self.cam.GetBaselineClamp()) self.cbBaselineClamp.Bind(wx.EVT_TOGGLEBUTTON, self.OnCbBaselineClampCheckbox) hsizer.Add(self.cbBaselineClamp, 0, wx.ALIGN_CENTER_VERTICAL, 0) sbReadout.Add(hsizer, 0, wx.TOP, 2) vsizer.Add(sbReadout, 0, wx.EXPAND | wx.TOP, 5) cp.SetSizer(vsizer) clp.AddNewElement(cp) return clp