mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 22:45:23 +00:00
Refactoring: splitting mode logic into different classes
This commit is contained in:
parent
e266d37b96
commit
b7033a029e
32 changed files with 1200 additions and 1563 deletions
25
Software/PC_Application/Generator/generator.cpp
Normal file
25
Software/PC_Application/Generator/generator.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "generator.h"
|
||||
|
||||
Generator::Generator(AppWindow *window)
|
||||
: Mode(window, "Signal Generator")
|
||||
{
|
||||
central = new SignalgeneratorWidget();
|
||||
finalize(central);
|
||||
connect(central, &SignalgeneratorWidget::SettingsChanged, this, &Generator::updateDevice);
|
||||
}
|
||||
|
||||
void Generator::initializeDevice()
|
||||
{
|
||||
updateDevice();
|
||||
}
|
||||
|
||||
void Generator::updateDevice()
|
||||
{
|
||||
if(!window->getDevice()) {
|
||||
// can't updat if not connected
|
||||
return;
|
||||
}
|
||||
auto status = central->getDeviceStatus();
|
||||
// TODO comment in once status is filled with valid values
|
||||
// window->getDevice()->SetManual(status);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue