-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(UI): detailLevel and aliases for instruments
These changes permit the user to set the level of detail shown on all UI elements related to instrument metadata description. Two new options are provided in the toolboxProperties, `instrumentAliases` and `detailLevel`. instrumentAliases modify the display name of instruments in the UI to the entries presented within the GUI/instrumentAliases.txt file. detailLevel modify the data description in all UI elements to match several named options. See the updated toolboxProperties.txt file for details.
- Loading branch information
Showing
5 changed files
with
163 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% | ||
% Aliases for instrument names | ||
% | ||
% Instrument Exact Name, Alias/Abbreviation | ||
Seabird SBE19plus, SBE19+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
function [mappings] = readMappings(file, delimiter) | ||
% function [mappings] = readMappings(file, delimiter) | ||
% | ||
% This read a mapping file, with a predefined delimiter (','). | ||
% | ||
% Inputs: | ||
% | ||
% file - a file location string | ||
% delimiter - a field delimiter | ||
% default: ',' | ||
% | ||
% Outputs: | ||
% | ||
% mappings - a containers.Map mapping | ||
% | ||
% Example: | ||
% | ||
% file = | ||
% [mappings] = readMappings(file) | ||
% assert() | ||
% | ||
% author: hugo.oliveira@utas.edu.au | ||
% | ||
|
||
% Copyright (C) 2020, Australian Ocean Data Network (AODN) and Integrated | ||
% Marine Observing System (IMOS). | ||
% | ||
% 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 version 3 of the License. | ||
% | ||
% 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/gpl-3.0.en.html>. | ||
% | ||
if nargin < 2 | ||
delimiter = ','; | ||
end | ||
|
||
nf = fopen(file, 'r'); | ||
raw_read = textscan(nf, '%s', 'Delimiter', delimiter); | ||
raw_read = raw_read{1}; | ||
mappings = containers.Map(raw_read(1:2:end), raw_read(2:2:end)); | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters