Skip to content
Snippets Groups Projects
Commit 8c8ebfc9 authored by leprob001's avatar leprob001
Browse files

Added shortcuts for opening other windows from the main window.

parent 228b4761
No related branches found
No related tags found
No related merge requests found
function [] = shortcuts(~, pEvent)
%SHORTCUTS Summary of this function goes here
% Detailed explanation goes here
global artoaWorkspace;
if (~isfield(artoaWorkspace, 'float'))
return;
end
switch pEvent.Key
case 'e'
artoa.controller.edit.timeOfArrival.open();
case 'p'
artoa.controller.edit.pressure.open();
case 't'
artoa.controller.edit.temperature.open();
case 'o'
artoa.controller.track.trajectoryOutput.open();
case 'i'
artoa.controller.track.parameter.open();
end
end
...@@ -9,7 +9,8 @@ artoaGui.figures.main = figure( ... ...@@ -9,7 +9,8 @@ artoaGui.figures.main = figure( ...
'Name', 'ARTOA 4', ... 'Name', 'ARTOA 4', ...
'NumberTitle', 'off', ... 'NumberTitle', 'off', ...
'Color', 'white', ... 'Color', 'white', ...
'MenuBar', 'none' ... 'MenuBar', 'none', ...
'WindowKeyPressFcn', @artoa.controller.main.shortcuts ...
); );
set(artoaGui.figures.main, 'CloseRequestFcn', 'artoa.controller.quit();'); set(artoaGui.figures.main, 'CloseRequestFcn', 'artoa.controller.quit();');
...@@ -143,6 +144,25 @@ artoaGui.main.menus.viewHideDeletedDataPoints = uimenu( ... ...@@ -143,6 +144,25 @@ artoaGui.main.menus.viewHideDeletedDataPoints = uimenu( ...
'Callback', 'artoa.controller.switchHideDeletedPoints();' ... 'Callback', 'artoa.controller.switchHideDeletedPoints();' ...
); );
%% Initialize shortcut hints
shortcutHints = { ...
't', 'Open Edit temperature window';
'p', 'Open Edit pressure window';
'e', 'Open Edit time of arrival window';
'i', 'Open track parameter window';
'o', 'Open trajectory output window';
};
artoaGui.main.shortcutHints = uitable();
artoaGui.main.shortcutHints.Data = shortcutHints;
artoaGui.main.shortcutHints.Enable = 'off';
artoaGui.main.shortcutHints.ColumnName = {'Key', 'Action'};
artoaGui.main.shortcutHints.ColumnWidth = {50, 400};
artoaGui.main.shortcutHints.RowName = '';
artoaGui.main.shortcutHints.Units = 'normalized';
artoaGui.main.shortcutHints.Position = [.1 .5 .8 .3];
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment