Make TX volatge for simu more flexible (#7124)
[opentx.git] / companion / src / firmwares / radiodata.h
blob29d29e4eb45080f6ffae4cee5f610040c94345be
1 #ifndef _RADIODATA_H_
2 #define _RADIODATA_H_
4 #include "generalsettings.h"
5 #include "modeldata.h"
7 #include <QtCore>
9 class RadioDataConversionState;
11 class CategoryData {
12 public:
13 CategoryData(const char * name) {
14 strncpy(this->name, name, sizeof(CategoryData::name));
16 char name[15+1];
19 class RadioData {
20 Q_DECLARE_TR_FUNCTIONS(RadioData)
22 public:
23 RadioData();
25 GeneralSettings generalSettings;
26 std::vector<CategoryData> categories;
27 std::vector<ModelData> models;
29 void convert(RadioDataConversionState & cstate);
31 void setCurrentModel(unsigned int index);
32 void fixModelFilenames();
33 QString getNextModelFilename();
35 static QString getElementName(const QString & prefix, unsigned int index, const char * name = 0, bool padding = false);
37 protected:
38 void fixModelFilename(unsigned int index);
41 #endif // _RADIODATA_H_