forked from BIVectors/BRAVEHEART
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout_popup.m
More file actions
147 lines (128 loc) · 4.77 KB
/
about_popup.m
File metadata and controls
147 lines (128 loc) · 4.77 KB
1
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
44
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BRAVEHEART - Open source software for electrocardiographic and vectorcardiographic analysis
% about_popup.m -- Generates information about BRAVEHEART license
% Copyright 2016-2025 Hans F. Stabenau and Jonathan W. Waks
%
% Source code/executables: https://github.com/BIVectors/BRAVEHEART
% Contact: braveheart.ecg@gmail.com
%
% BRAVEHEART is free software: you can redistribute it and/or modify it under the terms of the GNU
% General Public License as published by the Free Software Foundation, either version 3 of the License,
% or (at your option) any later version.
%
% BRAVEHEART is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
% without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% See the GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License along with this program.
% If not, see <https://www.gnu.org/licenses/>.
%
% This software is for research purposes only and is not intended to diagnose or treat any disease.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function about_popup()
% Get version
version = AnnoResult().version{1};
% Get screen size and calculate center position
screenSize = get(0, 'ScreenSize'); % [left, bottom, width, height]
figWidth = 500;
figHeight = 600;
% Calculate centered position
figLeft = round((screenSize(3) - figWidth) / 2);
figBottom = round((screenSize(4) - figHeight) / 2);
% Create figure - centered on screen
fig = uifigure('Name', 'About/License', ...
'Position', [figLeft, figBottom, figWidth, figHeight], ...
'WindowStyle', 'modal', 'Resize', 'off');
% % Create figure
% fig = uifigure('Name', 'About/License', 'Position', [700, 500, 500, 600], ...
% 'WindowStyle', 'modal', 'Resize', 'off');
% Create panel
panel = uipanel(fig, 'Position', [10, 10, 480, 600], 'BorderType', 'none');
% Set where anchor text
anchor = 19;
% BRAVE in blue
brave_txt = uilabel(panel, ...
'Position', [anchor, 535, 120, 35], ...
'Text', 'BRAVE', ...
'FontSize', 32, ...
'FontWeight', 'bold', ...
'FontAngle', 'italic', ...
'FontColor', [0.09, 0.078, 0.377], ...
'HorizontalAlignment', 'left', ...
'VerticalAlignment', 'bottom');
% H part - red and large
h_txt = uilabel(panel, ...
'Position', [anchor+112, 535, 40, 35], ...
'Text', 'H', ...
'FontSize', 32, ...
'FontWeight', 'bold', ...
'FontAngle', 'italic', ...
'FontColor', [0.89, 0.016, 0.016], ...
'HorizontalAlignment', 'left', ...
'VerticalAlignment', 'bottom');
% EART part - smaller, manually positioned higher to align baseline
eart_txt = uilabel(panel, ...
'Position', [anchor+134, 531, 80, 30], ...
'Text', 'EART', ...
'FontSize', 24, ...
'FontWeight', 'bold', ...
'FontAngle', 'italic', ...
'FontColor', [0.89, 0.016, 0.016], ...
'HorizontalAlignment', 'left');
% Subtitle
subtitle_txt = uilabel(panel, ...
'Position', [20, 505, 440, 25], ...
'Text', '(Beth Israel Analysis of Vectors of the Heart)', ...
'FontSize', 18, ...
'FontColor', [0, 0, 0], ...
'FontWeight','bold', ...
'HorizontalAlignment', 'left');
% Version
version_txt = uilabel(panel, ...
'Position', [20, 480, 440, 25], ...
'Text', strcat('v',version), ...
'FontSize', 18, ...
'FontWeight','bold', ...
'HorizontalAlignment', 'left');
% Main text content
main_text = {
'Copyright 2016-2025 Hans F. Stabeneau and Jonathan W. Waks'
''
'Software updates available at http://github.com/BIVectors/BRAVEHEART'
''
'This program is free software: you can redistribute it and/or modify'
'it under the terms of the GNU General Public License as published by'
'the Free Software Foundation, either version 3 of the License, or'
'(at your option) any later version.'
''
'This program is distributed in the hope that it will be useful, but'
'WITHOUT ANY WARRANTY; without even the implied warranty of'
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'
'See the GNU General Public License for more details.'
''
'You should have received a copy of the GNU General Public License'
'along with this program. If not, see <https://www.gnu.org/licenses/>'
''
'This software is for research purposes only and is not intended'
'to diagnose or treat any disease.'
};
% Main text line by line
y_pos = 440;
line_height = 20;
for i = 1:length(main_text)
if ~isempty(main_text{i})
uilabel(panel, ...
'Position', [20, y_pos - (i-1)*line_height, 460, 20], ...
'Text', main_text{i}, ...
'FontSize', 14, ...
'HorizontalAlignment', 'left');
end
end
% OK button
ok_btn = uibutton(panel, ...
'Position', [210, 20, 80, 25], ...
'Text', 'OK', ...
'ButtonPushedFcn', @(src, event) close(fig));
% Make the dialog modal and wait for it to close
uiwait(fig);
end