diff --git a/companion/src/shared/CMakeLists.txt b/companion/src/shared/CMakeLists.txt index 06b6f170bce..6498515b761 100644 --- a/companion/src/shared/CMakeLists.txt +++ b/companion/src/shared/CMakeLists.txt @@ -22,7 +22,6 @@ set(${PROJECT_NAME}_NAMES scrollarea textvalidator exclusivecombogroup - widgetbindings ) AddHeadersSources() @@ -48,6 +47,8 @@ set(${PROJECT_NAME}_SRCS curveimage.cpp semanticversion.h semanticversion.cpp + widgetbindings.h + widgetbindings.cpp ) add_library(${PROJECT_NAME} diff --git a/companion/src/storage/CMakeLists.txt b/companion/src/storage/CMakeLists.txt index b72e7e5e380..22ae20fc574 100644 --- a/companion/src/storage/CMakeLists.txt +++ b/companion/src/storage/CMakeLists.txt @@ -6,7 +6,7 @@ set(${PROJECT_NAME}_NAMES appdata firmwareinterface storage - labeled + tree sdcard etx yaml diff --git a/companion/src/storage/etx.cpp b/companion/src/storage/etx.cpp index 55904b1e873..a524323a8a0 100644 --- a/companion/src/storage/etx.cpp +++ b/companion/src/storage/etx.cpp @@ -45,7 +45,7 @@ bool EtxFormat::load(RadioData & radioData) return false; } - bool result = LabelsStorageFormat::load(radioData); + bool result = TreeStorageFormat::load(radioData); mz_zip_reader_end(&zip_archive); return result; } @@ -60,7 +60,7 @@ bool EtxFormat::write(RadioData & radioData) return false; } - bool result = LabelsStorageFormat::write(radioData); + bool result = TreeStorageFormat::write(radioData); if (result) { // finalize archive and get contents diff --git a/companion/src/storage/etx.h b/companion/src/storage/etx.h index c071b1af694..4bf2ca83db3 100644 --- a/companion/src/storage/etx.h +++ b/companion/src/storage/etx.h @@ -21,17 +21,17 @@ #pragma once -#include "labeled.h" +#include "tree.h" #include -class EtxFormat : public LabelsStorageFormat +class EtxFormat : public TreeStorageFormat { Q_DECLARE_TR_FUNCTIONS(EtxFormat) public: EtxFormat(const QString & filename): - LabelsStorageFormat(filename) + TreeStorageFormat(filename) { } diff --git a/companion/src/storage/sdcard.cpp b/companion/src/storage/sdcard.cpp index ac320937688..1dade6d0d5e 100644 --- a/companion/src/storage/sdcard.cpp +++ b/companion/src/storage/sdcard.cpp @@ -31,7 +31,7 @@ bool SdcardFormat::write(RadioData & radioData) dir.mkdir("RADIO"); dir.mkdir("MODELS"); dir.mkdir("IMAGES"); - return LabelsStorageFormat::write(radioData); + return TreeStorageFormat::write(radioData); } bool SdcardFormat::loadFile(QByteArray & filedata, const QString & filename, bool optional) diff --git a/companion/src/storage/sdcard.h b/companion/src/storage/sdcard.h index 26bb9f81225..d3388308604 100644 --- a/companion/src/storage/sdcard.h +++ b/companion/src/storage/sdcard.h @@ -21,17 +21,17 @@ #pragma once -#include "labeled.h" +#include "tree.h" #include -class SdcardFormat : public LabelsStorageFormat +class SdcardFormat : public TreeStorageFormat { Q_DECLARE_TR_FUNCTIONS(SdcardFormat) public: SdcardFormat(const QString & filename): - LabelsStorageFormat(filename) + TreeStorageFormat(filename) { } diff --git a/companion/src/storage/labeled.cpp b/companion/src/storage/tree.cpp similarity index 96% rename from companion/src/storage/labeled.cpp rename to companion/src/storage/tree.cpp index 7b792c7220b..bc7c8f351d9 100644 --- a/companion/src/storage/labeled.cpp +++ b/companion/src/storage/tree.cpp @@ -19,14 +19,14 @@ * GNU General Public License for more details. */ -#include "labeled.h" +#include "tree.h" #include "firmwares/opentx/opentxinterface.h" #include "firmwares/edgetx/edgetxinterface.h" #include "progressdialog.h" #include -StorageType LabelsStorageFormat::probeFormat() +StorageType TreeStorageFormat::probeFormat() { if (QFile(filename + "/RADIO/radio.yml").exists()) // converted return getStorageType("radio.yml"); @@ -34,7 +34,7 @@ StorageType LabelsStorageFormat::probeFormat() return getStorageType(filename); } -bool LabelsStorageFormat::load(RadioData & radioData) +bool TreeStorageFormat::load(RadioData & radioData) { int steps = 2; // initialisation and load radio.yml bool hasLabels = getCurrentFirmware()->getCapability(HasModelLabels); @@ -211,7 +211,7 @@ bool LabelsStorageFormat::load(RadioData & radioData) return true; } -bool LabelsStorageFormat::write(RadioData & radioData) +bool TreeStorageFormat::write(RadioData & radioData) { // TODO // move all unique radio settings to a separate file eg RADIO/hardware.yml. @@ -377,7 +377,7 @@ bool LabelsStorageFormat::write(RadioData & radioData) return true; } -bool LabelsStorageFormat::loadChecklist(ModelData & model) +bool TreeStorageFormat::loadChecklist(ModelData & model) { const QString fname("MODELS/" + model.getChecklistFilename()); //qDebug() << "Searching for checklist file:" << fname; @@ -388,7 +388,7 @@ bool LabelsStorageFormat::loadChecklist(ModelData & model) return true; } -bool LabelsStorageFormat::writeChecklist(const ModelData & model) +bool TreeStorageFormat::writeChecklist(const ModelData & model) { if (!model.checklistData.isEmpty()) { const QString fname("MODELS/" + model.getChecklistFilename()); @@ -401,7 +401,7 @@ bool LabelsStorageFormat::writeChecklist(const ModelData & model) return true; } -bool LabelsStorageFormat::loadRadioSettings(GeneralSettings & generalSettings) +bool TreeStorageFormat::loadRadioSettings(GeneralSettings & generalSettings) { QByteArray radioSettingsBuffer; diff --git a/companion/src/storage/labeled.h b/companion/src/storage/tree.h similarity index 92% rename from companion/src/storage/labeled.h rename to companion/src/storage/tree.h index 8432993aa85..1bbe6e744a1 100644 --- a/companion/src/storage/labeled.h +++ b/companion/src/storage/tree.h @@ -31,12 +31,12 @@ #include #include -class LabelsStorageFormat : public StorageFormat +class TreeStorageFormat : public StorageFormat { - Q_DECLARE_TR_FUNCTIONS(LabelsStorageFormat) + Q_DECLARE_TR_FUNCTIONS(TreeStorageFormat) public: - LabelsStorageFormat(const QString & filename): + TreeStorageFormat(const QString & filename): StorageFormat(filename) { }