view m-toolbox/m/gui/gltpda/g_WindListCallback.m @ 9:fbbfcd56e449 database-connection-manager

Remove dead code
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

function g_WindListCallback(hObject, varargin)
   
   global params objName
   
   currParamID   = get(hObject,'UserData');
   currWindValue = get(hObject,'Value');
   listWindows   = ['Kaiser',specwin.getTypes];
   currWindow    = listWindows{currWindValue};
   oldWindObj    = params.params(currParamID).val;
   oldWindow     = oldWindObj.type;
   if strcmp(currWindow,oldWindow), return;
   else
      currWindLength = str2double(get(objName{currParamID,4},'String'));
      if strcmp(currWindow,'Kaiser'), windobj = specwin(currWindow,currWindLength,round(oldWindObj.psll));
      else windobj = specwin(currWindow,currWindLength);
      end
   end
   params=pset(params,params.params(currParamID).key,windobj);
   set(findobj('Tag','apply'),'Enable','on');
   set(findobj('Tag','undo'),'Enable','on');
   
   currPanel = get(hObject,'Parent');
   fieldPosition = get(hObject,'Position');
   if strcmp(currWindow,'Kaiser')
    % PSL value if Kaiser:
      currPSL = params.params(currParamID).val.psll;
      objName{currParamID,5} =  uicontrol('Parent',currPanel,'BackgroundColor',[1 1 1],'Units','pixels','Position',[275 fieldPosition(2) 60 20],'String',num2str(currPSL),'TooltipString','Peak Sidelobe','Visible','on','Enable','on','UserData',currParamID,'Callback',@g_WindPSLCallback,'Style','edit');
   else
      try delete(objName{currParamID,5}); catch, end;
   end
   
end