Companion hardware internal module continued (#1342)

* Add ability to undo hardware internal module change

* Add internal module protocol check on model edit

* Event driven check and update of all models

* Fix model edit dialog searches

* Add OFF to list of internal modules

* Fix internal module protocol list issue #1382
This commit is contained in:
Neil Horne
2022-01-10 11:13:21 +10:00
committed by GitHub
parent b41cb2a75a
commit fcf8fbdfff
13 changed files with 145 additions and 14 deletions
+6 -1
View File
@@ -66,9 +66,12 @@ GeneralEdit::GeneralEdit(QWidget * parent, RadioData & radioData, Firmware * fir
addTab(new GeneralSetupPanel(this, generalSettings, firmware), tr("Setup"));
addTab(new CustomFunctionsPanel(this, nullptr, generalSettings, firmware, editorItemModels), tr("Global Functions"));
addTab(new TrainerPanel(this, generalSettings, firmware, editorItemModels), tr("Trainer"));
addTab(new HardwarePanel(this, generalSettings, firmware, editorItemModels), tr("Hardware"));
auto hwpnl = new HardwarePanel(this, generalSettings, firmware, editorItemModels);
addTab(hwpnl, tr("Hardware"));
addTab(new CalibrationPanel(this, generalSettings, firmware), tr("Calibration"));
connect(hwpnl, &HardwarePanel::internalModuleChanged, this, [&] { intModChanged = true; });
ui->tabWidget->setCurrentIndex( g.generalEditTab() );
}
@@ -81,6 +84,8 @@ GeneralEdit::~GeneralEdit()
void GeneralEdit::closeEvent(QCloseEvent *event)
{
g.generalEditTab(ui->tabWidget->currentIndex());
if (intModChanged)
emit internalModuleChanged(); // for MidiChild to trap
}
void GeneralEdit::addTab(GenericPanel *panel, QString text)