Merge remote-tracking branch 'origin/next' into

bsongis/Issue592_sticky_switches

Conflicts:
	radio/src/gui/menu_model.cpp
This commit is contained in:
Bertrand Songis
2014-02-05 08:01:40 +01:00
54 changed files with 32439 additions and 30506 deletions
+2 -52
View File
@@ -83,7 +83,6 @@ void compareDialog::printDiff()
printCurves();
printGvars();
printSwitches();
printSafetySwitches();
printFSwitches();
printFrSky();
te->scrollToAnchor("1");
@@ -1097,7 +1096,7 @@ void compareDialog::printFSwitches()
if (g_model1->funcSw[i].swtch.type) {
str.append(doTC(g_model1->funcSw[i].swtch.toString(),color1));
str.append(doTC(getFuncName(g_model1->funcSw[i].func),color1));
str.append(doTC(FuncParam(g_model1->funcSw[i].func,g_model1->funcSw[i].param,g_model1->funcSw[i].paramarm, g_model1->funcSw[i].adjustMode),color1));
str.append(doTC(g_model1->funcSw[i].paramToString(),color1));
int index=g_model1->funcSw[i].func;
if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) {
str.append(doTC(QString("%1").arg(g_model1->funcSw[i].repeatParam),color1));
@@ -1116,7 +1115,7 @@ void compareDialog::printFSwitches()
if (g_model2->funcSw[i].swtch.type) {
str.append(doTC(g_model2->funcSw[i].swtch.toString(),color2));
str.append(doTC(getFuncName(g_model2->funcSw[i].func),color2));
str.append(doTC(FuncParam(g_model2->funcSw[i].func,g_model2->funcSw[i].param,g_model2->funcSw[i].paramarm, g_model2->funcSw[i].adjustMode),color2));
str.append(doTC(g_model2->funcSw[i].paramToString(),color2));
int index=g_model2->funcSw[i].func;
if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) {
str.append(doTC(QString("%1").arg(g_model2->funcSw[i].repeatParam),color2));
@@ -1142,55 +1141,6 @@ void compareDialog::printFSwitches()
te->append(str);
}
void compareDialog::printSafetySwitches()
{
QString color1;
QString color2;
int sc=0;
QString str = "<table border=1 cellspacing=0 cellpadding=3 style=\"page-break-before:always;\" width=\"100%\">";
str.append("<tr><td><h2>"+tr("Safety Switches")+"</h2></td></tr>");
str.append("<tr><td><table border=1 cellspacing=0 cellpadding=1 width=\"100%\"><tr>");
str.append("<td width=\"8%\" align=\"center\"><b>"+tr("Switch")+"</b></td>");
str.append("<td width=\"37%\" align=\"center\"><b>"+tr("Value")+"</b></td>");
str.append("<td width=\"10%\">&nbsp;</td>");
str.append("<td width=\"8%\" align=\"center\"><b>"+tr("Switch")+"</b></td>");
str.append("<td width=\"37%\" align=\"center\"><b>"+tr("Value")+"</b></td>");
str.append("</tr>");
for(int i=0; i<GetEepromInterface()->getCapability(Outputs); i++)
{
if ((g_model1->safetySw[i].swtch.type!=SWITCH_TYPE_NONE)||(g_model2->safetySw[i].swtch.type!=SWITCH_TYPE_NONE)) {
if ((g_model1->safetySw[i].swtch!=g_model2->safetySw[i].swtch)||(g_model1->safetySw[i].val!=g_model2->safetySw[i].val)) {
color1="green";
color2="red";
} else {
color1="grey";
color2="grey";
}
str.append("<tr>");
if (g_model1->safetySw[i].swtch.type) {
str.append(doTC(g_model1->safetySw[i].swtch.toString(),color1));
str.append(doTC(QString::number(g_model1->safetySw[i].val),color1));
}
else {
str.append("<td>&nbsp;</td><td>&nbsp;</td>");
}
str.append(doTC(tr("CH")+QString("%1").arg(i+1),"",true));
if (g_model2->safetySw[i].swtch.type) {
str.append(doTC(g_model2->safetySw[i].swtch.toString(),color2));
str.append(doTC(QString::number(g_model2->safetySw[i].val),color2));
} else {
str.append("<td>&nbsp;</td><td>&nbsp;</td>");
}
str.append("</tr>");
sc++;
}
}
str.append("</table></td></tr></table>");
str.append("<br>");
if (sc!=0)
te->append(str);
}
void compareDialog::printFrSky()
{
QString color;
+143
View File
@@ -345,6 +345,149 @@ QString CurveReference::toString()
}
}
#if 0
QStringList FuncSwData::toStringList()
{
QStringList result;
QStringList qs;
result << swtch.toString();
result << funcToString();
if (func < FuncInstantTrim) {
result << QString("%1").arg(param);
}
else if (func==FuncPlaySound) {
qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ;
qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ;
if (param>=0 && param<(int)qs.count())
result << qs.at(param);
else
result << QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (func==FuncPlayHaptic) {
qs << "0" << "1" << "2" << "3";
if (param>=0 && param<(int)qs.count())
result << qs.at(param);
else
result << QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (func==FuncReset) {
qs.append( QObject::tr("Timer1"));
qs.append( QObject::tr("Timer2"));
qs.append( QObject::tr("All"));
qs.append( QObject::tr("Telemetry"));
if (param>=0 && param<(int)qs.count())
result << qs.at(param);
else
result << QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if ((func==FuncVolume)|| (func==FuncPlayValue)) {
RawSource item(param);
result << item.toString();
}
else if ((func==FuncPlayPrompt) || (func==FuncPlayBoth)) {
if ( GetEepromInterface()->getCapability(VoicesAsNumbers)) {
result << QString("%1").arg(param);
} else {
result << paramarm;
}
}
else if ((func>FuncBackgroundMusicPause) && (func<FuncCount)) {
switch (adjustMode) {
case 0:
result << QObject::tr("Value ")+QString("%1").arg(param);
break;
case 1:
result << RawSource(param).toString();
break;
case 2:
result << RawSource(param).toString();
break;
case 3:
if (param==0) {
result << QObject::tr("Decr:")+QString(" -1");
}
else {
result << QObject::tr("Incr:")+QString(" +1");
}
break;
default:
break;
}
}
return result;
}
#endif
QString FuncSwData::paramToString()
{
QStringList qs;
if (func <= FuncInstantTrim) {
return QString("%1").arg(param);
}
else if (func==FuncPlaySound) {
qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ;
qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ;
if (param>=0 && param<(int)qs.count())
return qs.at(param);
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (func==FuncPlayHaptic) {
qs << "0" << "1" << "2" << "3";
if (param>=0 && param<(int)qs.count())
return qs.at(param);
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (func==FuncReset) {
qs.append( QObject::tr("Timer1"));
qs.append( QObject::tr("Timer2"));
qs.append( QObject::tr("All"));
qs.append( QObject::tr("Telemetry"));
if (param>=0 && param<(int)qs.count())
return qs.at(param);
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if ((func==FuncVolume)|| (func==FuncPlayValue)) {
RawSource item(param);
return item.toString();
}
else if ((func==FuncPlayPrompt) || (func==FuncPlayBoth)) {
if ( GetEepromInterface()->getCapability(VoicesAsNumbers)) {
return QString("%1").arg(param);
} else {
return paramarm;
}
}
else if ((func>FuncBackgroundMusicPause) && (func<FuncCount)) {
switch (adjustMode) {
case 0:
return QObject::tr("Value ")+QString("%1").arg(param);
break;
case 1:
return RawSource(param).toString();
break;
case 2:
return RawSource(param).toString();
break;
case 3:
if (param==0) {
return QObject::tr("Decr:")+QString(" -1");
}
else {
return QObject::tr("Incr:")+QString(" +1");
}
break;
default:
return "";
}
}
return "";
}
GeneralSettings::GeneralSettings()
{
memset(this, 0, sizeof(GeneralSettings));
+3 -13
View File
@@ -72,7 +72,6 @@ const uint8_t modn12x3[4][4]= {
#define C9X_MAX_POINTS 17
#define C9X_MAX_GVARS 9
#define C9X_MAX_ENCODERS 2
#define NUM_SAFETY_CHNOUT 16
#define C9X_NUM_CHNOUT 32 // number of real output channels
#define C9X_NUM_CSW 32 // number of custom switches
#define C9X_MAX_CUSTOM_FUNCTIONS 32 // number of functions assigned to switches
@@ -629,18 +628,9 @@ class CustomSwData { // Custom Switches data
void clear() { memset(this, 0, sizeof(CustomSwData)); }
};
class SafetySwData { // Custom Switches data
public:
SafetySwData() { clear(); }
RawSwitch swtch;
int val;
void clear() { memset(this, 0, sizeof(SafetySwData)); }
};
enum AssignFunc {
FuncSafetyCh1 = 0,
FuncSafetyCh16 = FuncSafetyCh1+15,
FuncSafetyCh32 = FuncSafetyCh1+C9X_NUM_CHNOUT-1,
FuncTrainer,
FuncTrainerRUD,
FuncTrainerELE,
@@ -675,6 +665,8 @@ class FuncSwData { // Function Switches data
unsigned int adjustMode;
int repeatParam;
void clear() { memset(this, 0, sizeof(FuncSwData)); }
QString paramToString();
QStringList toStringList();
};
class PhaseData {
@@ -896,11 +888,9 @@ class ModelData {
CurveData curves[C9X_MAX_CURVES];
CustomSwData customSw[C9X_NUM_CSW];
FuncSwData funcSw[C9X_MAX_CUSTOM_FUNCTIONS];
SafetySwData safetySw[C9X_NUM_CHNOUT];
SwashRingData swashRingData;
unsigned int thrTraceSrc;
int8_t traineron; // 0 disable trainer, 1 allow trainer
int8_t t2throttle; // Start timer2 using throttle
unsigned int modelId;
unsigned int switchWarningStates;
// TODO structure
+3 -11
View File
@@ -298,14 +298,6 @@ t_Er9xSafetySwData::t_Er9xSafetySwData()
memset(this, 0, sizeof(t_Er9xSafetySwData));
}
t_Er9xSafetySwData::operator SafetySwData ()
{
SafetySwData c9x;
c9x.swtch = er9xToSwitch(swtch);
c9x.val = val;
return c9x;
}
t_Er9xFrSkyChannelData::t_Er9xFrSkyChannelData()
{
memset(this, 0, sizeof(t_Er9xFrSkyChannelData));
@@ -381,7 +373,7 @@ t_Er9xModelData::operator ModelData ()
break;
}
c9x.traineron= traineron;
c9x.t2throttle = t2throttle;
// c9x.t2throttle = t2throttle;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
@@ -471,8 +463,8 @@ t_Er9xModelData::operator ModelData ()
for (int i=0; i<ER9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<ER9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<ER9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.frsky = frsky;
c9x.frsky.usrProto=FrSkyUsrProto;
@@ -168,7 +168,6 @@ PACK(typedef struct t_Er9xSafetySwData { // Custom Switches data
int8_t swtch;
int8_t val;
operator SafetySwData();
t_Er9xSafetySwData();
}) Er9xSafetySwData;
@@ -406,27 +406,11 @@ t_Ersky9xSafetySwData_v10::t_Ersky9xSafetySwData_v10()
memset(this, 0, sizeof(t_Ersky9xSafetySwData_v10));
}
t_Ersky9xSafetySwData_v10::operator SafetySwData ()
{
SafetySwData c9x;
c9x.swtch = er9xToSwitch(swtch);
c9x.val = val;
return c9x;
}
t_Ersky9xSafetySwData_v11::t_Ersky9xSafetySwData_v11()
{
memset(this, 0, sizeof(t_Ersky9xSafetySwData_v11));
}
t_Ersky9xSafetySwData_v11::operator SafetySwData ()
{
SafetySwData c9x;
c9x.swtch = ersky9xToSwitch(opt.ss.swtch);
c9x.val = opt.ss.val;
return c9x;
}
t_Ersky9xFrSkyChannelData_v10::t_Ersky9xFrSkyChannelData_v10()
{
memset(this, 0, sizeof(t_Ersky9xFrSkyChannelData_v10));
@@ -612,8 +596,8 @@ t_Ersky9xModelData_v10::operator ModelData ()
for (int i=0; i<ERSKY9X_NUM_CSW_V10; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<ERSKY9X_NUM_CHNOUT_V10; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<ERSKY9X_NUM_CHNOUT_V10; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.frsky = frsky;
c9x.frsky.usrProto=FrSkyUsrProto;
@@ -733,8 +717,8 @@ t_Ersky9xModelData_v11::operator ModelData ()
for (int i=0; i<ERSKY9X_NUM_CSW_V11; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<ERSKY9X_NUM_CHNOUT_V11; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<ERSKY9X_NUM_CHNOUT_V11; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.frsky = frsky;
c9x.frsky.usrProto=FrSkyUsrProto;
@@ -210,7 +210,6 @@ PACK(typedef struct t_Ersky9xSafetySwData_v10 { // Custom Switches data
int8_t swtch;
int8_t val;
operator SafetySwData();
t_Ersky9xSafetySwData_v10();
}) Ersky9xSafetySwData_v10;
@@ -230,7 +229,6 @@ PACK(typedef struct t_Ersky9xSafetySwData_v11 { // Custom Switches data
} vs ;
} opt ;
operator SafetySwData();
t_Ersky9xSafetySwData_v11();
}) Ersky9xSafetySwData_v11;
@@ -332,14 +332,6 @@ Gruvin9xFuncSwData::operator FuncSwData ()
return c9x;
}
t_Gruvin9xSafetySwData::operator SafetySwData ()
{
SafetySwData c9x;
c9x.swtch = gruvin9xToSwitch(swtch);
c9x.val = val;
return c9x;
}
t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData()
{
memset(this, 0, sizeof(t_Gruvin9xSwashRingData));
@@ -489,8 +481,8 @@ t_Gruvin9xModelData_v102::operator ModelData ()
for (int i=0; i<G9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<G9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
return c9x;
@@ -560,8 +552,8 @@ t_Gruvin9xModelData_v103::operator ModelData ()
for (int i=0; i<G9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<G9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
return c9x;
@@ -650,8 +642,8 @@ t_Gruvin9xModelData_v105::operator ModelData ()
c9x.customSw[i] = customSw[i];
for (int i=0; i<G9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<G9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
@@ -734,8 +726,8 @@ t_Gruvin9xModelData_v106::operator ModelData ()
c9x.customSw[i] = customSw[i];
for (int i=0; i<G9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<G9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
@@ -199,7 +199,6 @@ PACK(typedef struct t_Gruvin9xSafetySwData { // Safety Switches data
int8_t swtch;
int8_t val;
operator SafetySwData();
t_Gruvin9xSafetySwData() { memset(this, 0, sizeof(t_Gruvin9xSafetySwData)); }
}) Gruvin9xSafetySwData;
@@ -577,7 +577,7 @@ t_Open9xArmFuncSwData_v208::operator FuncSwData ()
FuncSwData c9x;
c9x.swtch = open9xArmToSwitch(swtch);
c9x.func = (AssignFunc)(func);
if (c9x.func <= FuncSafetyCh16) {
if (c9x.func <= FuncSafetyCh32) {
c9x.enabled=param & 0x01;
c9x.param = (param>>1)<<1;
}
@@ -662,14 +662,6 @@ t_Open9xFuncSwData_v210::operator FuncSwData ()
return c9x;
}
t_Open9xSafetySwData::operator SafetySwData ()
{
SafetySwData c9x;
c9x.swtch = open9xStockToSwitch(swtch);
c9x.val = val;
return c9x;
}
t_Open9xSwashRingData_v208::operator SwashRingData ()
{
SwashRingData c9x;
@@ -993,8 +985,8 @@ t_Open9xModelData_v201::operator ModelData ()
c9x.customSw[i] = customSw[i];
for (int i=0; i<12; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<O9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
@@ -1067,8 +1059,8 @@ t_Open9xModelData_v202::operator ModelData ()
c9x.customSw[i] = customSw[i];
for (int i=0; i<12; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
c9x.safetySw[i] = safetySw[i];
// for (int i=0; i<O9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
@@ -244,7 +244,6 @@ PACK(typedef struct t_Open9xSafetySwData { // Safety Switches data
int8_t swtch;
int8_t val;
operator SafetySwData();
t_Open9xSafetySwData() { memset(this, 0, sizeof(t_Open9xSafetySwData)); }
}) Open9xSafetySwData;
+67 -26
View File
@@ -1237,7 +1237,13 @@ class CustomFunctionsConversionTable: public ConversionTable {
{
int val=0;
if (IS_ARM(board) || version < 213) {
if (version >= 216) {
for (int i=0; i<32; i++) {
addConversion(i, val);
}
val++;
}
else if (IS_ARM(board) || version < 213) {
for (int i=0; i<16; i++) {
addConversion(val, val);
val++;
@@ -1249,32 +1255,67 @@ class CustomFunctionsConversionTable: public ConversionTable {
}
val+=4;
}
addConversion(FuncTrainer, val++);
addConversion(FuncTrainerRUD, val++);
addConversion(FuncTrainerELE, val++);
addConversion(FuncTrainerTHR, val++);
addConversion(FuncTrainerAIL, val++);
if (version >= 216) {
addConversion(FuncTrainer, val);
addConversion(FuncTrainerRUD, val);
addConversion(FuncTrainerELE, val);
addConversion(FuncTrainerTHR, val);
addConversion(FuncTrainerAIL, val);
val++;
}
else {
addConversion(FuncTrainer, val++);
addConversion(FuncTrainerRUD, val++);
addConversion(FuncTrainerELE, val++);
addConversion(FuncTrainerTHR, val++);
addConversion(FuncTrainerAIL, val++);
}
addConversion(FuncInstantTrim, val++);
addConversion(FuncPlaySound, val++);
if (!IS_TARANIS(board))
if (version >= 216) {
addConversion(FuncReset, val++);
for (int i=0; i<MAX_GVARS(board, version); i++)
addConversion(FuncAdjustGV1+i, val);
val++;
if (IS_ARM(board))
addConversion(FuncVolume, val++);
addConversion(FuncPlaySound, val++);
addConversion(FuncPlayPrompt, val++);
if (version >= 213 && !IS_ARM(board))
addConversion(FuncPlayBoth, val++);
addConversion(FuncPlayValue, val++);
if (IS_ARM(board)) {
addConversion(FuncBackgroundMusic, val++);
addConversion(FuncBackgroundMusicPause, val++);
}
addConversion(FuncVario, val++);
addConversion(FuncPlayHaptic, val++);
addConversion(FuncReset, val++);
addConversion(FuncVario, val++);
addConversion(FuncPlayPrompt, val++);
if (version >= 213 && !IS_ARM(board))
addConversion(FuncPlayBoth, val++);
addConversion(FuncPlayValue, val++);
if (board == BOARD_GRUVIN9X || IS_ARM(board) )
addConversion(FuncLogs, val++);
if (IS_ARM(board))
addConversion(FuncVolume, val++);
addConversion(FuncBacklight, val++);
if (IS_ARM(board)) {
addConversion(FuncBackgroundMusic, val++);
addConversion(FuncBackgroundMusicPause, val++);
if (board == BOARD_GRUVIN9X || IS_ARM(board) )
addConversion(FuncLogs, val++);
addConversion(FuncBacklight, val++);
}
else {
addConversion(FuncPlaySound, val++);
if (!IS_TARANIS(board))
addConversion(FuncPlayHaptic, val++);
addConversion(FuncReset, val++);
addConversion(FuncVario, val++);
addConversion(FuncPlayPrompt, val++);
if (version >= 213 && !IS_ARM(board))
addConversion(FuncPlayBoth, val++);
addConversion(FuncPlayValue, val++);
if (board == BOARD_GRUVIN9X || IS_ARM(board) )
addConversion(FuncLogs, val++);
if (IS_ARM(board))
addConversion(FuncVolume, val++);
addConversion(FuncBacklight, val++);
if (IS_ARM(board)) {
addConversion(FuncBackgroundMusic, val++);
addConversion(FuncBackgroundMusicPause, val++);
}
for (int i=0; i<5; i++)
addConversion(FuncAdjustGV1+i, val++);
}
for (int i=0; i<5; i++)
addConversion(FuncAdjustGV1+i, val++);
}
};
@@ -1436,7 +1477,7 @@ class CustomFunctionField: public TransformedField {
if (version >= 213)
_union_param = fn.repeatParam / 10;
}
else if (fn.func <= FuncSafetyCh16) {
else if (fn.func <= FuncSafetyCh32) {
if (version >= 213)
_union_param += ((fn.func % 4) << 1);
}
@@ -1518,7 +1559,7 @@ class CustomFunctionField: public TransformedField {
if (version >= 213)
fn.repeatParam = _union_param * 10;
}
else if (fn.func <= FuncSafetyCh16) {
else if (fn.func <= FuncSafetyCh32) {
if (version >= 213) {
fn.func = AssignFunc(((fn.func >> 2) << 2) + ((_union_param >> 1) & 0x03));
}
+8 -247
View File
@@ -129,7 +129,7 @@ QString getRepeatString(unsigned int val)
QString getFuncName(unsigned int val)
{
if (val < NUM_SAFETY_CHNOUT) {
if (val < C9X_NUM_CHNOUT) {
return QObject::tr("Safety %1").arg(RawSource(SOURCE_TYPE_CH, val).toString());
}
else if (val == FuncTrainer)
@@ -290,186 +290,6 @@ QString getProtocolStr(const int proto)
return CHECK_IN_ARRAY(strings, proto);
}
void populateFuncCB(QComboBox *b, unsigned int value)
{
b->clear();
for (unsigned int i = 0; i < FuncCount; i++) {
b->addItem(getFuncName(i));
if (!GetEepromInterface()->getCapability(HasVolume)) {
if (i==FuncVolume || i==FuncBackgroundMusic || i==FuncBackgroundMusicPause) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
}
if ((i==FuncPlayHaptic) && !GetEepromInterface()->getCapability(Haptic)) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
if ((i==FuncPlayBoth) && !GetEepromInterface()->getCapability(HasBeeper)) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
if ((i==FuncLogs) && !GetEepromInterface()->getCapability(HasSDLogs)) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
}
b->setCurrentIndex(value);
b->setMaxVisibleItems(10);
}
QString FuncParam(uint function, int value, QString paramT,unsigned int adjustmode)
{
QStringList qs;
if (function <= FuncInstantTrim) {
return QString("%1").arg(value);
}
else if (function==FuncPlaySound) {
qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ;
qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ;
if (value>=0 && value<(int)qs.count())
return qs.at(value);
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (function==FuncPlayHaptic) {
qs << "0" << "1" << "2" << "3";
if (value>=0 && value<(int)qs.count())
return qs.at(value);
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (function==FuncReset) {
qs.append( QObject::tr("Timer1"));
qs.append( QObject::tr("Timer2"));
qs.append( QObject::tr("All"));
qs.append( QObject::tr("Telemetry"));
if (value>=0 && value<(int)qs.count())
return qs.at(value);
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if ((function==FuncVolume)|| (function==FuncPlayValue)) {
RawSource item(value);
return item.toString();
}
else if ((function==FuncPlayPrompt) || (function==FuncPlayBoth)) {
if ( GetEepromInterface()->getCapability(VoicesAsNumbers)) {
return QString("%1").arg(value);
} else {
return paramT;
}
} else if ((function>FuncBackgroundMusicPause) && (function<FuncCount)) {
switch (adjustmode) {
case 0:
return QObject::tr("Value ")+QString("%1").arg(value);
break;
case 1:
return RawSource(value).toString();
break;
case 2:
return RawSource(value).toString();
break;
case 3:
if (value==0) {
return QObject::tr("Decr:")+QString(" -1");
} else {
return QObject::tr("Incr:")+QString(" +1");
}
break;
default:
return "";
}
}
return "";
}
void populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QStringList & paramsList)
{
b->clear();
b->addItem("----");
QString currentvalue(value);
foreach ( QString entry, paramsList ) {
b->addItem(entry);
if (entry==currentvalue) {
b->setCurrentIndex(b->count()-1);
}
}
}
void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode)
{
QStringList qs;
b->clear();
if (function==FuncPlaySound) {
qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ;
qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ;
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncPlayHaptic) {
qs << "0" << "1" << "2" << "3";
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncReset) {
qs.append( QObject::tr("Timer1"));
qs.append( QObject::tr("Timer2"));
qs.append( QObject::tr("All"));
qs.append( QObject::tr("Telemetry"));
int reCount = GetEepromInterface()->getCapability(RotaryEncoders);
if (reCount == 1) {
qs.append( QObject::tr("Rotary Encoder"));
}
else if (reCount == 2) {
qs.append( QObject::tr("REa"));
qs.append( QObject::tr("REb"));
}
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncVolume) {
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS);
}
else if (function==FuncPlayValue) {
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT);
}
else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) {
switch (adjustmode) {
case 1:
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES);
break;
case 2:
populateSourceCB(b, RawSource(value), model, POPULATE_GVARS);
break;
case 3:
b->clear();
b->addItem("-1", 0);
b->addItem("+1", 1);
b->setCurrentIndex(value);
break;
}
}
else {
b->hide();
}
}
void populateGVmodeCB(QComboBox *b, unsigned int value)
{
b->clear();
b->addItem(QObject::tr("Value"));
b->addItem(QObject::tr("Source"));
b->addItem(QObject::tr("GVAR"));
b->addItem(QObject::tr("Increment"));
b->setCurrentIndex(value);
}
void populatePhasesCB(QComboBox *b, int value)
{
for (int i=-GetEepromInterface()->getCapability(FlightPhases); i<=GetEepromInterface()->getCapability(FlightPhases); i++) {
@@ -842,28 +662,6 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
return;
}
#if 0
// TODO check ... I removed negative toggle switches in the FW, no?
if (attr & POPULATE_MSWITCHES) {
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ONM, 1);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
for (int i=-GetEepromInterface()->getCapability(CustomSwitches); i<0; i++) {
item = RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
for (int i=-GetEepromInterface()->getCapability(SwitchesPositions); i<0; i++) {
item = RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, i);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
#endif
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_OFF);
if (GetEepromInterface()->isAvailable(item, context)) {
@@ -922,51 +720,14 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
if (item == value) b->setCurrentIndex(b->count()-1);
}
if (attr & POPULATE_MSWITCHES) {
for (int i=1; i<=GetEepromInterface()->getCapability(SwitchesPositions); i++) {
item = RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, i);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
for (int i=1; i<=GetEepromInterface()->getCapability(CustomSwitches); i++) {
item = RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
if (attr & POPULATE_MSWITCHES) {
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ONM);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
if (IS_ARM(GetEepromInterface()->getBoard())) {
item = RawSwitch(SWITCH_TYPE_TRN,0);
if (GetEepromInterface()->isAvailable(item, context)) {
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
item = RawSwitch(SWITCH_TYPE_TRN,1);
if (GetEepromInterface()->isAvailable(item, context)) {
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
if (GetEepromInterface()->getBoard()==BOARD_SKY9X) {
item = RawSwitch(SWITCH_TYPE_REA,0);
if (GetEepromInterface()->isAvailable(item, context)) {
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
item = RawSwitch(SWITCH_TYPE_REA,1);
if (GetEepromInterface()->isAvailable(item, context)) {
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
#if 0
// TODO One ?
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ONM);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
#endif
b->setMaxVisibleItems(10);
}
+1 -7
View File
@@ -80,14 +80,8 @@ class CurveGroup : public QObject {
};
#define POPULATE_ONOFF 0x01
#define POPULATE_MSWITCHES 0x02
#define POPULATE_AND_SWITCHES 0x04
#define POPULATE_AND_SWITCHES 0x02
void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr=0, UseContext context=DefaultContext);
void populateFuncCB(QComboBox *b, unsigned int value);
void populateGVmodeCB(QComboBox *b, unsigned int value);
QString FuncParam(uint function, int value, QString paramT="",unsigned int adjustmode=0);
void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode=0);
void populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QStringList & paramsList);
void populatePhasesCB(QComboBox *b, int value);
void populateTrimUseCB(QComboBox *b, unsigned int phase);
void populateGvarUseCB(QComboBox *b, unsigned int phase);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

+146 -14
View File
@@ -641,6 +641,42 @@ void MainWindow::closeEvent(QCloseEvent *event)
}
}
void MainWindow::setLanguage(QString langString)
{
QSettings settings;
settings.setValue("locale", langString );
QMessageBox msgBox;
msgBox.setText(tr("The selected language will be used the next time you start Companion."));
msgBox.setIcon(QMessageBox::Information);
msgBox.addButton(tr("OK"), QMessageBox::AcceptRole);
msgBox.exec();
}
void MainWindow::setTheme(int index)
{
QSettings settings;
settings.setValue("theme", index );
QMessageBox msgBox;
msgBox.setText(tr("The new theme will be loaded the next time you start Companion."));
msgBox.setIcon(QMessageBox::Information);
msgBox.addButton(tr("OK"), QMessageBox::AcceptRole);
msgBox.exec();
}
void MainWindow::setIconThemeSize(int index)
{
QSettings settings;
settings.setValue("icon_size", index );
QMessageBox msgBox;
msgBox.setText(tr("The icon size will be used the next time you start Companion."));
msgBox.setIcon(QMessageBox::Information);
msgBox.addButton(tr("OK"), QMessageBox::AcceptRole);
msgBox.exec();
}
void MainWindow::newFile()
{
MdiChild *child = createMdiChild();
@@ -648,6 +684,7 @@ void MainWindow::newFile()
child->show();
}
void MainWindow::openFile()
{
QSettings settings;
@@ -1630,7 +1667,7 @@ void MainWindow::createActions()
logsAct->setStatusTip(tr("Open log file"));
connect(logsAct, SIGNAL(triggered()), this, SLOT(logFile()));
preferencesAct = new QAction(CompanionIcon("preferences.png"), tr("&Preferences..."), this);
preferencesAct = new QAction(CompanionIcon("preferences.png"), tr("&General Preferences..."), this);
preferencesAct->setStatusTip(tr("Edit general preferences"));
connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences()));
@@ -1655,7 +1692,7 @@ void MainWindow::createActions()
compareAct->setEnabled(false);
connect(compareAct, SIGNAL(triggered()), this, SLOT(compare()));
customizeSplashAct = new QAction(CompanionIcon("paintbrush.png"), tr("Customize your &TX..."), this);
customizeSplashAct = new QAction(CompanionIcon("paintbrush.png"), tr("Configure transmitter start screen..."), this);
customizeSplashAct->setStatusTip(tr("Customize the splash screen of your TX"));
connect(customizeSplashAct, SIGNAL(triggered()), this, SLOT(customizeSplash()));
@@ -1708,7 +1745,7 @@ void MainWindow::createActions()
burnFromFlashAct->setStatusTip(tr("Read firmware from transmitter"));
connect(burnFromFlashAct,SIGNAL(triggered()),this,SLOT(burnFromFlash()));
burnConfigAct = new QAction(CompanionIcon("configure.png"), tr("&Configure..."), this);
burnConfigAct = new QAction(CompanionIcon("configure.png"), tr("&Configure connection software..."), this);
burnConfigAct->setStatusTip(tr("Configure software for reading from and writing to the transmitter"));
connect(burnConfigAct,SIGNAL(triggered()),this,SLOT(burnConfig()));
EEPROMInterface *eepromInterface = GetEepromInterface();
@@ -1754,6 +1791,79 @@ void MainWindow::createActions()
connect(profileActs[i], SIGNAL(triggered()), this, SLOT(loadProfile()));
}
updateProfilesActions();
classicThemeAct = new QAction(tr("Classic"), this);
classicThemeAct->setStatusTip(tr("The multicolor classical Companion icon theme"));
connect(classicThemeAct, SIGNAL(triggered()), this, SLOT(setClassicTheme()));
monoThemeAct = new QAction("Monochrome",this);
monoThemeAct->setStatusTip(tr("A monochrome black icon theme"));
connect(monoThemeAct, SIGNAL(triggered()), this, SLOT(setMonochromeTheme()));
monoWhiteThemeAct = new QAction("MonoWhite",this);
monoWhiteThemeAct->setStatusTip(tr("A monochrome white icon theme"));
connect(monoWhiteThemeAct, SIGNAL(triggered()), this, SLOT(setMonoWhiteTheme()));
monoBlueThemeAct = new QAction("MonoBlue",this);
monoBlueThemeAct->setStatusTip(tr("A monochrome blue icon theme"));
connect(monoBlueThemeAct, SIGNAL(triggered()), this, SLOT(setMonoBlueTheme()));
smallIconAct = new QAction(tr("Small"),this);
smallIconAct->setStatusTip(tr("Use small toolbar icons"));
connect(smallIconAct, SIGNAL(triggered()), this, SLOT(setSmallIconThemeSize()));
normalIconAct = new QAction(this);
normalIconAct->setStatusTip(tr("Use normal size toolbar icons"));
normalIconAct->setText(tr("Normal"));
connect(normalIconAct, SIGNAL(triggered()), this, SLOT(setNormalIconThemeSize()));
bigIconAct = new QAction(this);
bigIconAct->setStatusTip(tr("Use big toolbar icons"));
bigIconAct->setText(tr("Big"));
connect(bigIconAct, SIGNAL(triggered()), this, SLOT(setBigIconThemeSize()));
hugeIconAct = new QAction(this);
hugeIconAct->setStatusTip(tr("Use huge toolbar icons"));
hugeIconAct->setText(tr("Huge"));
connect(hugeIconAct, SIGNAL(triggered()), this, SLOT(setHugeIconThemeSize()));
defaultLanguageAct = new QAction(tr("System default language"),this);
defaultLanguageAct->setStatusTip(tr("Use system default language in menus"));
connect(defaultLanguageAct, SIGNAL(triggered()), this, SLOT(setDefaultLanguage()));
czechLanguageAct = new QAction(tr("Czech"),this);
czechLanguageAct->setStatusTip(tr("Use Czech in menus"));
connect(czechLanguageAct, SIGNAL(triggered()), this, SLOT(setCZLanguage()));
germanLanguageAct = new QAction(tr("German"),this);
germanLanguageAct->setStatusTip(tr("Use German in menus"));
connect(germanLanguageAct, SIGNAL(triggered()), this, SLOT(setDELanguage()));
englishLanguageAct = new QAction(tr("English"),this);
englishLanguageAct->setStatusTip(tr("Use English in menus"));
connect(englishLanguageAct, SIGNAL(triggered()), this, SLOT(setENLanguage()));
frenchLanguageAct = new QAction(tr("French"),this);
frenchLanguageAct->setStatusTip(tr("Use French in menus"));
connect(frenchLanguageAct, SIGNAL(triggered()), this, SLOT(setFRLanguage()));
italianLanguageAct = new QAction(tr("Italian"),this);
italianLanguageAct->setStatusTip(tr("Use Italian in menus"));
connect(italianLanguageAct, SIGNAL(triggered()), this, SLOT(setITLanguage()));
hebrewLanguageAct = new QAction(tr("Hebrew"),this);
hebrewLanguageAct->setStatusTip(tr("Use Hebrew in menus"));
connect(hebrewLanguageAct, SIGNAL(triggered()), this, SLOT(setHELanguage()));
polishLanguageAct = new QAction(tr("Polish"),this);
polishLanguageAct->setStatusTip(tr("Use Polish in menus"));
connect(polishLanguageAct, SIGNAL(triggered()), this, SLOT(setPLLanguage()));
portugueseLanguageAct = new QAction(tr("Portuguese"),this);
portugueseLanguageAct->setStatusTip(tr("Use Portuguese in menus"));
connect(portugueseLanguageAct, SIGNAL(triggered()), this, SLOT(setPTLanguage()));
swedishLanguageAct = new QAction(tr("Swedish"),this);
swedishLanguageAct->setStatusTip(tr("Use Swedish in menus"));
connect(swedishLanguageAct, SIGNAL(triggered()), this, SLOT(setSELanguage()));
russianLanguageAct = new QAction(tr("Russian"),this);
russianLanguageAct->setStatusTip(tr("Use Russian in menus"));
connect(russianLanguageAct, SIGNAL(triggered()), this, SLOT(setRULanguage()));
}
void MainWindow::createMenus()
@@ -1761,6 +1871,9 @@ void MainWindow::createMenus()
{
QMenu *recentFileMenu=new QMenu(tr("Recent Files"));
QMenu *profilesMenu=new QMenu(tr("Firmware Profiles"));
QMenu *languageMenu=new QMenu(tr("Set Menu Language"));
QMenu *themeMenu=new QMenu(tr("Set Icon Theme"));
QMenu *iconThemeSizeMenu=new QMenu(tr("Set Icon Size"));
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(newAct);
@@ -1778,7 +1891,6 @@ void MainWindow::createMenus()
fileMenu->addAction(printAct);
fileMenu->addAction(compareAct);
fileMenu->addSeparator();
fileMenu->addAction(preferencesAct);
fileMenu->addMenu(profilesMenu);
profilesMenu->setIcon(CompanionIcon("profiles.png"));
@@ -1791,6 +1903,34 @@ void MainWindow::createMenus()
editMenu->addAction(copyAct);
editMenu->addAction(pasteAct);
settingsMenu = menuBar()->addMenu(tr("&Settings"));
settingsMenu->addMenu(languageMenu);
languageMenu->addAction(defaultLanguageAct);
languageMenu->addAction(englishLanguageAct);
languageMenu->addAction(czechLanguageAct);
languageMenu->addAction(germanLanguageAct);
languageMenu->addAction(frenchLanguageAct);
languageMenu->addAction(hebrewLanguageAct);
languageMenu->addAction(italianLanguageAct);
languageMenu->addAction(polishLanguageAct);
languageMenu->addAction(portugueseLanguageAct);
languageMenu->addAction(swedishLanguageAct);
languageMenu->addAction(russianLanguageAct);
settingsMenu->addMenu(themeMenu);
themeMenu->addAction(classicThemeAct);
themeMenu->addAction(monoThemeAct);
themeMenu->addAction(monoBlueThemeAct);
themeMenu->addAction(monoWhiteThemeAct);
settingsMenu->addMenu(iconThemeSizeMenu);
iconThemeSizeMenu->addAction(smallIconAct);
iconThemeSizeMenu->addAction(normalIconAct);
iconThemeSizeMenu->addAction(bigIconAct);
iconThemeSizeMenu->addAction(hugeIconAct);
settingsMenu->addSeparator();
settingsMenu->addAction(preferencesAct);
settingsMenu->addAction(customizeSplashAct);
settingsMenu->addAction(burnConfigAct);
burnMenu = menuBar()->addMenu(tr("&Read/Write"));
burnMenu->addAction(burnToAct);
burnMenu->addAction(burnFromAct);
@@ -1801,9 +1941,7 @@ void MainWindow::createMenus()
burnMenu->addAction(burnToFlashAct);
burnMenu->addAction(burnFromFlashAct);
burnMenu->addSeparator();
burnMenu->addAction(customizeSplashAct);
burnMenu->addSeparator();
burnMenu->addAction(burnConfigAct);
EEPROMInterface *eepromInterface = GetEepromInterface();
if (!IS_ARM(eepromInterface->getBoard())) {
burnMenu->addAction(burnFusesAct);
@@ -1968,14 +2106,6 @@ QMdiSubWindow *MainWindow::findMdiChild(const QString &fileName)
return 0;
}
void MainWindow::switchLayoutDirection()
{
if (layoutDirection() == Qt::LeftToRight)
qApp->setLayoutDirection(Qt::RightToLeft);
else
qApp->setLayoutDirection(Qt::LeftToRight);
}
void MainWindow::setActiveSubWindow(QWidget *window)
{
if (!window)
@@ -2143,3 +2273,5 @@ void MainWindow::autoClose()
{
this->close();
}
+46 -3
View File
@@ -82,6 +82,31 @@ public slots:
void unloadProfile();
private slots:
void setLanguage(QString langString);
void setDefaultLanguage() {setLanguage("");};
void setCZLanguage() {setLanguage("cs_CZ");};
void setDELanguage() {setLanguage("de_DE");};
void setENLanguage() {setLanguage("en");};
void setFRLanguage() {setLanguage("fr_FR");};
void setITLanguage() {setLanguage("it_IT");};
void setHELanguage() {setLanguage("he_IL");};
void setPLLanguage() {setLanguage("pl_PL");};
void setPTLanguage() {setLanguage("pt_PT");};
void setRULanguage() {setLanguage("ru_RU");};
void setSELanguage() {setLanguage("sv_SE");};
void setTheme(int index);
void setClassicTheme() {setTheme(0);};
void setMonochromeTheme(){setTheme(1);};
void setMonoWhiteTheme() {setTheme(2);};
void setMonoBlueTheme() {setTheme(3);};
void setIconThemeSize(int index);
void setSmallIconThemeSize() {setIconThemeSize(0);};
void setNormalIconThemeSize() {setIconThemeSize(1);};
void setBigIconThemeSize() {setIconThemeSize(2);};
void setHugeIconThemeSize() {setIconThemeSize(3);};
void checkForUpdates(bool ignoreSettings, QString & fwId);
void checkForUpdateFinished(QNetworkReply * reply);
void displayWarnings();
@@ -121,12 +146,11 @@ private slots:
void preferences();
void updateMenus();
MdiChild *createMdiChild();
void switchLayoutDirection();
void setActiveSubWindow(QWidget *window);
QMenu * createRecentFileMenu();
QMenu * createProfilesMenu();
void autoClose();
private:
void createActions();
void createMenus();
@@ -153,7 +177,6 @@ private:
QStringList GetSendFlashCommand(const QString &filename);
int getEpromVersion(QString fileName);
bool convertEEPROM(QString backupFile, QString restoreFile, QString flashFile);
bool isValidEEPROM(QString eepromfile);
@@ -183,6 +206,7 @@ private:
QMenu *fileMenu;
QMenu *editMenu;
QMenu *settingsMenu;
QMenu *burnMenu;
QMenu *helpMenu;
QToolBar *fileToolBar;
@@ -222,6 +246,25 @@ private:
QAction *logsAct;
QAction *recentFileActs[MAX_RECENT];
QAction *profileActs[MAX_PROFILES];
QAction *classicThemeAct;
QAction *monoThemeAct;
QAction *monoBlueThemeAct;
QAction *monoWhiteThemeAct;
QAction *smallIconAct;
QAction *normalIconAct;
QAction *bigIconAct;
QAction *hugeIconAct;
QAction *defaultLanguageAct;
QAction *englishLanguageAct;
QAction *czechLanguageAct;
QAction *germanLanguageAct;
QAction *frenchLanguageAct;
QAction *italianLanguageAct;
QAction *hebrewLanguageAct;
QAction *polishLanguageAct;
QAction *portugueseLanguageAct;
QAction *swedishLanguageAct;
QAction *russianLanguageAct;
QString fwToUpdate;
QToolButton * profileButton;
};
+118 -4
View File
@@ -95,7 +95,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
fswtchSwtch[i]->setProperty("index", i);
connect(fswtchSwtch[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited()));
gridLayout->addWidget(fswtchSwtch[i], i+1, 1);
populateSwitchCB(fswtchSwtch[i], model.funcSw[i].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF);
populateSwitchCB(fswtchSwtch[i], model.funcSw[i].swtch, POPULATE_ONOFF);
// The function
fswtchFunc[i] = new QComboBox(this);
@@ -286,7 +286,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
int index = fswtchFunc[i]->currentIndex();
if (index>=FuncSafetyCh1 && index<=FuncSafetyCh16) {
if (index>=FuncSafetyCh1 && index<=FuncSafetyCh32) {
fswtchParam[i]->setDecimals(0);
fswtchParam[i]->setSingleStep(1);
fswtchParam[i]->setMinimum(-125);
@@ -457,7 +457,7 @@ void CustomFunctionsPanel::fswPaste()
FuncSwData *fsw = &model.funcSw[selectedFunction];
memcpy(fsw, fswData.mid(0, sizeof(FuncSwData)).constData(), sizeof(FuncSwData));
// TODO update switch and func
populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF);
populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_ONOFF);
populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func);
refreshCustomFunction(selectedFunction);
emit modified();
@@ -468,7 +468,7 @@ void CustomFunctionsPanel::fswDelete()
{
model.funcSw[selectedFunction].clear();
// TODO update switch and func
populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF);
populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_ONOFF);
populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func);
refreshCustomFunction(selectedFunction);
emit modified();
@@ -508,3 +508,117 @@ void CustomFunctionsPanel::fsw_customContextMenuRequested(QPoint pos)
contextMenu.exec(globalPos);
}
void CustomFunctionsPanel::populateFuncCB(QComboBox *b, unsigned int value)
{
b->clear();
for (unsigned int i=0; i<FuncCount; i++) {
b->addItem(getFuncName(i));
if (!GetEepromInterface()->getCapability(HasVolume)) {
if (i==FuncVolume || i==FuncBackgroundMusic || i==FuncBackgroundMusicPause) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
}
if ((i==FuncPlayHaptic) && !GetEepromInterface()->getCapability(Haptic)) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
if ((i==FuncPlayBoth) && !GetEepromInterface()->getCapability(HasBeeper)) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
if ((i==FuncLogs) && !GetEepromInterface()->getCapability(HasSDLogs)) {
QModelIndex index = b->model()->index(i, 0);
QVariant v(0);
b->model()->setData(index, v, Qt::UserRole - 1);
}
}
b->setCurrentIndex(value);
b->setMaxVisibleItems(10);
}
void CustomFunctionsPanel::populateGVmodeCB(QComboBox *b, unsigned int value)
{
b->clear();
b->addItem(QObject::tr("Value"));
b->addItem(QObject::tr("Source"));
b->addItem(QObject::tr("GVAR"));
b->addItem(QObject::tr("Increment"));
b->setCurrentIndex(value);
}
void CustomFunctionsPanel::populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QStringList & paramsList)
{
b->clear();
b->addItem("----");
QString currentvalue(value);
foreach ( QString entry, paramsList ) {
b->addItem(entry);
if (entry==currentvalue) {
b->setCurrentIndex(b->count()-1);
}
}
}
void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode)
{
QStringList qs;
b->clear();
if (function==FuncPlaySound) {
qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ;
qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ;
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncPlayHaptic) {
qs << "0" << "1" << "2" << "3";
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncReset) {
qs.append( QObject::tr("Timer1"));
qs.append( QObject::tr("Timer2"));
qs.append( QObject::tr("All"));
qs.append( QObject::tr("Telemetry"));
int reCount = GetEepromInterface()->getCapability(RotaryEncoders);
if (reCount == 1) {
qs.append( QObject::tr("Rotary Encoder"));
}
else if (reCount == 2) {
qs.append( QObject::tr("REa"));
qs.append( QObject::tr("REb"));
}
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncVolume) {
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS);
}
else if (function==FuncPlayValue) {
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT);
}
else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) {
switch (adjustmode) {
case 1:
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES);
break;
case 2:
populateSourceCB(b, RawSource(value), model, POPULATE_GVARS);
break;
case 3:
b->clear();
b->addItem("-1", 0);
b->addItem("+1", 1);
b->setCurrentIndex(value);
break;
}
}
else {
b->hide();
}
}
@@ -55,6 +55,11 @@ class CustomFunctionsPanel : public ModelPanel
void fswCut();
private:
void populateFuncCB(QComboBox *b, unsigned int value);
void populateGVmodeCB(QComboBox *b, unsigned int value);
void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode=0);
void populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QStringList & paramsList);
GeneralSettings & generalSettings;
bool phononLock;
QComboBox * fswtchSwtch[C9X_MAX_CUSTOM_FUNCTIONS];
-32
View File
@@ -40,7 +40,6 @@ preferencesDialog::preferencesDialog(QWidget *parent) :
connect(OptionCheckBox[i], SIGNAL(toggled(bool)), this, SLOT(firmwareOptionChanged(bool)));
}
populateLocale();
initSettings();
connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(baseFirmwareChanged()));
connect(this, SIGNAL(accepted()), this, SLOT(writeValues()));
@@ -254,11 +253,6 @@ void preferencesDialog::firmwareChanged()
void preferencesDialog::writeValues()
{
QSettings settings;
if (ui->locale_QB->currentIndex() > 0)
settings.setValue("locale", ui->locale_QB->itemData(ui->locale_QB->currentIndex()));
else
settings.remove("locale");
settings.setValue("default_channel_order", ui->channelorderCB->currentIndex());
settings.setValue("default_mode", ui->stickmodeCB->currentIndex());
settings.setValue("cpu_id", ui->CPU_ID_LE->text());
@@ -267,8 +261,6 @@ void preferencesDialog::writeValues()
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("wizardEnable", ui->wizardEnable_ChkB->isChecked());
settings.setValue("show_splash", ui->showSplash->isChecked());
settings.setValue("theme", ui->theme_CB->currentIndex());
settings.setValue("icon_size", ui->iconSize_CB->currentIndex());
settings.setValue("simuSW", ui->simuSW->isChecked());
settings.setValue("history_size", ui->historySize->value());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
@@ -387,9 +379,6 @@ void preferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware)
void preferencesDialog::initSettings()
{
QSettings settings;
int i = ui->locale_QB->findData(settings.value("locale"));
if (i < 0) i = 0;
ui->locale_QB->setCurrentIndex(i);
ui->snapshotClipboardCKB->setChecked(settings.value("snapshot_to_clipboard", false).toBool());
if (ui->snapshotClipboardCKB->isChecked()) {
ui->snapshotPath->setDisabled(true);
@@ -408,8 +397,6 @@ void preferencesDialog::initSettings()
ui->renameFirmware->setChecked(settings.value("rename_firmware_files", false).toBool());
ui->wizardEnable_ChkB->setChecked(settings.value("wizardEnable", true).toBool());
ui->showSplash->setChecked(settings.value("show_splash", true).toBool());
ui->theme_CB->setCurrentIndex(settings.value("theme", 1).toInt());
ui->iconSize_CB->setCurrentIndex(settings.value("icon_size", 2).toInt());
ui->historySize->setValue(settings.value("history_size", 10).toInt());
ui->backLightColor->setCurrentIndex(settings.value("backLight", 0).toInt());
ui->startupCheck_fw->setChecked(settings.value("startup_check_fw", true).toBool());
@@ -501,25 +488,6 @@ void preferencesDialog::initSettings()
firmwareChanged();
}
void preferencesDialog::populateLocale()
{
ui->ProfSave_PB->setEnabled(true);
ui->locale_QB->clear();
ui->locale_QB->addItem("System default language", "");
ui->locale_QB->addItem("English", "en");
QStringList strl = QApplication::arguments();
if (!strl.count()) return;
QDir directory = QDir(":/");
QStringList files = directory.entryList(QStringList("companion_*.qm"), QDir::Files | QDir::NoSymLinks);
foreach(QString file, files) {
QLocale loc(file.mid(10, 2));
ui->locale_QB->addItem(QLocale::languageToString(loc.language()), loc.name());
}
}
void preferencesDialog::on_fw_dnld_clicked()
{
MainWindow * mw = (MainWindow *)this->parent();
+122 -245
View File
@@ -25,7 +25,7 @@
<property name="windowTitle">
<string>Preferences</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,1,0">
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
@@ -35,7 +35,84 @@
<property name="margin">
<number>4</number>
</property>
<item row="3" column="1" colspan="4">
<item row="31" column="1" colspan="2">
<widget class="QComboBox" name="stickmodeCB">
<property name="whatsThis">
<string>Mode selection:
Mode 1:
Left stick: Elevator, Rudder
Right stick: Throttle, Aileron
Mode 2:
Left stick: Throttle, Rudder
Right stick: Elevator, Aileron
Mode 3:
Left stick: Elevator, Aileron
Right stick: Throttle, Rudder
Mode 4:
Left stick: Throttle, Aileron
Right stick: Elevator, Rudder
</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Mode 1 (RUD ELE THR AIL)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 2 (RUD THR ELE AIL)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 3 (AIL ELE THR RUD)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 4 (AIL THR ELE RUD)</string>
</property>
</item>
</widget>
</item>
<item row="14" column="1">
<widget class="QComboBox" name="backLightColor">
<item>
<property name="text">
<string>Blue</string>
</property>
</item>
<item>
<property name="text">
<string>Green</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLineEdit" name="backupPath">
@@ -60,7 +137,14 @@
</item>
</layout>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Automatic Backup Folder</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -73,7 +157,7 @@
</property>
</widget>
</item>
<item row="16" column="1" colspan="4">
<item row="15" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="joystickChkB">
@@ -101,14 +185,7 @@
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Automatic Backup Folder</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="4">
<item row="1" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QSpinBox" name="historySize">
@@ -151,14 +228,14 @@
</item>
</layout>
</item>
<item row="6" column="0" colspan="5">
<item row="5" column="0" colspan="5">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="15" column="0">
<item row="14" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -174,7 +251,7 @@
</property>
</widget>
</item>
<item row="7" column="4" rowspan="7">
<item row="6" column="4" rowspan="7">
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="imageLabel">
@@ -229,43 +306,14 @@
</item>
</layout>
</item>
<item row="15" column="2" colspan="2">
<item row="14" column="2" colspan="2">
<widget class="QCheckBox" name="simuSW">
<property name="text">
<string>Remember switches in simulator</string>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QComboBox" name="backLightColor">
<item>
<property name="text">
<string>Blue</string>
</property>
</item>
<item>
<property name="text">
<string>Green</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
</widget>
</item>
<item row="7" column="1" colspan="3">
<item row="6" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>6</number>
@@ -302,27 +350,21 @@
</item>
</layout>
</item>
<item row="17" column="0">
<item row="16" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Simulator capture folder</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Language (requires restart)</string>
<item row="17" column="0" colspan="5">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="32" column="4">
<item row="31" column="4">
<widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -466,7 +508,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</widget>
</item>
<item row="7" column="0">
<item row="6" column="0">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -479,7 +521,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="13" column="1" colspan="3">
<item row="12" column="1" colspan="3">
<layout class="QGridLayout" name="gridLayout_2">
<property name="verticalSpacing">
<number>1</number>
@@ -503,7 +545,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</layout>
</item>
<item row="25" column="1" colspan="4">
<item row="24" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="FwInfo">
@@ -527,7 +569,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</layout>
</item>
<item row="13" column="0">
<item row="12" column="0">
<widget class="QLabel" name="label_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -540,7 +582,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="38" column="0" colspan="5">
<item row="37" column="0" colspan="5">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_3">
@@ -583,7 +625,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</layout>
</item>
<item row="27" column="1" colspan="4">
<item row="26" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_6" stretch="1,0">
<item>
<widget class="QLabel" name="label_12">
@@ -610,7 +652,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</layout>
</item>
<item row="33" column="1" colspan="4">
<item row="32" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_6" columnstretch="0,0,1,0,0">
<item row="1" column="4">
<widget class="QPushButton" name="export_PB">
@@ -658,7 +700,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</layout>
</item>
<item row="17" column="1" colspan="4">
<item row="16" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_8">
<property name="verticalSpacing">
<number>1</number>
@@ -689,7 +731,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</layout>
</item>
<item row="32" column="0">
<item row="31" column="0">
<widget class="QLabel" name="label_14">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -702,7 +744,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="32" column="3">
<item row="31" column="3">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -718,62 +760,14 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="32" column="1" colspan="2">
<widget class="QComboBox" name="stickmodeCB">
<property name="whatsThis">
<string>Mode selection:
Mode 1:
Left stick: Elevator, Rudder
Right stick: Throttle, Aileron
Mode 2:
Left stick: Throttle, Rudder
Right stick: Elevator, Aileron
Mode 3:
Left stick: Elevator, Aileron
Right stick: Throttle, Rudder
Mode 4:
Left stick: Throttle, Aileron
Right stick: Elevator, Rudder
</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Mode 1 (RUD ELE THR AIL)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 2 (RUD THR ELE AIL)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 3 (AIL ELE THR RUD)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 4 (AIL THR ELE RUD)</string>
</property>
</item>
</widget>
</item>
<item row="33" column="0">
<item row="32" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Profile slot</string>
</property>
</widget>
</item>
<item row="28" column="1" colspan="4">
<item row="27" column="1" colspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -789,7 +783,7 @@ Mode 4:
</property>
</spacer>
</item>
<item row="26" column="1" colspan="4">
<item row="25" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_11" stretch="1,0">
<item>
<widget class="QLabel" name="label_18">
@@ -816,7 +810,7 @@ Mode 4:
</item>
</layout>
</item>
<item row="22" column="1" colspan="4">
<item row="21" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
@@ -907,7 +901,7 @@ May be different from firmware language</string>
</item>
</layout>
</item>
<item row="22" column="0">
<item row="21" column="0">
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
@@ -947,7 +941,7 @@ May be different from firmware language</string>
</item>
</layout>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -960,14 +954,7 @@ May be different from firmware language</string>
</property>
</widget>
</item>
<item row="18" column="0" colspan="5">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="24" column="1" colspan="4">
<item row="23" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
@@ -1520,7 +1507,7 @@ May be different from firmware language</string>
</item>
</layout>
</item>
<item row="10" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -1533,7 +1520,7 @@ May be different from firmware language</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="3">
<item row="9" column="1" colspan="3">
<widget class="QComboBox" name="splashincludeCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -1554,116 +1541,6 @@ May be different from firmware language</string>
</widget>
</item>
<item row="0" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QComboBox" name="locale_QB"/>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Theme</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="theme_CB">
<property name="toolTip">
<string>Requires restart</string>
</property>
<item>
<property name="text">
<string>Classic</string>
</property>
</item>
<item>
<property name="text">
<string>Monochrome</string>
</property>
</item>
<item>
<property name="text">
<string>MonoWhite</string>
</property>
</item>
<item>
<property name="text">
<string>MonoBlue</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Icon size</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="iconSize_CB">
<property name="toolTip">
<string>Requires restart</string>
</property>
<item>
<property name="text">
<string>Small</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Big</string>
</property>
</item>
<item>
<property name="text">
<string>Huge</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="1" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0,0,0">
<item>
<widget class="QCheckBox" name="showSplash">
@@ -1710,7 +1587,7 @@ May be different from firmware language</string>
</item>
</layout>
</item>
<item row="16" column="0">
<item row="15" column="0">
<widget class="QLabel" name="label_11">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
@@ -1723,14 +1600,14 @@ May be different from firmware language</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="3" column="0">
<widget class="QLabel" name="ge_label">
<property name="text">
<string>Google Earth Executable</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="4">
<item row="3" column="1" colspan="4">
<layout class="QHBoxLayout" name="ge_layout">
<item>
<widget class="QLineEdit" name="ge_lineedit">
+1 -29
View File
@@ -54,7 +54,6 @@ printDialog::printDialog(QWidget *parent, GeneralSettings *gg, ModelData *gm, QS
printCurves();
printGvars();
printSwitches();
printSafetySwitches();
printFSwitches();
printFrSky();
@@ -693,33 +692,6 @@ void printDialog::printGvars()
}
}
void printDialog::printSafetySwitches()
{
int sc=0;
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
str.append("<tr><td><h2>"+tr("Safety Switches")+"</h2></td></tr>");
str.append("<tr><td><table border=0 cellspacing=0 cellpadding=3><tr>");
str.append("<td width=\"60\">&nbsp;</td>");
str.append(doTC(tr("Switch"), "", true));
str.append(doTL(tr("Value"), "", true));
str.append("</tr>");
for(int i=0; i<GetEepromInterface()->getCapability(Outputs); i++)
{
if (g_model->safetySw[i].swtch.type) {
str.append("<tr>");
str.append(doTC(tr("CH")+QString("%1").arg(i+1),"",true));
str.append(doTC(g_model->safetySw[i].swtch.toString(),"green"));
str.append(doTC(QString::number(g_model->safetySw[i].val),"green"));
str.append("</tr>");
sc++;
}
}
str.append("</table></td></tr></table>");
str.append("<br>");
if (sc!=0)
te->append(str);
}
void printDialog::printFSwitches()
{
int sc=0;
@@ -737,7 +709,7 @@ void printDialog::printFSwitches()
str.append("<tr>");
str.append(doTC(g_model->funcSw[i].swtch.toString(),"green"));
str.append(doTC(getFuncName(g_model->funcSw[i].func),"green"));
str.append(doTC(FuncParam(g_model->funcSw[i].func,g_model->funcSw[i].param,g_model->funcSw[i].paramarm, g_model->funcSw[i].adjustMode),"green"));
str.append(doTC(g_model->funcSw[i].paramToString(),"green"));
int index=g_model->funcSw[i].func;
if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) {
str.append(doTC(QString("%1").arg(g_model->funcSw[i].repeatParam),"green"));
+34 -32
View File
@@ -555,6 +555,7 @@ QPushButton:checked {
border-radius: 4px;
border-color: black;
padding: 2px;
}
QPushButton:checked {
@@ -1262,7 +1263,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_1">
<property name="text">
<string>CS1</string>
<string>LS1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1293,7 +1294,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_2">
<property name="text">
<string>CS2</string>
<string>LS2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1324,7 +1325,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_3">
<property name="text">
<string>CS3</string>
<string>LS3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1355,7 +1356,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_4">
<property name="text">
<string>CS4</string>
<string>LS4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1386,7 +1387,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_5">
<property name="text">
<string>CS5</string>
<string>LS5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1417,7 +1418,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_6">
<property name="text">
<string>CS6</string>
<string>LS6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1448,7 +1449,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_7">
<property name="text">
<string>CS7</string>
<string>LS7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1479,7 +1480,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_8">
<property name="text">
<string>CS8</string>
<string>LS8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1510,7 +1511,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_9">
<property name="text">
<string>CS9</string>
<string>LS9</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1541,7 +1542,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_10">
<property name="text">
<string>CSA</string>
<string>LSA</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1572,7 +1573,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_11">
<property name="text">
<string>CSB</string>
<string>LSB</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1603,7 +1604,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_12">
<property name="text">
<string>CSC</string>
<string>LSC</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1634,7 +1635,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_13">
<property name="text">
<string>CSD</string>
<string>LSD</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1665,7 +1666,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_14">
<property name="text">
<string>CSE</string>
<string>LSE</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1696,7 +1697,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_15">
<property name="text">
<string>CSF</string>
<string>LSF</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1727,7 +1728,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_16">
<property name="text">
<string>CSG</string>
<string>LSG</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1758,7 +1759,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_17">
<property name="text">
<string>CSH</string>
<string>LSH</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1789,7 +1790,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_18">
<property name="text">
<string>CSI</string>
<string>LSI</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1820,7 +1821,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_19">
<property name="text">
<string>CSJ</string>
<string>LSJ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1851,7 +1852,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_20">
<property name="text">
<string>CSK</string>
<string>LSK</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1882,7 +1883,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_21">
<property name="text">
<string>CSL</string>
<string>LSL</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1913,7 +1914,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_22">
<property name="text">
<string>CSM</string>
<string>LSM</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1944,7 +1945,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_23">
<property name="text">
<string>CSN</string>
<string>LSN</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -1975,7 +1976,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_24">
<property name="text">
<string>CSO</string>
<string>LSO</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2006,7 +2007,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_25">
<property name="text">
<string>CSP</string>
<string>LSP</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2037,7 +2038,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_26">
<property name="text">
<string>CSQ</string>
<string>LSQ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2068,7 +2069,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_27">
<property name="text">
<string>CSR</string>
<string>LSR</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2099,7 +2100,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_28">
<property name="text">
<string>CSS</string>
<string>LSS</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2130,7 +2131,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_29">
<property name="text">
<string>CST</string>
<string>LST</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2161,7 +2162,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_30">
<property name="text">
<string>CSU</string>
<string>LSU</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2192,7 +2193,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_31">
<property name="text">
<string>CSV</string>
<string>LSV</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2223,7 +2224,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_32">
<property name="text">
<string>CSW</string>
<string>LSW</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3052,6 +3053,7 @@ border-radius: 4px;
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+33 -32
View File
@@ -2311,6 +2311,7 @@ border-radius: 4px;
</widget>
</item>
<item row="4" column="4">
<widget class="QSlider" name="chnout_13">
<property name="enabled">
<bool>false</bool>
@@ -2893,7 +2894,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_20">
<property name="text">
<string>CSK</string>
<string>LSK</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2924,7 +2925,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_12">
<property name="text">
<string>CSC</string>
<string>LSC</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2955,7 +2956,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_13">
<property name="text">
<string>CSD</string>
<string>LSD</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -2986,7 +2987,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_7">
<property name="text">
<string>CS7</string>
<string>LS7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3017,7 +3018,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_21">
<property name="text">
<string>CSL</string>
<string>LSL</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3048,7 +3049,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_11">
<property name="text">
<string>CSB</string>
<string>LSB</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3079,7 +3080,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_1">
<property name="text">
<string>CS1</string>
<string>LS1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3110,7 +3111,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_17">
<property name="text">
<string>CSH</string>
<string>LSH</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3141,7 +3142,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_16">
<property name="text">
<string>CSG</string>
<string>LSG</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3172,7 +3173,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_14">
<property name="text">
<string>CSE</string>
<string>LSE</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3203,7 +3204,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_15">
<property name="text">
<string>CSF</string>
<string>LSF</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3234,7 +3235,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_8">
<property name="text">
<string>CS8</string>
<string>LS8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3265,7 +3266,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_9">
<property name="text">
<string>CS9</string>
<string>LS9</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3296,7 +3297,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_10">
<property name="text">
<string>CSA</string>
<string>LSA</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3327,7 +3328,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_22">
<property name="text">
<string>CSM</string>
<string>LSM</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3358,7 +3359,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_19">
<property name="text">
<string>CSJ</string>
<string>LSJ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3389,7 +3390,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_18">
<property name="text">
<string>CSI</string>
<string>LSI</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3420,7 +3421,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_4">
<property name="text">
<string>CS4</string>
<string>LS4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3451,7 +3452,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_5">
<property name="text">
<string>CS5</string>
<string>LS5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3482,7 +3483,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_2">
<property name="text">
<string>CS2</string>
<string>LS2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3513,7 +3514,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_3">
<property name="text">
<string>CS3</string>
<string>LS3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3544,7 +3545,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_6">
<property name="text">
<string>CS6</string>
<string>LS6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3575,7 +3576,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_23">
<property name="text">
<string>CSN</string>
<string>LSN</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3606,7 +3607,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_24">
<property name="text">
<string>CSO</string>
<string>LSO</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3637,7 +3638,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_25">
<property name="text">
<string>CSP</string>
<string>LSP</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3668,7 +3669,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_26">
<property name="text">
<string>CSQ</string>
<string>LSQ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3699,7 +3700,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_27">
<property name="text">
<string>CSR</string>
<string>LSR</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3730,7 +3731,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_28">
<property name="text">
<string>CSS</string>
<string>LSS</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3761,7 +3762,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_29">
<property name="text">
<string>CST</string>
<string>LST</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3792,7 +3793,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_30">
<property name="text">
<string>CSU</string>
<string>LSU</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3823,7 +3824,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_31">
<property name="text">
<string>CSV</string>
<string>LSV</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -3854,7 +3855,7 @@ border-radius: 4px;
<item>
<widget class="QLabel" name="labelCSW_32">
<property name="text">
<string>CSW</string>
<string>LSW</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>