void GeneralEdit::on_tabWidget_selected(QString ) { ui->chnLabel_1->setText(getSourceStr(g_eeGeneral.stickMode,1,2)); ui->chnLabel_2->setText(getSourceStr(g_eeGeneral.stickMode,2,2)); ui->chnLabel_3->setText(getSourceStr(g_eeGeneral.stickMode,3,2)); ui->chnLabel_4->setText(getSourceStr(g_eeGeneral.stickMode,4,2)); }
void printDialog::printExpo() { QString str = tr("<h2>Expo/Dr Settings</h2>"); for(int i=0; i<4; i++) { str.append("<h3>" + getSourceStr(g_eeGeneral->stickMode, i+1) + "</h3>"); //high, mid, low //left right / expo, dr str.append(fv(tr("Switch 1:"), getSWName(g_model->expoData[i].drSw1,0))); str.append(fv(tr("Switch 2:"), getSWName(g_model->expoData[i].drSw2,0))); str.append("<table border=1 cellspacing=0 cellpadding=3>"); str.append("<tr>"); str.append(doTC(" ")); str.append(doTC(tr("Expo Left"), "", true)); str.append(doTC(tr("D/R Left"), "", true)); str.append(doTC(tr("D/R Right"), "", true)); str.append(doTC(tr("Expo Right"), "", true)); str.append("</tr>"); str.append("<tr>"); str.append(doTC(tr("High"), "", true)); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_HIGH][DR_EXPO][DR_LEFT]),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_HIGH][DR_WEIGHT][DR_LEFT]+100),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_HIGH][DR_WEIGHT][DR_RIGHT]+100),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_HIGH][DR_EXPO][DR_RIGHT]),"green")); str.append("</tr>"); str.append("<tr>"); str.append(doTC(tr("Mid"), "", true)); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_MID][DR_EXPO][DR_LEFT]),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_MID][DR_WEIGHT][DR_LEFT]+100),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_MID][DR_WEIGHT][DR_RIGHT]+100),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_MID][DR_EXPO][DR_RIGHT]),"green")); str.append("</tr>"); str.append("<tr>"); str.append(doTC(tr("Low"), "", true)); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_LOW][DR_EXPO][DR_LEFT]),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_LOW][DR_WEIGHT][DR_LEFT]+100),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_LOW][DR_WEIGHT][DR_RIGHT]+100),"green")); str.append(doTC(QString::number(g_model->expoData[i].expo[DR_LOW][DR_EXPO][DR_RIGHT]),"green")); str.append("</tr>"); str.append("</table>"); } str.append("<br><br>"); te->append(str); }
void printDialog::printSwitches() { QString str = tr("<h2>Custom Switches</h2>"); str.append("<table border=1 cellspacing=0 cellpadding=3>"); // str.append("<tr>"); // str.append(doTC(" ")); // str.append(doTC(tr("Source"), "", true)); // str.append(doTC(tr("Offset"), "", true)); // str.append(doTC(tr("Function"), "", true)); // str.append("</tr>"); for(int i=0; i<NUM_SKYCSW; i++) { str.append("<tr>"); str.append(doTC(tr("SW%1").arg(i+1),"",true)); QString tstr; if(g_model->customSw[i].func) { switch (CS_STATE(g_model->customSw[i].func, g_model->modelVersion)) { case CS_VOFS: tstr = g_model->customSw[i].v1 ? getSourceStr(g_eeGeneral->stickMode,g_model->customSw[i].v1, 0, 0) : "0"; tstr.remove(" "); if(g_model->customSw[i].func==CS_APOS || g_model->customSw[i].func==CS_ANEG) tstr = "|" + tstr + "|"; if(g_model->customSw[i].func==CS_APOS || g_model->customSw[i].func==CS_VPOS) tstr += " > "; if(g_model->customSw[i].func==CS_ANEG || g_model->customSw[i].func==CS_VNEG) tstr += " < "; tstr += QString::number(g_model->customSw[i].v2); break; case CS_VBOOL: tstr = getSWName(g_model->customSw[i].v1,0); switch (g_model->customSw[i].func) { case CS_AND: tstr += " AND "; break; case CS_OR: tstr += " OR "; break; case CS_XOR: tstr += " XOR "; break; default: break; } tstr += getSWName(g_model->customSw[i].v2,0); break; case CS_VCOMP: tstr = g_model->customSw[i].v1 ? getSourceStr(g_eeGeneral->stickMode,g_model->customSw[i].v1, 0, 0) : "0"; switch (g_model->customSw[i].func) { case CS_EQUAL: tstr += " = "; break; case CS_NEQUAL: tstr += " != "; break; case CS_GREATER: tstr += " > "; break; case CS_LESS: tstr += " < "; break; case CS_EGREATER: tstr += " >= "; break; case CS_ELESS: tstr += " <= "; break; default: break; } tstr += g_model->customSw[i].v2 ? getSourceStr(g_eeGeneral->stickMode,g_model->customSw[i].v2, 0, 0) : "0"; break; default: break; } } str.append(doTC(tstr,"green")); str.append("</tr>"); } str.append("</table>"); str.append("<br><br>"); te->append(str); }
void printDialog::printMixes() { QString str = tr("<h2>Mixers</h2><br>"); int lastCHN = 0; for(int i=0; i<MAX_SKYMIXERS; i++) { SKYMixData *md = &g_model->mixData[i]; if(!md->destCh) break; str.append("<font size=+1 face='Courier New'>"); if(lastCHN!=md->destCh) { lastCHN++; str.append(tr("<b>CH%1</b>").arg(lastCHN,2,10,QChar('0'))); } else str.append(" "); str.append("</font>"); if(lastCHN!=md->destCh) { str.append("<br>"); lastCHN++; for (int k=lastCHN; k<md->destCh; k++) { str.append(tr("<font size=+1 face='Courier New'><b>CH%1</b><br></font>").arg(lastCHN,2,10,QChar('0'))); lastCHN++; } str.append(tr("<font size=+1 face='Courier New'><b>CH%1</b></font>").arg(lastCHN,2,10,QChar('0'))); } str.append("<font size=+1 face='Courier New' color=green>"); switch(md->mltpx) { case (1): str += " *"; break; case (2): str += " R"; break; default: str += " "; break; }; str += md->weight<0 ? tr(" %1\%").arg(md->weight).rightJustified(6,' ') : tr(" +%1\%").arg(md->weight).rightJustified(6, ' '); //QString srcStr = SRC_STR; //str += " " + srcStr.mid(CONVERT_MODE(md->srcRaw+1)*4,4); str += getSourceStr(g_eeGeneral->stickMode,md->srcRaw, g_model->modelVersion, 0); if(md->swtch) str += tr(" Switch(") + getSWName(md->swtch,0) + ")"; if(md->carryTrim) str += tr(" noTrim"); if(md->sOffset) str += tr(" Offset(%1\%)").arg(md->sOffset); if(md->curve) { QString crvStr = CURV_STR; crvStr=crvStr.mid(md->curve*3,3); crvStr.replace(QString("<") ,QString("<")); str += tr(" Curve(%1)").arg(crvStr.remove(' ')); } if(md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp).arg(md->delayDown); if(md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp).arg(md->speedDown); if(md->mixWarn) str += tr(" Warn(%1)").arg(md->mixWarn); str.append("</font><br>"); } for(int j=lastCHN; j<NUM_SKYCHNOUT; j++) { str.append("<font size=+1 face='Courier New'>"); str.append(tr("<b>CH%1</b>").arg(j+1,2,10,QChar('0'))); str.append("</font><br>"); } str.append("<br><br>"); te->append(str); }