Newer
Older
function display_QC( hGUI, hAxes )
%
% Function to plot the Water Sample measurements
%
% Input
% -----
% hGUI ............... Handel to the user interface
% hAxes .............. Handels to the graphic axes
%
% Output
% ------
% Retrieve named application data
% -------------------------------
tsg = getappdata( hGUI, 'tsg_data');
% get panel handle
% ----------------
hdlPanel = findobj(hGUI, 'tag', 'TAG_QC_DISPLAY_PANEL');
% get color axes and set 'BackgroundColor' properties of panel handle
% give a transparency effect
% -------------------------------------------------------------------

jacques.grelet_ird.fr
committed
%bgColor = get(hAxes(1), 'Color');
%set(hdlPanel, 'BackgroundColor', bgColor);
% and to his chlidren uicontrol
% -----------------------------

jacques.grelet_ird.fr
committed
%set(findobj(get(hdlPanel,'children'),'style','text'),...
% 'BackgroundColor', bgColor)
% set panel visible
% -----------------

jacques.grelet_ird.fr
committed
%set(hdlPanel, 'visible', 'on');
% get list of keys from hashtable tsg.qc.hash, defined inside
% tsg_initialisation.m
% -----------------------------------------------------------

jacques.grelet_ird.fr
committed
qc_list = keys(tsg.qc.hash);
% iterate (loop) on each key store inside hastable
% ------------------------------------------------

jacques.grelet_ird.fr
committed
for key = qc_list

jacques.grelet_ird.fr
committed
% get some values in hashtable
% ------------------------------------

jacques.grelet_ird.fr
committed
code = tsg.qc.hash.(key).code;
% get the uicontrol handle from tag construct with key
% ----------------------------------------------------

jacques.grelet_ird.fr
committed
hdlText = findobj(hGUI, 'tag', ['TAG_QC_TEXT_' char(key)]);
% find number of sample flag with this QC code
% --------------------------------------------
ind = find(tsg.SSPS_QC == code);
% if index empty, no data with this flag, set field to zero (char)
% ----------------------------------------------------------------
if isempty(ind)
set(hdlText, 'String', '0');
else
set(hdlText, 'String', num2str(numel(ind)));
end
end