feat(cpn): Add individual model save to yml (#1968)

- add save model(s) to context menu and toolbar
- new storage functions to support single model write
- modified yml storage format write functions
- default save directory is application sd card TEMPLATES
- model name used as default file name
This commit is contained in:
Neil Horne
2022-06-07 20:53:45 +10:00
committed by GitHub
parent e173d5b448
commit 47a90ed38f
6 changed files with 92 additions and 17 deletions
+14
View File
@@ -121,6 +121,20 @@ bool Storage::write(const RadioData & radioData)
return ret;
}
bool Storage::writeModel(const RadioData & radioData, const int modelIndex)
{
bool ret = false;
foreach(StorageFactory * factory, registeredStorageFactories) {
if (factory->probe(filename)) {
StorageFormat * format = factory->instance(filename);
ret = format->writeModel(radioData, modelIndex);
delete format;
break;
}
}
return ret;
}
bool convertEEprom(const QString & sourceEEprom, const QString & destinationEEprom, const QString & firmwareFilename)
{
FirmwareInterface firmware(firmwareFilename);