[Companion] Radio data translation/strings (#5554)

* [Companion] Add Qt tr() functions to all radio data classes instead of using generic QObject type.  (no functional changes)

* Small fix for gcc.

* Move more element name string generation to individual classes; settle on nameToString as function name.

* Also put firmware build options translations into Firmware scope.
This commit is contained in:
Max Paperno
2017-12-21 18:26:11 +01:00
committed by Bertrand Songis
parent 7806c2096d
commit a951292f27
34 changed files with 606 additions and 514 deletions
+4 -2
View File
@@ -79,7 +79,9 @@ enum GVarAdjustModes
FUNC_ADJUST_GVAR_INCDEC
};
class CustomFunctionData { // Function Switches data
class CustomFunctionData {
Q_DECLARE_TR_FUNCTIONS(CustomFunctionData)
public:
CustomFunctionData(AssignFunc func=FuncOverrideCH1) { clear(); this->func = func; }
RawSwitch swtch;
@@ -92,7 +94,7 @@ class CustomFunctionData { // Function Switches data
void clear();
bool isEmpty() const;
QString toString(int index, bool globalContext = false) const;
QString nameToString(int index, bool globalContext = false) const;
QString funcToString(const ModelData * model = NULL) const;
QString paramToString(const ModelData * model) const;
QString repeatToString() const;