Changeset 5706 in ntrip


Ignore:
Timestamp:
Jul 30, 2014, 11:30:33 AM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppwidgets.cpp

    r5703 r5706  
    213213////////////////////////////////////////////////////////////////////////////
    214214void t_pppWidgets::slotAddStation() {
    215 
     215  int iRow = _staTable->rowCount();
     216  _staTable->insertRow(iRow);
     217  for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
     218    _staTable->setItem(iRow, iCol, new QTableWidgetItem(""));
     219  }
    216220}
    217221
     
    219223////////////////////////////////////////////////////////////////////////////
    220224void t_pppWidgets::slotDelStation() {
    221 
    222 }
     225  int nRows = _staTable->rowCount();
     226  bool flg[nRows];
     227  for (int iRow = 0; iRow < nRows; iRow++) {
     228    if (_staTable->isItemSelected(_staTable->item(iRow,1))) {
     229      flg[iRow] = true;
     230    }
     231    else {
     232      flg[iRow] = false;
     233    }
     234  }
     235  for (int iRow = nRows-1; iRow >= 0; iRow--) {
     236    if (flg[iRow]) {
     237      _staTable->removeRow(iRow);
     238    }
     239  }
     240}
Note: See TracChangeset for help on using the changeset viewer.