Changeset 850 for trunk/src


Ignore:
Timestamp:
Jan 16, 2015, 11:32:34 AM (10 years ago)
Author:
sommeria
Message:

add command clear line on set-object

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_input.m

    r849 r850  
    21032103 par_civ1.FrameIndexB=num2str(i2);
    21042104 par_civ1.ImageName_B=ImageName_B;
    2105  
    2106 
    2107 % handles    structure with handles and user data (see GUIDATA)
    2108 
    21092105
    21102106% --- Executes on button press in InportParam.
     
    21482144        return
    21492145    end
    2150 %     Param=rmfield(Param,'InputTable');% do not refresh Input files and index range
    2151 %     Param=rmfield(Param,'IndexRange'); 
    2152 %     fill_GUI(Param,handles.civ_input)% fill the elements of the GUI series with the input parameters
    2153 % %     SeriesData=get(h,'UserData');
    2154 %     if isfield(Param,'InputFields')
    2155 %         ListField=Param.InputFields.FieldName;
    2156 %         set(handles.FieldName,'String',[ListField;{'get-field...'}])
    2157 %          set(handles.FieldName,'Value',1:numel(ListField))
    2158 %     end       
    2159 %     if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
    2160 %         set(handles.ActionInput,'Visible','on')
    2161 %         set(handles.ActionInput,'Value',0)
    2162 %         Param.ActionInput.ConfigSource=filexml;% record the source of config for future info
    2163 %         SeriesData.ActionInput=Param.ActionInput;
    2164 %     end
    2165 %     if isfield(Param,'ProjObject') %introduce projection object if relevant
    2166 %         SeriesData.ProjObject=Param.ProjObject;
    2167 %     end
    2168 %     set(handles.series,'UserData',SeriesData)
    2169 %     if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1)
    2170 %         set(handles.ProjObject,'String',Param.ProjObject.Name)
    2171 %         set(handles.ViewObject,'Visible','on')
    2172 %         set(handles.EditObject,'Visible','on')
    2173 %         set(handles.DeleteObject,'Visible','on')
    2174 %     else     
    2175 %         set(handles.ProjObject,'String','')
    2176 %         set(handles.ProjObject,'Visible','off')
    2177 %         set(handles.ViewObject,'Visible','off')
    2178 %         set(handles.EditObject,'Visible','off')
    2179 %         set(handles.DeleteObject,'Visible','off')     
    2180 %     end     
    2181 %     set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated
    2182 end
    2183 
    2184 
    2185 % --- Executes on selection change in popupmenu11.
    2186 function popupmenu11_Callback(hObject, eventdata, handles)
    2187 % hObject    handle to popupmenu11 (see GCBO)
    2188 % eventdata  reserved - to be defined in a future version of MATLAB
    2189 % handles    structure with handles and user data (see GUIDATA)
    2190 
    2191 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu11 contents as cell array
    2192 %        contents{get(hObject,'Value')} returns selected item from popupmenu11
    2193 
    2194 
    2195 % --- Executes during object creation, after setting all properties.
    2196 function popupmenu11_CreateFcn(hObject, eventdata, handles)
    2197 % hObject    handle to popupmenu11 (see GCBO)
    2198 % eventdata  reserved - to be defined in a future version of MATLAB
    2199 % handles    empty - handles not created until after all CreateFcns called
    2200 
    2201 % Hint: popupmenu controls usually have a white background on Windows.
    2202 %       See ISPC and COMPUTER.
    2203 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    2204     set(hObject,'BackgroundColor','white');
    2205 end
     2146end
     2147
     2148
     2149% --- Executes on selection change in iterate.
     2150function iterate_Callback(hObject, eventdata, handles)
     2151
  • trunk/src/set_object.m

    r809 r850  
    3838function varargout = set_object(varargin)
    3939
    40 % Last Modified by GUIDE v2.5 08-May-2014 23:03:29
     40% Last Modified by GUIDE v2.5 16-Jan-2015 11:03:00
    4141
    4242% Begin initialization code - DO NOT REFRESH
     
    593593
    594594set(handles.REFRESH,'BackgroundColor',[1 0 0])
    595 %set(handles.Coord,'BackgroundColor',[1 1 1])
    596595set(handles.num_RangeY_2,'BackgroundColor',[1 1 1])
    597596
     
    715714%------------------------------------------------------------------------
    716715web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp#ProjObject')
    717 % path_to_uvmat=which ('uvmat');% check the path of uvmat
    718 % pathelp=fileparts(path_to_uvmat);
    719 % helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
    720 % if ~isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
    721 %     addpath (fullfile(pathelp,'uvmat_doc'))
    722 %     web([helpfile '#set_object'])
    723 % end
    724 %------------------------------------------------------------------------
    725 
    726 function Name_Callback(hObject, eventdata, handles)
    727 % hObject    handle to Name (see GCBO)
    728 % eventdata  reserved - to be defined in a future version of MATLAB
    729 % handles    structure with handles and user data (see GUIDATA)
    730 
    731 % Hints: get(hObject,'String') returns contents of Name as text
    732 %        str2double(get(hObject,'String')) returns contents of Name as a double
    733 
    734 %------------------------------------------------------------------------
    735 % --- Executes when entered data in editable cell(s) in Coord.
    736 function Coord_CellEditCallback(hObject, eventdata, handles)
    737 %------------------------------------------------------------------------
    738 %set(handles.Coord,'BackgroundColor',[1 1 0])
    739 % ListType=get(handles.Type,'String');
    740 % Type=ListType{get(handles.Type,'Value')};
    741 % switch Type
    742 %     % add lines if multi line input needed
    743 %     case{'points','polyline','polygon'}
    744 %         Input=str2num(eventdata.EditData);%pasted input
    745 %         Coord=get(handles.Coord,'Data');
    746 %         iline=eventdata.Indices(1);% selected line number
    747 %         if size(Coord,1)<iline+numel(Input)
    748 %             Coord=[Coord ; zeros(iline+numel(Input)-size(Coord,1),size(Coord,2))];% append zeros to fit the new column
    749 %         end
    750 %         Coord(iline:iline+numel(Input)-1,eventdata.Indices(2))=Input';
    751 %         set(handles.Coord,'Data',Coord)
    752 % end
    753 %------------------------------------------------------------------------
     716
     717%------------------------------------------------------------------------
    754718% --- Executes when selected cell(s) is changed in ListCoord.
    755 %------------------------------------------------------------------------
     719%------------------------------------------------------------------------ 
    756720function Coord_CellSelectionCallback(hObject, eventdata, handles)
    757 
    758721if ~isempty(eventdata.Indices)
    759722    iline=eventdata.Indices(1);% selected line number
    760     set(handles.Coord,'UserData',iline)% used possibly for line deletion or table extension, using key_press_fcn
     723    set(handles.CoordLine,'String',num2str(iline))
    761724end
    762725
     
    785748if ismember(xx,[127 31])% delete, or downward
    786749    Coord=get(handles.Coord,'Data');
    787     iline=get(handles.Coord,'UserData');
     750    iline=str2double(get(handles.CoordLine,'String'));
    788751            if isequal(xx, 31)
    789752                if isequal(iline,size(Coord,1))% arrow downward
     
    795758    set(handles.Coord,'Data',Coord);
    796759end
     760
     761%------------------------------------------------------------------------
     762% --- Executes on button press in clear_line.
     763%------------------------------------------------------------------------
     764function clear_line_Callback(hObject, eventdata, handles)
     765
     766Coord=get(handles.Coord,'Data');
     767iline=str2double(get(handles.CoordLine,'String'));
     768if isempty(iline)
     769    msgbox_uvmat('WARNING','no line suppressed, select a line in the table')
     770else
     771    Coord(iline,:)=[];
     772    set(handles.REFRESH,'BackgroundColor',[1 0 1])
     773    set(handles.Coord,'Data',Coord);
     774    set(handles.CoordLine,'String','')
     775    REFRESH_Callback(hObject,eventdata,handles)
     776end
Note: See TracChangeset for help on using the changeset viewer.