mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 15:33:51 +00:00
use native OS dialogs by default for load/save
This commit is contained in:
parent
fc717a8f88
commit
64a7ddc455
25 changed files with 83 additions and 41 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "ui_xyplotaxisdialog.h"
|
||||
#include "traceaxis.h"
|
||||
#include "preferences.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QStandardItemModel>
|
||||
|
|
@ -239,7 +240,7 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
removeLine(index);
|
||||
});
|
||||
connect(ui->exportLines, &QPushButton::clicked, this, [=](){
|
||||
QString filename = QFileDialog::getSaveFileName(nullptr, "Save limit lines", "", "Limit files (*.limits)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
QString filename = QFileDialog::getSaveFileName(nullptr, "Save limit lines", "", "Limit files (*.limits)", nullptr, Preferences::QFileDialogOptions());
|
||||
if(filename.isEmpty()) {
|
||||
// aborted selection
|
||||
return;
|
||||
|
|
@ -262,7 +263,7 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
|
||||
});
|
||||
connect(ui->importLines, &QPushButton::clicked, [=](){
|
||||
QString filename = QFileDialog::getOpenFileName(nullptr, "Load limit lines", "", "Limit files (*.limits)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
QString filename = QFileDialog::getOpenFileName(nullptr, "Load limit lines", "", "Limit files (*.limits)", nullptr, Preferences::QFileDialogOptions());
|
||||
ifstream file;
|
||||
file.open(filename.toStdString());
|
||||
if(!file.is_open()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue