43 lines
1010 B
C++
43 lines
1010 B
C++
#pragma once
|
|
|
|
#include "generalsettings.h"
|
|
#include "modeldata.h"
|
|
|
|
#include "datahelpers.h" // required for getElementName
|
|
|
|
#include <QtCore>
|
|
|
|
class RadioDataConversionState;
|
|
|
|
class CategoryData {
|
|
public:
|
|
CategoryData(const char * name) {
|
|
strncpy(this->name, name, sizeof(CategoryData::name));
|
|
}
|
|
char name[15+1];
|
|
};
|
|
|
|
class RadioData {
|
|
Q_DECLARE_TR_FUNCTIONS(RadioData)
|
|
|
|
public:
|
|
RadioData();
|
|
|
|
GeneralSettings generalSettings;
|
|
std::vector<CategoryData> categories;
|
|
std::vector<ModelData> models;
|
|
|
|
void convert(RadioDataConversionState & cstate);
|
|
|
|
void setCurrentModel(unsigned int index);
|
|
void fixModelFilenames();
|
|
QString getNextModelFilename();
|
|
|
|
// leave here until all calls repointed
|
|
static QString getElementName(const QString & prefix, unsigned int index, const char * name = 0, bool padding = false)
|
|
{ return DataHelpers::getElementName(prefix, index, name, padding); }
|
|
|
|
protected:
|
|
void fixModelFilename(unsigned int index);
|
|
};
|