annotate aim-mat/gui/aim_updatecheckboxes.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 20ada0af3d7d
children
rev   line source
tomwalters@0 1 % procedure for 'aim-mat'
tomwalters@0 2 %
tomwalters@0 3 % INPUT VALUES:
tomwalters@0 4 %
tomwalters@0 5 % RETURN VALUE:
tomwalters@0 6 %
tomwalters@0 7 %
bleeck@3 8 %
tomwalters@0 9 % (c) 2011, University of Southampton
bleeck@3 10 % Maintained by Stefan Bleeck (bleeck@gmail.com)
bleeck@3 11 % download of current version is on the soundsoftware site:
bleeck@3 12 % http://code.soundsoftware.ac.uk/projects/aimmat
bleeck@3 13 % documentation and everything is on http://www.acousticscale.org
bleeck@3 14
tomwalters@0 15
tomwalters@0 16
tomwalters@0 17 function handles=aim_updatecheckboxes(hObject, eventdata, handles,nr);
tomwalters@0 18
tomwalters@0 19
tomwalters@0 20 % curval=get(hObject,'Value');
tomwalters@0 21 % handles.info.calculate(nr)=curval;
tomwalters@0 22
tomwalters@0 23 loadstatus(1)=handles.info.pcp_loaded;
tomwalters@0 24 loadstatus(2)=handles.info.bmm_loaded;
tomwalters@0 25 loadstatus(3)=handles.info.nap_loaded;
tomwalters@0 26 loadstatus(4)=handles.info.strobes_loaded;
tomwalters@0 27 loadstatus(5)=handles.info.sai_loaded;
tomwalters@0 28 loadstatus(6)=handles.info.usermodule_loaded;
tomwalters@0 29 loadstatus(7)=handles.info.movie_loaded;
tomwalters@0 30
tomwalters@0 31
tomwalters@0 32 curval=get(hObject,'Value');
tomwalters@0 33 if curval==1
tomwalters@0 34 for num=nr:-1:1
tomwalters@0 35 if loadstatus(num)==0
tomwalters@0 36 % handles.info.calculate(num)=curval;
tomwalters@0 37 hand=getcheckboxhandle(handles,num);
tomwalters@0 38 set(hand,'Value',curval);
tomwalters@0 39 else
tomwalters@0 40 break
tomwalters@0 41 end
tomwalters@0 42 end
tomwalters@0 43 else
tomwalters@0 44 for num=nr:7
tomwalters@0 45 % handles.info.calculate(num)=curval;
tomwalters@0 46 hand=getcheckboxhandle(handles,num);
tomwalters@0 47 set(hand,'Value',curval);
tomwalters@0 48 end
tomwalters@0 49 end
tomwalters@0 50
tomwalters@0 51
tomwalters@0 52
tomwalters@0 53 function hand=getcheckboxhandle(handles,nr)
tomwalters@0 54 switch nr
tomwalters@0 55 case 1
tomwalters@0 56 hand=handles.checkbox0;
tomwalters@0 57 case 2
tomwalters@0 58 hand=handles.checkbox1;
tomwalters@0 59 case 3
tomwalters@0 60 hand=handles.checkbox2;
tomwalters@0 61 case 4
tomwalters@0 62 hand=handles.checkbox3;
tomwalters@0 63 case 5
tomwalters@0 64 hand=handles.checkbox4;
tomwalters@0 65 case 6
tomwalters@0 66 hand=handles.checkbox8;
tomwalters@0 67 case 7
tomwalters@0 68 hand=handles.checkbox5;
tomwalters@0 69 end