mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 14:35:23 +00:00
Customizable graph colors
This commit is contained in:
parent
978ac89aa9
commit
74e068d8d1
22 changed files with 266 additions and 97 deletions
|
|
@ -55,7 +55,7 @@ AppWindow::AppWindow(QWidget *parent)
|
|||
QCoreApplication::setOrganizationName("VNA");
|
||||
QCoreApplication::setApplicationName("Application");
|
||||
|
||||
pref.load();
|
||||
Preferences::getInstance().load();
|
||||
device = nullptr;
|
||||
|
||||
ui->setupUi(this);
|
||||
|
|
@ -108,9 +108,9 @@ AppWindow::AppWindow(QWidget *parent)
|
|||
}
|
||||
});
|
||||
connect(ui->actionPreferences, &QAction::triggered, [=](){
|
||||
qDebug() << pref.Acquisition.alwaysExciteBothPorts;
|
||||
pref.edit();
|
||||
qDebug() << pref.Acquisition.alwaysExciteBothPorts;
|
||||
Preferences::getInstance().edit();
|
||||
// settings might have changed, update necessary stuff
|
||||
TraceBodePlot::updateGraphColors();
|
||||
});
|
||||
|
||||
setWindowTitle("VNA");
|
||||
|
|
@ -131,7 +131,7 @@ AppWindow::AppWindow(QWidget *parent)
|
|||
qRegisterMetaType<Protocol::Datapoint>("Datapoint");
|
||||
|
||||
// List available devices
|
||||
if(UpdateDeviceList() && pref.Startup.ConnectToFirstDevice) {
|
||||
if(UpdateDeviceList() && Preferences::getInstance().Startup.ConnectToFirstDevice) {
|
||||
// at least one device available
|
||||
ConnectToDevice();
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ void AppWindow::closeEvent(QCloseEvent *event)
|
|||
if(Mode::getActiveMode()) {
|
||||
Mode::getActiveMode()->deactivate();
|
||||
}
|
||||
pref.store();
|
||||
Preferences::getInstance().store();
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
|
|
@ -244,11 +244,6 @@ void AppWindow::CreateToolbars()
|
|||
tb_reference->setObjectName("Reference Toolbar");
|
||||
}
|
||||
|
||||
Preferences &AppWindow::getPreferenceRef()
|
||||
{
|
||||
return pref;
|
||||
}
|
||||
|
||||
int AppWindow::UpdateDeviceList()
|
||||
{
|
||||
deviceActionGroup->setExclusive(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue