Merge pull request #598 from opentx/dvogonen/590_Rename_things_In_Companion
Dvogonen/590 rename things in companion
This commit is contained in:
@@ -1038,7 +1038,7 @@ void compareDialog::printSwitches()
|
||||
int sc=0;
|
||||
QString color;
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append("<tr><td><h2>"+tr("Custom Switches")+"</h2></td></tr>");
|
||||
str.append("<tr><td><h2>"+tr("Logical Switches")+"</h2></td></tr>");
|
||||
str.append("<tr><td><table border=1 cellspacing=0 cellpadding=1 width=\"100%\">");
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(CustomSwitches); i++) {
|
||||
QString sw1 = getCustomSwitchStr(&g_model1->customSw[i], *g_model1);
|
||||
@@ -1048,9 +1048,9 @@ void compareDialog::printSwitches()
|
||||
color=getColor1(sw1,sw2);
|
||||
str.append(QString("<td width=\"45%\"><font color=%1>").arg(color)+sw1+"</font></td>");
|
||||
if (i<9) {
|
||||
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("CS")+QString("%1</b></td>").arg(i+1));
|
||||
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("LS")+QString("%1</b></td>").arg(i+1));
|
||||
} else {
|
||||
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("CS")+('A'+(i-9))+"</b></td>");
|
||||
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("LS")+('A'+(i-9))+"</b></td>");
|
||||
}
|
||||
color=getColor2(sw1,sw2);
|
||||
str.append(QString("<td width=\"45%\"><font color=%1>").arg(color)+sw2+"</font></td>");
|
||||
@@ -1069,7 +1069,7 @@ void compareDialog::printFSwitches()
|
||||
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("Custom Functions")+"</h2></td></tr>");
|
||||
str.append("<tr><td><h2>"+tr("Switch Assignment")+"</h2></td></tr>");
|
||||
str.append("<tr><td><table border=1 cellspacing=0 cellpadding=1 width=\"100%\"><tr>");
|
||||
str.append("<td width=\"7%\" align=\"center\"><b>"+tr("Switch")+"</b></td>");
|
||||
str.append("<td width=\"12%\" align=\"center\"><b>"+tr("Function")+"</b></td>");
|
||||
|
||||
@@ -90,15 +90,6 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
|
||||
for (int i=0; i<num_fsw; i++) {
|
||||
AssignFunc func = model.funcSw[i].func;
|
||||
|
||||
// The label
|
||||
QLabel * label = new QLabel(this);
|
||||
label->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
label->setMouseTracking(true);
|
||||
label->setProperty("index", i);
|
||||
label->setText(tr("CF%1").arg(i+1));
|
||||
gridLayout->addWidget(label, i+1, 0);
|
||||
connect(label, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(fsw_customContextMenuRequested(QPoint)));
|
||||
|
||||
// The switch
|
||||
fswtchSwtch[i] = new QComboBox(this);
|
||||
fswtchSwtch[i]->setProperty("index", i);
|
||||
|
||||
@@ -29,9 +29,9 @@ CustomSwitchesPanel::CustomSwitchesPanel(QWidget * parent, ModelData & model):
|
||||
QLabel * label = new QLabel(this);
|
||||
label->setProperty("index", i);
|
||||
if (i < 9)
|
||||
label->setText(tr("CS%1").arg(i+1));
|
||||
label->setText(tr("LS%1").arg(i+1));
|
||||
else
|
||||
label->setText(tr("CS%1").arg(QChar('A'+i-9)));
|
||||
label->setText(tr("LS%1").arg(QChar('A'+i-9)));
|
||||
label->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
label->setMouseTracking(true);
|
||||
connect(label, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(csw_customContextMenuRequested(QPoint)));
|
||||
|
||||
@@ -30,9 +30,9 @@ ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool i
|
||||
addTab(new InputsPanel(this, model, radioData.generalSettings), tr("Inputs"));
|
||||
addTab(new MixesPanel(this, model, radioData.generalSettings), tr("Mixes"));
|
||||
addTab(new Channels(this, model), tr("Channels"));
|
||||
addTab(new CustomSwitchesPanel(this, model), tr("Custom Switches"));
|
||||
addTab(new CustomSwitchesPanel(this, model), tr("Logical Switches"));
|
||||
if (GetEepromInterface()->getCapability(CustomFunctions))
|
||||
addTab(new CustomFunctionsPanel(this, model, radioData.generalSettings), tr("Assignable Functions"));
|
||||
addTab(new CustomFunctionsPanel(this, model, radioData.generalSettings), tr("Switch Assignment"));
|
||||
addTab(new Curves(this, model), tr("Curves"));
|
||||
if (GetEepromInterface()->getCapability(Telemetry) & TM_HASTELEMETRY)
|
||||
addTab(new TelemetryPanel(this, model), tr("Telemetry"));
|
||||
|
||||
@@ -640,16 +640,16 @@ void printDialog::printSwitches()
|
||||
{
|
||||
int sc=0;
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append("<tr><td><h2>"+tr("Custom Switches")+"</h2></td></tr>");
|
||||
str.append("<tr><td><h2>"+tr("Logical Switches")+"</h2></td></tr>");
|
||||
str.append("<tr><td><table border=0 cellspacing=0 cellpadding=3>");
|
||||
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(CustomSwitches); i++) {
|
||||
if (g_model->customSw[i].func) {
|
||||
str.append("<tr>");
|
||||
if (i<9) {
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("CS")+QString("%1</b></td>").arg(i+1));
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("LS")+QString("%1</b></td>").arg(i+1));
|
||||
} else {
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("CS")+('A'+(i-9))+"</b></td>");
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("LS")+('A'+(i-9))+"</b></td>");
|
||||
}
|
||||
QString tstr = getCustomSwitchStr(&g_model->customSw[i], *g_model);
|
||||
str.append(doTC(tstr,"green"));
|
||||
@@ -724,9 +724,8 @@ void printDialog::printFSwitches()
|
||||
{
|
||||
int sc=0;
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append("<tr><td><h2>"+tr("Function Switches")+"</h2></td></tr>");
|
||||
str.append("<tr><td><h2>"+tr("Switch Assignments")+"</h2></td></tr>");
|
||||
str.append("<tr><td><table border=0 cellspacing=0 cellpadding=3><tr>");
|
||||
str.append("<td width=\"60\"> </td>");
|
||||
str.append(doTC(tr("Switch"), "", true));
|
||||
str.append(doTL(tr("Function"), "", true));
|
||||
str.append(doTL(tr("Parameter"), "", true));
|
||||
@@ -736,7 +735,6 @@ void printDialog::printFSwitches()
|
||||
for(int i=0; i<GetEepromInterface()->getCapability(CustomFunctions); i++) {
|
||||
if (g_model->funcSw[i].swtch.type!=SWITCH_TYPE_NONE) {
|
||||
str.append("<tr>");
|
||||
str.append(doTC(tr("CF")+QString("%1").arg(i+1),"",true));
|
||||
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"));
|
||||
|
||||
Reference in New Issue
Block a user