attempt to fix --no-gui option for windows
This commit is contained in:
parent
6e07be0af5
commit
c9ffdcd52b
@ -341,7 +341,9 @@ void AmplitudeCalDialog::AddPointDialog()
|
||||
|
||||
dev->SendCommandWithoutPayload(requestCommand());
|
||||
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
void AmplitudeCalDialog::AutomaticMeasurementDialog()
|
||||
@ -415,7 +417,9 @@ void AmplitudeCalDialog::AutomaticMeasurementDialog()
|
||||
SetupNextAutomaticPoint(automatic.isSourceCal);
|
||||
});
|
||||
|
||||
automatic.dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
automatic.dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
void AmplitudeCalDialog::ReceivedMeasurement(Protocol::SpectrumAnalyzerResult res)
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "calkitdialog.h"
|
||||
#include "json.hpp"
|
||||
#include "CustomWidgets/informationbox.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
@ -171,7 +172,9 @@ void Calkit::edit(std::function<void (void)> updateCal)
|
||||
updateCal();
|
||||
});
|
||||
}
|
||||
dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
bool Calkit::hasSeparateMaleFemaleStandards()
|
||||
|
@ -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;
|
||||
|
@ -53,7 +53,6 @@ private:
|
||||
|
||||
private slots:
|
||||
void NewDatapoint(Protocol::SpectrumAnalyzerResult d);
|
||||
void StartImpedanceMatching();
|
||||
// Sweep control
|
||||
void SetStartFreq(double freq);
|
||||
void SetStopFreq(double freq);
|
||||
|
@ -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()+"\"");
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "unit.h"
|
||||
#include "ui_dftdialog.h"
|
||||
#include "ui_dftexplanationwidget.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -86,7 +87,9 @@ void Math::DFT::edit()
|
||||
});
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, d, &QDialog::accept);
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *Math::DFT::createExplanationWidget()
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "ui_expressiondialog.h"
|
||||
#include "Traces/trace.h"
|
||||
#include "ui_expressionexplanationwidget.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDebug>
|
||||
@ -52,7 +53,9 @@ void Math::Expression::edit()
|
||||
default: break;
|
||||
}
|
||||
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *Math::Expression::createExplanationWidget()
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "ui_medianfilterdialog.h"
|
||||
#include "ui_medianexplanationwidget.h"
|
||||
#include "CustomWidgets/informationbox.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
using namespace Math;
|
||||
using namespace std;
|
||||
@ -47,7 +48,9 @@ void MedianFilter::edit()
|
||||
connect(ui->sortingMethod, qOverload<int>(&QComboBox::currentIndexChanged), [=](int index) {
|
||||
order = (Order) index;
|
||||
});
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *MedianFilter::createExplanationWidget()
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "ui_tdrdialog.h"
|
||||
#include "ui_tdrexplanationwidget.h"
|
||||
#include "Util/util.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
@ -127,7 +128,9 @@ void TDR::edit()
|
||||
});
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, d, &QDialog::accept);
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *TDR::createExplanationWidget()
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "Traces/fftcomplex.h"
|
||||
#include "Util/util.h"
|
||||
#include "unit.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
@ -108,7 +109,9 @@ void Math::TimeGate::edit()
|
||||
|
||||
updateFilter();
|
||||
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *Math::TimeGate::createExplanationWidget()
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "ui_traceeditdialog.h"
|
||||
#include "ui_newtracemathdialog.h"
|
||||
#include "Math/tdr.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QColorDialog>
|
||||
#include <QFileDialog>
|
||||
@ -222,7 +223,9 @@ TraceEditDialog::TraceEditDialog(Trace &t, QWidget *parent) :
|
||||
ui->list->setCurrentRow(0);
|
||||
ui->stack->setCurrentIndex(0);
|
||||
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
});
|
||||
connect(ui->bDelete, &QPushButton::clicked, [=](){
|
||||
model->deleteRow(ui->view->currentIndex().row());
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "unit.h"
|
||||
#include "QFileDialog"
|
||||
#include "Util/util.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <array>
|
||||
@ -165,7 +166,9 @@ void TraceSmithChart::axisSetupDialog()
|
||||
});
|
||||
|
||||
updatePersistentEditors();
|
||||
dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
QPoint TraceSmithChart::dataToPixel(std::complex<double> d)
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "trace.h"
|
||||
#include "unit.h"
|
||||
#include "Util/util.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QFileDialog>
|
||||
@ -113,7 +114,9 @@ void TraceWidget::on_edit_clicked()
|
||||
{
|
||||
if(ui->view->currentIndex().isValid()) {
|
||||
auto edit = new TraceEditDialog(*model.trace(ui->view->currentIndex().row()));
|
||||
edit->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
edit->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +124,9 @@ void TraceWidget::on_view_doubleClicked(const QModelIndex &index)
|
||||
{
|
||||
if(index.column() == TraceModel::ColIndexName) {
|
||||
auto edit = new TraceEditDialog(*model.trace(index.row()));
|
||||
edit->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
edit->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "Util/util.h"
|
||||
#include "unit.h"
|
||||
#include "preferences.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <cmath>
|
||||
@ -215,7 +216,9 @@ bool TraceXYPlot::isTDRtype(TraceXYPlot::YAxisType type)
|
||||
void TraceXYPlot::axisSetupDialog()
|
||||
{
|
||||
auto setup = new XYplotAxisDialog(this);
|
||||
setup->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
setup->show();
|
||||
}
|
||||
}
|
||||
|
||||
bool TraceXYPlot::configureForTrace(Trace *t)
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "deembeddingdialog.h"
|
||||
#include "ui_measurementdialog.h"
|
||||
#include "Traces/sparamtraceselector.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -11,7 +12,9 @@ using namespace std;
|
||||
void Deembedding::configure()
|
||||
{
|
||||
auto d = new DeembeddingDialog(this);
|
||||
d->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->show();
|
||||
}
|
||||
}
|
||||
|
||||
void Deembedding::measurementCompleted()
|
||||
@ -104,7 +107,9 @@ void Deembedding::startMeasurementDialog(bool S11, bool S12, bool S21, bool S22)
|
||||
measurementCompleted();
|
||||
});
|
||||
|
||||
measurementDialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
measurementDialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
Deembedding::Deembedding(TraceModel &tm)
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "ui_matchingnetworkdialog.h"
|
||||
#include "unit.h"
|
||||
#include "CustomWidgets/informationbox.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QHBoxLayout>
|
||||
@ -126,7 +127,9 @@ void MatchingNetwork::edit()
|
||||
|
||||
layout->addStretch(1);
|
||||
|
||||
dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
if(addNetwork) {
|
||||
ui->bAddNetwork->setChecked(true);
|
||||
} else {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "ui_portextensioneditdialog.h"
|
||||
#include "Util/util.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <cmath>
|
||||
@ -202,7 +203,9 @@ void PortExtension::edit()
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
|
||||
connect(ui->buttonBox, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
|
||||
dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
void PortExtension::measurementCompleted(std::vector<Protocol::Datapoint> m)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "ui_twothrudialog.h"
|
||||
#include "Traces/fftcomplex.h"
|
||||
#include "unit.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -172,7 +173,9 @@ void TwoThru::edit()
|
||||
|
||||
updateGUI();
|
||||
|
||||
dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
nlohmann::json TwoThru::toJSON()
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "ui_tracewidget.h"
|
||||
#include "ui_s2pImportOptions.h"
|
||||
#include "CustomWidgets/informationbox.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QMenu>
|
||||
@ -35,12 +36,16 @@ TraceWidgetVNA::TraceWidgetVNA(TraceModel &model, Calibration &cal, Deembedding
|
||||
}
|
||||
e->setTrace(i%2, i/2, traces[i]);
|
||||
}
|
||||
e->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
e->show();
|
||||
}
|
||||
});
|
||||
|
||||
connect(exportCSV, &QAction::triggered, [&]() {
|
||||
auto e = new TraceCSVExport(model);
|
||||
e->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
e->show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -70,7 +75,9 @@ void TraceWidgetVNA::importDialog()
|
||||
prefix.truncate(prefix.indexOf('.'));
|
||||
prefix.append("_");
|
||||
auto i = new TraceImportDialog(model, traces, prefix);
|
||||
i->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
i->show();
|
||||
}
|
||||
if(filename.endsWith(".s2p")) {
|
||||
// potential candidate to process via calibration/de-embedding
|
||||
connect(i, &TraceImportDialog::importFinsished, [=](const std::vector<Trace*> &traces) {
|
||||
@ -96,7 +103,9 @@ void TraceWidgetVNA::importDialog()
|
||||
connect(ui->deembed, &QCheckBox::toggled, [&](bool checked) {
|
||||
applyDeembed = checked;
|
||||
});
|
||||
dialog->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->exec();
|
||||
}
|
||||
if(applyCal) {
|
||||
cal.correctTraces(*traces[0], *traces[1], *traces[2], *traces[3]);
|
||||
}
|
||||
|
@ -151,13 +151,17 @@ VNA::VNA(AppWindow *window)
|
||||
calImportTerms->setEnabled(false);
|
||||
connect(calImportTerms, &QAction::triggered, [=](){
|
||||
auto import = new TraceImportDialog(traceModel, cal.getErrorTermTraces());
|
||||
import->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
import->show();
|
||||
}
|
||||
});
|
||||
auto calImportMeas = calMenu->addAction("Import measurements as traces");
|
||||
calImportMeas->setEnabled(false);
|
||||
connect(calImportMeas, &QAction::triggered, [=](){
|
||||
auto import = new TraceImportDialog(traceModel, cal.getMeasurementTraces());
|
||||
import->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
import->show();
|
||||
}
|
||||
});
|
||||
|
||||
calMenu->addSeparator();
|
||||
@ -165,7 +169,9 @@ VNA::VNA(AppWindow *window)
|
||||
calApplyToTraces->setEnabled(false);
|
||||
connect(calApplyToTraces, &QAction::triggered, [=]() {
|
||||
auto manualCalibration = new ManualCalibrationDialog(traceModel, &cal);
|
||||
manualCalibration->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
manualCalibration->show();
|
||||
}
|
||||
});
|
||||
|
||||
// portExtension.setCalkit(&cal.getCalibrationKit());
|
||||
@ -186,7 +192,9 @@ VNA::VNA(AppWindow *window)
|
||||
manualDeembed->setEnabled(false);
|
||||
connect(manualDeembed, &QAction::triggered, [=]() {
|
||||
auto manualDeembedding = new ManualDeembeddingDialog(traceModel, &deembedding);
|
||||
manualDeembedding->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
manualDeembedding->show();
|
||||
}
|
||||
});
|
||||
|
||||
connect(&deembedding, &Deembedding::optionAdded, [=](){
|
||||
@ -893,7 +901,9 @@ void VNA::SettingsChanged(std::function<void (Device::TransmissionResult)> cb)
|
||||
void VNA::StartImpedanceMatching()
|
||||
{
|
||||
auto dialog = new ImpedanceMatchDialog(*markerModel);
|
||||
dialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1477,7 +1487,9 @@ void VNA::StartCalibrationDialog(Calibration::Type type)
|
||||
DisableCalibration(true);
|
||||
InformationBox::ShowMessageBlocking("Calibration disabled", "The currently active calibration is no longer supported by the available measurements and was disabled.");
|
||||
});
|
||||
traceDialog->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
traceDialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
void VNA::UpdateCalWidget()
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "Util/app_common.h"
|
||||
#include "ui_aboutdialog.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
About About::instance;
|
||||
|
||||
@ -30,5 +31,7 @@ AboutDialog::~AboutDialog()
|
||||
void About::about()
|
||||
{
|
||||
auto dialog = new AboutDialog();
|
||||
dialog->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ static const QString APP_VERSION = QString::number(FW_MAJOR) + "." +
|
||||
QString::number(FW_PATCH);
|
||||
static const QString APP_GIT_HASH = QString(GITHASH);
|
||||
|
||||
static bool noGUIset = false;
|
||||
|
||||
AppWindow::AppWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, deviceActionGroup(new QActionGroup(this))
|
||||
@ -247,6 +249,7 @@ AppWindow::AppWindow(QWidget *parent)
|
||||
// at least one device available
|
||||
ConnectToDevice();
|
||||
}
|
||||
|
||||
if(parser.isSet("setup")) {
|
||||
LoadSetup(parser.value("setup"));
|
||||
}
|
||||
@ -259,6 +262,7 @@ AppWindow::AppWindow(QWidget *parent)
|
||||
show();
|
||||
} else {
|
||||
InformationBox::setGUI(false);
|
||||
noGUIset = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -842,7 +846,9 @@ void AppWindow::StartManualControl()
|
||||
Mode::getActiveMode()->initializeDevice();
|
||||
}
|
||||
});
|
||||
manual->show();
|
||||
if(AppWindow::showGUI()) {
|
||||
manual->show();
|
||||
}
|
||||
}
|
||||
|
||||
void AppWindow::UpdateReference()
|
||||
@ -895,7 +901,9 @@ void AppWindow::StartFirmwareUpdateDialog()
|
||||
auto fw_update = new FirmwareUpdateDialog(device);
|
||||
connect(fw_update, &FirmwareUpdateDialog::DeviceRebooting, this, &AppWindow::DisconnectDevice);
|
||||
connect(fw_update, &FirmwareUpdateDialog::DeviceRebooted, this, &AppWindow::ConnectToDevice);
|
||||
fw_update->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
fw_update->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -918,19 +926,25 @@ void AppWindow::DeviceInfoUpdated()
|
||||
void AppWindow::SourceCalibrationDialog()
|
||||
{
|
||||
auto d = new SourceCalDialog(device);
|
||||
d->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->exec();
|
||||
}
|
||||
}
|
||||
|
||||
void AppWindow::ReceiverCalibrationDialog()
|
||||
{
|
||||
auto d = new ReceiverCalDialog(device);
|
||||
d->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->exec();
|
||||
}
|
||||
}
|
||||
|
||||
void AppWindow::FrequencyCalibrationDialog()
|
||||
{
|
||||
auto d = new FrequencyCalDialog(device);
|
||||
d->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
d->exec();
|
||||
}
|
||||
}
|
||||
|
||||
void AppWindow::SaveSetup(QString filename)
|
||||
@ -1035,6 +1049,11 @@ const QString& AppWindow::getAppGitHash() const
|
||||
return appGitHash;
|
||||
}
|
||||
|
||||
bool AppWindow::showGUI()
|
||||
{
|
||||
return !noGUIset;
|
||||
}
|
||||
|
||||
void AppWindow::SetupStatusBar()
|
||||
{
|
||||
ui->statusbar->addWidget(&lConnectionStatus);
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
const QString& getAppVersion() const;
|
||||
const QString& getAppGitHash() const;
|
||||
|
||||
static bool showGUI();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
private slots:
|
||||
|
@ -18,20 +18,7 @@ void sig_handler(int s) {
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
// Hack: set platform to offscreen if no-gui option specified, this prevents any dialogs from showing up
|
||||
char *argv_ext[argc+2];
|
||||
for(int i=0;i<argc;i++) {
|
||||
argv_ext[i] = argv[i];
|
||||
}
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (!qstrcmp(argv[i], "--no-gui")) {
|
||||
argv_ext[argc] = const_cast<char*>("-platform");
|
||||
argv_ext[argc+1] = const_cast<char*>("offscreen");
|
||||
argc+=2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
app = new QApplication(argc, argv_ext);
|
||||
app = new QApplication(argc, argv);
|
||||
QCoreApplication::setOrganizationName("LibreVNA");
|
||||
QCoreApplication::setApplicationName("LibreVNA-GUI");
|
||||
window = new AppWindow;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "ui_preferencesdialog.h"
|
||||
#include "CustomWidgets/informationbox.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QPushButton>
|
||||
@ -343,7 +344,9 @@ void Preferences::store()
|
||||
void Preferences::edit()
|
||||
{
|
||||
auto dialog = new PreferencesDialog(this);
|
||||
dialog->exec();
|
||||
if(AppWindow::showGUI()) {
|
||||
dialog->exec();
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::setDefault()
|
||||
|
Loading…
Reference in New Issue
Block a user