Newer
Older
function aboutDialog(hTsgGUI, DEFAULT_PATH_FILE)
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
%
% Input
% -----
% hTsgGUI ............ Handel to the main user interface
%
% Output
% ------
% none
% $Id$
% Get the data from the application GUI
% -------------------------------------
tsg = getappdata(hTsgGUI, 'tsg_data');
% preferences Uicontrols in a new figure
% ---------------------------------
hAboutDialogFig = figure(...
'Name', 'About TSGQC', ...
'NumberTitle', 'off', ...
'Resize', 'off', ...
'Menubar','none', ...
'Toolbar', 'none', ...
'Tag', 'TSG_ABOUT', ...
'Visible','on',...
'WindowStyle', 'modal', ...
'Units', 'normalized',...
'ButtonDownFcn', @quitAboutCallback);
% Create center uipanel
% -----------------
hCenterPanel = uipanel( ...
'Parent', hAboutDialogFig, ...
'Units', 'normalized', ...
'BorderType', 'line',...
'Position',[.0, .15, .85, .85],...
'ButtonDownFcn', @quitAboutCallback);
% properties, to review
% ---------------------
axes('parent',hCenterPanel,'DataAspectRatioMode','manual');
img = image(imread(strcat(DEFAULT_PATH_FILE, 'tsg_icon', filesep, 'Thermo.jpg')));
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
set(img, 'clipping', 'off','ButtonDownFcn', @quitAboutCallback);
axis off; axis fill;
axis image;
% Create bottom uipanel
% -----------------
hBottomPanel = uipanel( ...
'Parent', hAboutDialogFig, ...
'Units', 'normalized', ...
'BorderType', 'none',...
'Position',[.0, .0, 1, .15],...
'ButtonDownFcn', @quitAboutCallback);
% Create right uipanel
% --------------------
hRightPanel = uipanel( ...
'Parent', hAboutDialogFig, ...
'Units', 'normalized', ...
'BorderType', 'none',...
'Position',[.85, .15, .15, .85],...
'ButtonDownFcn', @quitAboutCallback);
% display info in botom panel
uicontrol('Parent', hBottomPanel, ...
'Style','text',...
'FontSize', 14, ...
'Units','normalized',...
'Position',[.1 .1 .9 .5],...
'FontWeight','bold',...
'String',strcat('TSGQC Version : ', ' ', tsg.preference.char_version),...
'HorizontalAlignment','center');
% display info in right panel
uicontrol('Parent', hRightPanel, ...
'Style','text',...
'FontSize', 9, ...
'Units','normalized',...
'Position',[.05 .8 .9 .1],...
'String',sprintf('Clim: %s', tsg.levitus.version),...
'HorizontalAlignment','left');
% display info in right panel
uicontrol('Parent', hRightPanel, ...
'Style','text',...
'FontSize', 9, ...
'Units','normalized',...
'Position',[.05 .73 .9 .1],...
'String',sprintf('Type: %s', tsg.levitus.type),...
'HorizontalAlignment','left');
depth = ...
tsg.preference.levitus_depth_string{tsg.preference.levitus_depth_value};
% display info in right panel
uicontrol('Parent', hRightPanel, ...
'Style','text',...
'FontSize', 9, ...
'Units','normalized',...
'Position',[.05 .66 .9 .1],...
'String',sprintf('Depth: %s m', depth),...
'HorizontalAlignment','left');
% -------------------------------------------------------------
% nested function on mouse clic when QC toggle tool is selected
% -------------------------------------------------------------
function quitAboutCallback(gcbo, eventdata)
close(hAboutDialogFig);
end
end