project chooser: close window
Christoph Budziszewski

Christoph Budziszewski commited on 2009-01-12 15:15:39
Zeige 1 geänderte Dateien mit 44 Einfügungen und 1 Löschungen.


git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@106 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... ...
@@ -1,4 +1,47 @@
1
-function spm_SVMCrossVal
1
+function spm_SVMCrossVal(varargin)
2
+
3
+switch nargin
4
+case 0
5
+	project_UI();
6
+case 1
7
+	main_UI(varargin);
8
+otherwise
9
+error('spm_SVMCrossVal:main','wrong nargin');
10
+
11
+end
12
+end
13
+
14
+function project_UI(args)
15
+    frameWidth=450;
16
+    frameHeight=200;
17
+    model.frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]);
18
+    movegui(model.frame,'west'); % get this thing visible on smaller displays.
19
+
20
+    set(model.frame,'Name','SVM CrossVal Decode Performance 4 SPM, Projectchooser');
21
+    set(model.frame,'NumberTitle','off');
22
+    set(model.frame,'MenuBar','none');
23
+    set(model.frame,'Color',get(0,'defaultUicontrolBackgroundColor'));
24
+    set(model.frame,'Resize','off');
25
+    set(model.frame,'Units','normalize');
26
+
27
+    btnSelectButton = uicontrol(model.frame,'Tag','select','String','continue','Position',[2 0  frameWidth 40]);
28
+    
29
+%    model.projectSelector = 
30
+
31
+	model.val = 1;
32
+
33
+    set(btnSelectButton,'Callback',{@cbChooseProject,model}); % set here, because of model.    
34
+    set(model.frame,'Visible','on');
35
+end
36
+
37
+function cbChooseProject(src,evnts,args)
38
+
39
+	spm_SVMCrossVal(args);
40
+	display(args);
41
+	close(args.frame)
42
+end
43
+
44
+function main_UI(args)
2 45
 
3 46
 
4 47
 %  Initialize and hide the GUI as it is being constructed.
5 48