attempt to fix --no-gui option for windows

This commit is contained in:
Jan Käberich 2022-03-03 12:28:59 +01:00
parent 6e07be0af5
commit c9ffdcd52b
25 changed files with 141 additions and 58 deletions

View file

@ -534,12 +534,6 @@ void SpectrumAnalyzer::SettingsChanged()
emit traceModel.SpanChanged(settings.f_start, settings.f_stop);
}
void SpectrumAnalyzer::StartImpedanceMatching()
{
auto dialog = new ImpedanceMatchDialog(*markerModel);
dialog->show();
}
void SpectrumAnalyzer::SetStartFreq(double freq)
{
settings.f_start = freq;

View file

@ -53,7 +53,6 @@ private:
private slots:
void NewDatapoint(Protocol::SpectrumAnalyzerResult d);
void StartImpedanceMatching();
// Sweep control
void SetStartFreq(double freq);
void SetStopFreq(double freq);

View file

@ -3,6 +3,7 @@
#include "Traces/tracecsvexport.h"
#include "Traces/traceimportdialog.h"
#include "CustomWidgets/informationbox.h"
#include "appwindow.h"
#include <QFileDialog>
@ -15,7 +16,9 @@ TraceWidgetSA::TraceWidgetSA(TraceModel &model, QWidget *parent)
void TraceWidgetSA::exportDialog()
{
auto csv = new TraceCSVExport(model);
csv->show();
if(AppWindow::showGUI()) {
csv->show();
}
}
void TraceWidgetSA::importDialog()
@ -38,7 +41,9 @@ void TraceWidgetSA::importDialog()
prefix.truncate(prefix.indexOf('.'));
prefix.append("_");
auto i = new TraceImportDialog(model, traces, prefix);
i->show();
if(AppWindow::showGUI()) {
i->show();
}
} catch(const std::exception e) {
InformationBox::ShowError("Failed to import file", QString("Attempt to import file ended with error: \"") + e.what()+"\"");
}