Changeset 2870 in ntrip


Ignore:
Timestamp:
Jan 23, 2011, 4:46:32 PM (14 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncwindow.cpp

    r2869 r2870  
    811811  _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
    812812  _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
     813  populateCmbTable();
    813814  cmbLayout->addWidget(_cmbTable,0,0,6,2);
    814815
     
    11131114                 + " " + _mountPointsTable->item(iRow, 6)->text());
    11141115    }
     1116  }
     1117
     1118  QStringList combineStreams;
     1119  for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
     1120    QString hlp;
     1121    for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
     1122      hlp += _cmbTable->item(iRow, iCol)->text() + " ";
     1123    }
     1124    combineStreams << hlp;
    11151125  }
    11161126
     
    11841194  settings.setValue("statusTab",   _loggroup->currentIndex());
    11851195  settings.setValue("waitTime",    _waitTimeSpinBox->value());
     1196  settings.setValue("combineStreams", combineStreams);
    11861197
    11871198  if (_caster) {
     
    18481859  }
    18491860}
     1861
     1862//
     1863////////////////////////////////////////////////////////////////////////////
     1864void bncWindow::populateCmbTable() {
     1865
     1866  for (int iRow = _cmbTable->rowCount()-1; iRow >=0; iRow--) {
     1867    _cmbTable->removeRow(iRow);
     1868  }
     1869
     1870  bncSettings settings;
     1871
     1872  int iRow = -1;
     1873  QListIterator<QString> it(settings.value("combineStreams").toStringList());
     1874  while (it.hasNext()) {
     1875    QStringList hlp = it.next().split(" ");
     1876    if (hlp.size() > 0) {
     1877      ++iRow;
     1878      _cmbTable->insertRow(iRow);
     1879    }
     1880    for (int iCol = 0; iCol < hlp.size(); iCol++) {
     1881      _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
     1882    }
     1883  }
     1884}
  • trunk/BNC/bncwindow.h

    r2869 r2870  
    8787  private:
    8888    void populateMountPointsTable();
     89    void populateCmbTable();
    8990
    9091    QMenu*     _menuHlp;
Note: See TracChangeset for help on using the changeset viewer.