classdef gui_Rakes_Kopfauswahl < matlab.apps.AppBase
properties (Access = public)
UIFigure matlab.ui.Figure
KompelierenLamp matlab.ui.control.Lamp
KompelierenLampLabel matlab.ui.control.Label
AuswertungLamp matlab.ui.control.Lamp
AuswertungLampLabel matlab.ui.control.Label
Tabelle matlab.ui.control.Table
AuswertenButton matlab.ui.control.Button
KopfauswahlLabel matlab.ui.control.Label
end
methods (Access = private)
getws;
function startupFcn(app)
app.KopfauswahlLabel.FontSize = 18;
app.KopfauswahlLabel.FontWeight = 'bold';
numHeads = ws.mw.numHead;
numHeads = strsplit(numHeads, ';');
numHeads = strtrim(numHeads);
numHeads = numHeads(~cellfun('isempty', numHeads));
numRows = numel(numHeads)
data = cell(numRows, 2);
for i = 1:numRows
data{i, 1} = sprintf('Kopf %d', i);
data{i, 2} = '3 Lochsonde';
end
auswerteverfahren = {'3 Lochsonde', '4 Lochsonde', '5 Lochsonde', '9 Lochsonde', 'Temperatur Sonde', 'Totaldrucksonde', 'Recovery Faktor'};
app.Tabelle.Data = data;
app.Tabelle.ColumnName = {'Kopf', 'Auswerteverfahren'};
app.Tabelle.ColumnEditable = [false, true];
app.Tabelle.ColumnFormat = {'char', auswerteverfahren};
app.AuswertenButton.ButtonPushedFcn = @(~,~) auswertenButtonPushed(app);
end
function auswertenButtonPushed(app)
data = app.Tabelle.Data;
missingAssignments = find(strcmp(data(:, 2), '3 Lochsonde'));
if ~isempty(missingAssignments)
errorMessage = sprintf('Zuordnung fehlt für Kopf %d', missingAssignments(1));
errordlg(errorMessage, 'Fehler', 'modal');
return;
end
for i = 1:size(data, 1)
auswerteverfahren = app.Tabelle.Data{i, 2};
switch auswerteverfahren
case '3 Lochsonde'
fuehreAuswertungDurch
fprintf('Auswertung für Kopf %d: 3 Lochsonde\n', i);
fuehreExportDurch
case '4 Lochsonde'
fuehreAuswertungDurch
fprintf('Auswertung für Kopf %d: 4 Lochsonde\n', i);
fuehreExportDurch
case '5 Lochsonde'
fuehreAuswertungDurch
fprintf('Auswertung für Kopf %d: 5 Lochsonde\n', i);
fuehreExportDurch
case '9 Lochsonde'
fuehreAuswertungDurch
fprintf('Auswertung für Kopf %d: 9 Lochsonde\n', i);
fuehreExportDurch
case 'Temperatur Sonde'
fuehreAuswertungDurch
fprintf('Auswertung für Kopf %d: Temperatur Sonde\n', i);
fuehreExportDurch
case 'Totaldrucksonde'
Totaldruck_Auswertung
fprintf('Auswertung für Kopf %d: Totaldrucksonde\n', i);
Totaldruck_fuehreExportDurch;
case 'Recovery Faktor'
RecoveryFactor_Auswertung
fprintf('Auswertung für Kopf %d: Recovery Faktor\n', i)
RF_fuehreExportdurch;
end
end
end
end
methods (Access = private)
function createComponents(app)
app.UIFigure = uifigure('Visible', 'off');
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = 'MATLAB App';
app.KopfauswahlLabel = uilabel(app.UIFigure);
app.KopfauswahlLabel.FontSize = 20;
app.KopfauswahlLabel.FontWeight = 'bold';
app.KopfauswahlLabel.Position = [256 429 130 24];
app.KopfauswahlLabel.Text = 'Kopfauswahl';
app.AuswertenButton = uibutton(app.UIFigure, 'push');
app.AuswertenButton.Position = [271 70 100 22];
app.AuswertenButton.Text = {'Auswerten'; ''};
app.Tabelle = uitable(app.UIFigure);
app.Tabelle.ColumnName = {'Kopfauswahl'; 'Auswerteverfahren'};
app.Tabelle.RowName = {};
app.Tabelle.Position = [141 125 360 232];
app.AuswertungLampLabel = uilabel(app.UIFigure);
app.AuswertungLampLabel.HorizontalAlignment = 'right';
app.AuswertungLampLabel.Position = [168 380 69 22];
app.AuswertungLampLabel.Text = 'Auswertung';
app.AuswertungLamp = uilamp(app.UIFigure);
app.AuswertungLamp.Position = [252 380 20 20];
app.KompelierenLampLabel = uilabel(app.UIFigure);
app.KompelierenLampLabel.HorizontalAlignment = 'right';
app.KompelierenLampLabel.Position = [370 381 73 22];
app.KompelierenLampLabel.Text = 'Kompelieren';
app.KompelierenLamp = uilamp(app.UIFigure);
app.KompelierenLamp.Position = [458 381 20 20];
app.UIFigure.Visible = 'on';
end
end
methods (Access = public)
function app = gui_Rakes_Kopfauswahl
createComponents(app)
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
function delete(app)
delete(app.UIFigure)
end
end
end