Mercurial > hg > ltpda
comparison m-toolbox/m/gui/gltpda/g_WindListCallback.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 function g_WindListCallback(hObject, varargin) | |
2 | |
3 global params objName | |
4 | |
5 currParamID = get(hObject,'UserData'); | |
6 currWindValue = get(hObject,'Value'); | |
7 listWindows = ['Kaiser',specwin.getTypes]; | |
8 currWindow = listWindows{currWindValue}; | |
9 oldWindObj = params.params(currParamID).val; | |
10 oldWindow = oldWindObj.type; | |
11 if strcmp(currWindow,oldWindow), return; | |
12 else | |
13 currWindLength = str2double(get(objName{currParamID,4},'String')); | |
14 if strcmp(currWindow,'Kaiser'), windobj = specwin(currWindow,currWindLength,round(oldWindObj.psll)); | |
15 else windobj = specwin(currWindow,currWindLength); | |
16 end | |
17 end | |
18 params=pset(params,params.params(currParamID).key,windobj); | |
19 set(findobj('Tag','apply'),'Enable','on'); | |
20 set(findobj('Tag','undo'),'Enable','on'); | |
21 | |
22 currPanel = get(hObject,'Parent'); | |
23 fieldPosition = get(hObject,'Position'); | |
24 if strcmp(currWindow,'Kaiser') | |
25 % PSL value if Kaiser: | |
26 currPSL = params.params(currParamID).val.psll; | |
27 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'); | |
28 else | |
29 try delete(objName{currParamID,5}); catch, end; | |
30 end | |
31 | |
32 end |