ChannelEditor::ChannelEditor( QStringList src, bool m, ChannelDesc *chan, QPtrList<ChannelDesc> *cdesc, QWidget *parent ) : ChannelEditorUI( parent ) { int i; channel = chan; mode = m; chandesc = cdesc; orgName = channel->name; sourceComb->insertStringList( src ); for ( i=0; i<(int)sourceComb->count(); i++ ) { if ( sourceComb->text(i)==channel->tp.source ) { sourceComb->setCurrentItem(i); break; } } if ( channel->tp.type==FE_QAM ) initC(); else if ( channel->tp.type==FE_OFDM ) initT(); else if ( channel->tp.type==FE_QPSK ) initS(); else initA(); if ( mode ) { ftaCb->setEnabled( false ); pidsGroup->setEnabled( false ); numSpin->setEnabled( false ); setCaption( i18n("Initial Transponder Settings") ); } else { numSpin->setMinValue( 1 ); numSpin->setMaxValue( chandesc->count() ); chanNum = channel->num; numSpin->setValue( channel->num ); sidSpin->setValue( channel->sid ); vpidSpin->setValue( channel->vpid ); ttpidSpin->setValue( channel->ttpid ); tsidSpin->setValue( channel->tp.tsid ); nidSpin->setValue( channel->tp.nid ); ftaCb->setChecked( channel->fta ); } nameLe->setText( channel->name ); connect( apidBtn, SIGNAL(clicked()), this, SLOT(editAudio()) ); connect( subpidBtn, SIGNAL(clicked()), this, SLOT(editSubtitle()) ); }
void testConduct() { u16 Value; u8 i, j, Cstate; u8 num_cond1; initT(); nC = 0; diff = 0; //Loop over all pin combinations with Cstate (3rd pin state) (0 for LOW, 1 for High) for (Cstate = 0; Cstate < 2; Cstate++){ //loop that covers all posible pin combinations for (i = 0; i < 3; i++) for (j = 0; j < 3; j++){ if (i==j) continue; if (Value = checkConduct(i, j, Cstate)) { tList[nC][0] = i; tList[nC][1] = j; tList[nC++][2] = Value; tIN[i] += 1; tOUT[j] += 1; tC[i] += 1; tC[j] += 1; } } //Store the nc of the first pass if (!Cstate) num_cond1 = nC; } if (nC == 0) return; //if no CPs return 0, and exit function if (nC == (num_cond1 * 2)){ //If the Nc for both passes is the same go through the list //and check if any CP is different between the passes for (i = 0; i < num_cond1; i++) { if ((tList[i][0] != tList[i + num_cond1][0]) || (tList[i][1] != tList[i + num_cond1][1])){ //If it finds at list one diff=num_cond1+1 and return the full number of CPs diff = num_cond1 + 1; break; } else { //If it doesn't find any difference from the two passes //diff remains 0, and only the nC of the first pass is returned for (i = 0; i < 3; i++) { tIN[i] /= 2; tOUT[i] /= 2; tC[i] /= 2; } nC = num_cond1; } } } else{ //If the number of CPs in the two passes is different return the full number of CPs diff = num_cond1 + 1; } for (i = 1; i < 9; i++) for (j = 0; j < 3; j++) if (tC[j] == i) tN[i - 1] += 1; }