IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_reptt_blockcube.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for a @ref reptt_blockcube
4 %> @sa reptt_blockcube
5 
6 %> @cond
7 function varargout = uip_reptt_blockcube(varargin)
8 % Begin initialization code - DO NOT EDIT
9 gui_Singleton = 0;
10 gui_State = struct('gui_Name', mfilename, ...
11  'gui_Singleton', gui_Singleton, ...
12  'gui_OpeningFcn', @uip_reptt_blockcube_OpeningFcn, ...
13  'gui_OutputFcn', @uip_reptt_blockcube_OutputFcn, ...
14  'gui_LayoutFcn', [] , ...
15  'gui_Callback', []);
16 if nargin && ischar(varargin{1})
17  gui_State.gui_Callback = str2func(varargin{1});
18 end
19 
20 if nargout
21  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
22 else
23  gui_mainfcn(gui_State, varargin{:});
24 end
25 % End initialization code - DO NOT EDIT
26 
27 % --- Executes just before uip_reptt_blockcube is made visible.
28 function uip_reptt_blockcube_OpeningFcn(hObject, eventdata, handles, varargin)
29 handles.output.flag_ok = 0;
30 guidata(hObject, handles);
31 gui_set_position(hObject);
32 listbox_load_from_workspace('sgs', handles.popupmenu_sgs, 1);
33 
34 
35 % --- Outputs from this function are returned to the command line.
36 function varargout = uip_reptt_blockcube_OutputFcn(hObject, eventdata, handles)
37 try
38  uiwait(handles.figure1);
39  handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
40  varargout{1} = handles.output;
41  delete(gcf);
42 catch %#ok<*CTCH>
43  output.flag_ok = 0;
44  output.params = {};
45  varargout{1} = output;
46 end;
47 
48 
49 
50 % --- Executes on button press in pushbuttonOk.
51 function pushbuttonOk_Callback(hObject, eventdata, handles)
52 try
53  ssgs = listbox_get_selected_1stname(handles.popupmenu_sgs);
54  if isempty(ssgs)
55  ssgs = '[]'; %error('SGS not specified!');
56  end;
57 
58  other = uip_reptt();
59  if other.flag_ok
60  handles.output.params = [other.params, {...
61  'sgs', ssgs, ...
62  'flag_parallel', int2str(get(handles.checkbox_flag_parallel, 'value')), ...
63  }];
64  handles.output.flag_ok = 1;
65  guidata(hObject, handles);
66  uiresume();
67  end;
68 catch ME
69  irerrordlg(ME.message, 'Cannot continue');
70 end;
71 
72 function popupmenu_sgs_Callback(hObject, eventdata, handles) %#ok<*INUSL,*DEFNU>
73 
74 function popupmenu_sgs_CreateFcn(hObject, eventdata, handles) %#ok<*INUSD>
75 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
76  set(hObject,'BackgroundColor','white');
77 end
78 function checkbox_flag_parallel_Callback(hObject, eventdata, handles)
79 %> @endcond
Base Sub-dataset Generation Specification (SGS) class.
Definition: sgs.m:6
function listbox_get_selected_1stname(in h_listbox)
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)
REpeated Train-Test - Block Cube.